DE2-115 of Terasic uses the ISP1362 full speed USB Host&OTG chip, and Terasic provides design examples for NiosII.
However, I need more communication bandwidth between the PC and FPGA. I implement a FX2LP controller to operate cy7c68013a chip, and communicate with Nios system that is shown as follow.
FX2LP is configured to Slave FIFO mode, and uses adapter to connect DE2-115.
The interface of FX2LP is 16-bit width, and can operate at 48 or 30Mhz. The NiosII system interface is 32-bit data bus, and operates at more than 100Mhz. The cyusb controller use a data combination logic to bridge them. In this case, FX2LP operates at 30Mhz because the wire of the adapter is too long. The EP2-OUT can read a 16-bit data in one clock cycle, and the bandwidth of the EP2-OUT is 60Mbyte/s(30Mhz*2bytes). The bandwidth of EP6-IN is limited by NiosII system interface. This system can write 2048 bytes data in 3553 clock cycles. The bandwidth of EP6-IN is about 17Mbyte/s if the data is moved by nios cpu.
The EP6-IN of FX2LP can be effectively wrote if the DMA is used to move the data. The cyusb controller can write 2048 bytes to EP6-IN in 2048 clock cycles if the data is moved by DMA. To improve the adapter or the FX2LP PCB module, the interface of FX2LP chip can operate at 48Mhz, and the access bandwidth can upgrade to 96Mbyte.
2011年4月26日 星期二
Qsys Builder of Altera QuartusII 10.1
I try to use qsys to rebuild my verification system that is shown as follow.
In qsys, some components are different form sopc builder. The Nor Flash(CFI) controller was replaced by Generic Tristate Controller. The altpll component doesn`t directly output clock, and the clock bridge component uses to output the clock of the sdram. The interface of the component can configure to directly export to outside of qsys.
Qsys has a new AvalonMM component is Avalon-MM Crossing Clock component. It uses the dual channel fifo to separate the different clock. In this case, I try to use it to replace the bus bridge 0, but the timingquest doesn`t met. I don`t understand what`s happen? The SDC file is generated by qsys. It means the design constrain is control by qsys. So, the bus bridge still use the Avalon-MM pipeline bridge.
This verification system uses the qsys to generate that can operate at 176Mhz in the DE2-115(Cyclone-IV).
In qsys, some components are different form sopc builder. The Nor Flash(CFI) controller was replaced by Generic Tristate Controller. The altpll component doesn`t directly output clock, and the clock bridge component uses to output the clock of the sdram. The interface of the component can configure to directly export to outside of qsys.
Qsys has a new AvalonMM component is Avalon-MM Crossing Clock component. It uses the dual channel fifo to separate the different clock. In this case, I try to use it to replace the bus bridge 0, but the timingquest doesn`t met. I don`t understand what`s happen? The SDC file is generated by qsys. It means the design constrain is control by qsys. So, the bus bridge still use the Avalon-MM pipeline bridge.
This verification system uses the qsys to generate that can operate at 176Mhz in the DE2-115(Cyclone-IV).
標籤:
Altera,
cy7c68013a,
DE2-115,
DE2-70,
FPGA,
FX2LP,
Quartus II,
Terasic,
Verilog
2011年4月25日 星期一
FX2LP Slave FIFO Mode (cy7c68013a)
FX2LP Slave FIFO Mode Firmware
The 8051 of the FX2LP only uses to initial the configuration register, and the configuration of the endpoint is shown as follow:
EP2 OUT
4x Buffer
512 Bytes Packet
Auto-OUT
EP6 IN
4x Buffer
512 Bytes Packet
Auto-IN
void TD_Init( void ) { CPUCS = 0x12; // cpu freq. = 24Mhz SYNCDELAY; IFCONFIG = 0xA3; // ifclk freq. = 30Mhz SYNCDELAY; PINFLAGSAB = 0x88; // FLAGA - EP2 EF SYNCDELAY; PINFLAGSCD = 0xEE; // FLAGD - EP6 FF SYNCDELAY; PORTACFG |= 0x80; SYNCDELAY; FIFOPINPOLAR = 0x3F; // setting all interface to high active SYNCDELAY; EP4CFG = 0x02; // Clear Valid SYNCDELAY; EP8CFG = 0x02; // Clear Valid SYNCDELAY; EP2CFG = 0xA0;// OUT 512 4x SYNCDELAY; EP6CFG = 0xE0;// IN 512 4x SYNCDELAY; // Clear FIFO FIFORESET = 0x80; // activate NAK-ALL to avoid race conditions SYNCDELAY; FIFORESET = 0x02; // reset, FIFO 2 SYNCDELAY; // FIFORESET = 0x04; // reset, FIFO 4 SYNCDELAY; // FIFORESET = 0x06; // reset, FIFO 6 SYNCDELAY; // FIFORESET = 0x08; // reset, FIFO 8 SYNCDELAY; // FIFORESET = 0x00; // deactivate NAK-ALL SYNCDELAY; // OUT EP2 EP2FIFOCFG = 0x01; // AUTOOUT = 0 SYNCDELAY; OUTPKTEND = 0x82; // 1x SYNCDELAY; OUTPKTEND = 0x82; // 2x SYNCDELAY; OUTPKTEND = 0x82; // 3x SYNCDELAY; OUTPKTEND = 0x82; // 4x SYNCDELAY; EP2FIFOCFG = 0x11; SYNCDELAY; // IN EP6 EP6FIFOCFG = 0x0D; SYNCDELAY; }
訂閱:
文章 (Atom)