The simple answer to your question is yes this can be done in PSoC Creator. However, there is a learning curve and several steps to start doing your design.
To start: “ My concern is that the DMA components are only able to move from the ADC registers, to SRAM (where the CPU can do integer math), and then back to the DAC register.”
The DMA can be used to move data from any location to any other location. You can use the DMA to write data from the ADC to USB, SRAM, DACs, or even change PSoC Configuration registers (not recommended). The DMA is very flexible it has the same read/write privileges as the CPU.
Yes, the DMA wizard doesn’t show all of the possibilities, but all of the possibilities are there. To get familiar with DMA I recommend reading AN52705, appendix C provides all the important API you need to program the DMA to move data from one location to another.
Second: “ I'd like to use the ALUs and registers in the Datapaths to do the integer math manipulation, and to use the PLD logic for the machine states.”
This is very possible. The first step is to learn about how to create and program digital components specifically the datapath. The datapath is programmed via a separate tool known as the datapath configuration tool. To learn about this process I highly recommend viewing the following trainings: PSoC Creator 110, 111, 112, 113, 210, 211, 212, 213, & 214. These trainings can be found at the following link:
Also included with your install of PSoC Creator is a folder called “Component Development Kit” in this you will find the Datapath Configuration Tool. Also there is a document called the “Component Author Guide” this is another good source of information on how to create your own datapath components. Information on the datapaths can be found in section 126.96.36.199 and in Appendix B.
The datapath has 8 unique functions: Add, Subtract, Inc, Dec, Pass, XOR, OR, AND. It also has the ability to shift the results. If you are looking to do a multiply the Datapath does not have a native multiply instruction, but you can create one using shifts and adds.
So, is this only possible through Designer rather than Creator? I get the feeling this is so, since it is my understanding that the Verilog code can only be used to create components out of the PLD logic.
If I understand your design correctly you can easily implement this functionality using PSoC Creator. You are correct that Verilog Code will only use PLD logic. However, using the information above you can combine your verilog code and a datapath to create a unique and complex component to accomplish your goals.
Tdu: thanks for the quick and informative reply.
I guess I'll go one step further, and ask if the DMA can move data to a register that I create using the Verilog or Datapath tools? If so, how do I specify the transfer location? Would I create an address as if it were an external ROM and use an AND mask and a little glue logic to implement a "roll your own" register?
You can DMA to either Control registers or the datapath. You can DMA from either a status register or the datapath. In the case of the datapath there are registers that you can read and write (data registers) but the typical DMA is done using the FIFOs. You cannot DMA directly to Flip-Flops in the PLD.
All of these locations have locations and they are all memory mapped. There is no additional logic for you to include. The exact location that they will be placed will vary depending on the how the design is mapped to the hardware. This is handled by the build tools which will create #defines for each of these registers that you will use. Then these #defines map these to the physical addresses. If you look at the file cyfitter.h that is generated as part of any build you will see the defines that I'm refering to. As an example I put a simple UDB based counter and then when I look at the cyfitter.h file I can see that the datapath FIFO FO can be referenced using:
#define Counter_1_CounterUDB_sC8_counterdp_u0__F0_REG CYREG_B1_UDB09_F0The register is mapped by this define to a specific F0 register in UDB09.All this is described in the Component Author guide and covered in the training classes that TDU pointed you to.You made a comment about PSoC Designer. That product is the development platform for PSoC 1 and PSoC Creator is the development platform for PSoC 3 and PSoC 5.You describe wanting to do audio effects. That will be a challenge for the UDB datapaths. I would expect that those effects will require multiplies and more computation than is going to be possible with the datapaths. These sound like they may be a better fit for the Digital Filter Block (DFB). There are a lot of different possibilities for computation in PSoC. I have done a simple audio effect with the UDBs without CPU interaction. I implemented a USB to UDB to I2S flow for audio playout where the UDBs were used to control the volume. The CPU was just used to respond to a Capsense slider to input the volume desired and write a value to the datapath to control the scaling, but the CPU never touches the data. That is all moved via DMA. This is done using a multiply implemented using shifts and adds. So some processing can be done using the datapaths. It is certainly possible to scale and combine signals using the datapath. I don't know exactly what will be required to implement the effects that you desire.You can also refer to my blog: www.cypress.com/go/psocsenseiIt has some useful discussion of DMA and Datapaths.- Brad Budlong