- The srammaster.c file is intended to write to the SRAM with an 8-bit address bus. Have you modified the source code to suit the read/write to FPGA?
- Also, to perform a write to FPGA from FX3, the OUT endpoint of FX3 should be used, which is 0x01. The IN endpoint 0x81 is used for reading data from the FPGA over to FX3 and then to the host PC.
If interfacing with FPGA is your desired application, please refer to AN65974.
1. I'm referencing cyusb_linux_1.0.5/src/08_cybulk.cpp.
Previously I've successfully write FPGA register with USB Control Center, customized firmware and customized FPGA bit.
Here I'm trying to create my own linux command to write FPGA register. Firmware and FPGA bit are the same.
2. According to AN87216, output from GPIF to FPGA is Consumer Socket.
Below left side is original code, so CONSUMER endpoint shall be 0x81. Could you double check.
Consider the case when the GPIF II interface receives data from the USB interface. The terms PRODUCER and CONSUMER are with respect to the DMA channel. The data is written into the DMA channel by the USB interface, hence is called the PRODUCER socket and the data is emptied from the DMA channel by the GPIF II interface (P-Port), hence is called the CONSUMER socket.
As you can see from the below image, when data is written to the GPIF II interface, the OUT endpoint 0x01 is used. As far as USB interface is concerned, the endpoint 0x01 fills the data into the DMA channel and hence is named as CY_FX_EP_PRODUCER whereas the endpoint 0x81 empties the data from the DMA channel and hence is named as CY_FX_EP_CONSUMER.