How to adapt CW305 for non-crypto applications


We are trying to use CW305 to implement one biomedical application. We are interested in changing the voltage and the frequency to control the power. As far as we understood, we need a usb module so that we can modify these parameters via Python. Out of the code found on the github, it is clear that we need to add usb_reg_fe.v to our project, and change the top file to add the usb connections, but when it comes to using registers, things get a bit fuzzy. Is there a documentation or a tutorial that we can follow to see which signals do we need from cw305_reg_aes.v and how to interface with them?
We really don’t need to use them in our design, we just need to have the correct code that will allow us to program the board and change the voltage and frequency via Python.

Many thanks in advance!

See section 8 of the CW305 paper:
Start by making a copy of the AES example project. Remove the AES files and keep cw305_top.v, cw305_reg_aes.v, and cw305_usb_reg_fe.v.

Take cw305_reg_aes.v as a example and modify it for your own needs.

Then, see how reads/writes registers in your FPGA design, via the fpga_write() and fpga_read() methods.


We will try that. Many thanks!
I just have one follow-up question, if we just want to modify the frequency and the voltage, isn’t that done externally? Through the microcontroller? Do we really need the registers for fpga_read() and fpga_write() if we don’t plan to use them? Or are they necessary in any case?

Correct, the FPGA is not involved in controlling the CW305 board’s clocks and voltages.
By all means, put only the registers you need in the FPGA.
Make sure you understand how, in our reference design, the register interface is used to provide the “go” signal to the target, which in turn sets the IO4 line high which signals to the capture board to start capturing power samples.

Perfect! We will do that. Thanks!