4.3 KiB
SOC Design For Testing Digital IP chips (RISC V and SRAM)
This Project explains the importance of components used in the PCB design and also how data flows within the design.
Table of Contents
- Brief Introduction to Testing flow
- Introduction to FT2232H
- Data flow from USB port to FT2232H
- Data flow from FT2232H to SPI flash memory
- Future work
- Acknowledgements
Brief Introduction to Testing flow
An IDE ( Integrated Development Environment) is used for programming the PCB design. For an IDE to recognize the hardware board, a Board Support Package(BSP) which includes hardware description and linker files for memory mapping are used and after programming, the hex files are generated. The resultant bitstream is passed to the following PCB design.
Introduction to FT2232H
The serial port of the computer usually meets RS-232 standard. It has signal voltage swing of around -13 to +13V. The PCB design uses TTL serial (Transistor-Transistor logic) which has signal voltage level between 0 and VDD ( 3.3V/1.8V). A common communication protocol is needed for data transfer, hence FT2232H is used for converting USB to serial converter.
For the data transfer from host to the target (board), we connect USB cable ( USB type A to the PC and Type B to the board). USB has 4 signals, 5V power supply signal, ground and 2 data signals(D+ and D-).
The data is transferred from these two data lines using NRZI encoding.
Data flow from USB port to FT2232H
According to USB communication protocol, data is sent through packets. It consists of 3 common packets.
Data field can carry varying size of data depending upon the speed at which data is transferred.
- For low speed devices, data can be upto 8B
- For full speed devices, data can be upto 1023B
- For high speed devices, data can be upto 1024B
Basically, the data transaction can be done in 4 types:
- Control: It is generally used by host for sending commands and parameters.
- Interrupt: It is used by devices for sending small amounts of data. It is a polled message from the host to request specific data of the device
- Bulk: this is used by devices for sending large amounts of data.
- Isochronous: this is generally used by devices like audio channels etc, for streaming real time data. FTDI supports bulk data transaction. Data is sent through endpoint buffers within the device. FT2232H can have a maximum packet size of 512B.
The following example code is considered to demonstrate how the data flows from one block to other. ( Image courtesy: Shivanishah/riscv)
The example code has a bitstream of 44bytes. This is sent through data packet in data field.














