#include <usbp_fpga.h>
Inheritance diagram for USB_FPGA:

Public Member Functions | |
| USB_FPGA () | |
| USB_FPGA (iUSB_Driver *ud) | |
| virtual | ~USB_FPGA () |
| void | setUSB (iUSB_Driver *ud) |
| virtual int | downloadConfigFile (string file) |
| The FPGA config will need a different implementation for each different FPGA type. | |
| int | configStart (void) |
| Start the FPGA configuration. | |
| int | configWrite (byte *b, int len) |
| Write the configuration bits to the FPGA. | |
| int | configEnd (void) |
| End the FPGA configuration. | |
| int | setupShadowReg (int ep, eXferType type=BULK, int num_reg=32) |
| FPGA generic register interface. | |
| int | writeShadowReg (byte *b, int start_addr, int len) |
| Write a set of registers from the FPGA. | |
| int | readShadowReg (byte *b, int start_addr, int len) |
| Read a set of register from the FPGA. | |
| int | setupDataXfer (int ep, eXferType type=BULK) |
| FPGA Data Xfer interface. | |
| int | writeData (byte *b, int len) |
| Write data to the FPGA. | |
| int | readData (byte *b, int len) |
| Read data from the FPGA. | |
Data Fields | |
| iUSB_Driver * | UsbD |
| Pointer to the USB interface. | |
Definition at line 36 of file usbp_fpga.h.
| USB_FPGA::USB_FPGA | ( | ) | [inline] |
Definition at line 44 of file usbp_fpga.h.
| USB_FPGA::USB_FPGA | ( | iUSB_Driver * | ud | ) | [inline] |
| virtual USB_FPGA::~USB_FPGA | ( | ) | [inline, virtual] |
| void USB_FPGA::setUSB | ( | iUSB_Driver * | ud | ) | [inline, virtual] |
| int USB_FPGA::downloadConfigFile | ( | string | file | ) | [virtual] |
The FPGA config will need a different implementation for each different FPGA type.
Implements iUSB_FPGA.
Reimplemented in XILINX_XS3.
Definition at line 184 of file usbp_fpga.cpp.
References UPL_OK.
| int USB_FPGA::configStart | ( | void | ) |
Start the FPGA configuration.
Definition at line 108 of file usbp_fpga.cpp.
References iUSB_Driver::controlWrite(), UPL_OK, and UsbD.
Referenced by XILINX_XS3::downloadConfigFile().
| int USB_FPGA::configWrite | ( | byte * | b, | |
| int | len | |||
| ) |
Write the configuration bits to the FPGA.
This isn't the most effecient way, currently using control writes (limited to 12Mbits/second). Should change to use EP1 (think this can do 2.0 High Speed, 480Mbits/second). Need to update the 8051 code. 8051: 1. Set mode, start config 2. Poll Endpoint 1 for config data 3. After all data sent, send end config command
Definition at line 138 of file usbp_fpga.cpp.
References iUSB_Driver::controlWrite(), UPL_OK, and UsbD.
Referenced by XILINX_XS3::downloadConfigFile().
| int USB_FPGA::configEnd | ( | void | ) |
End the FPGA configuration.
Definition at line 159 of file usbp_fpga.cpp.
References iUSB_Driver::controlWrite(), UPL_OK, and UsbD.
Referenced by XILINX_XS3::downloadConfigFile().
| int USB_FPGA::setupShadowReg | ( | int | ep, | |
| eXferType | type = BULK, |
|||
| int | num_reg = 32 | |||
| ) | [virtual] |
FPGA generic register interface.
Implements iUSB_FPGA.
Definition at line 25 of file usbp_fpga.cpp.
References UPL_OK.
| int USB_FPGA::writeShadowReg | ( | byte * | b, | |
| int | start_addr, | |||
| int | len | |||
| ) | [virtual] |
Write a set of registers from the FPGA.
Implements iUSB_FPGA.
Definition at line 36 of file usbp_fpga.cpp.
References UPL_OK.
| int USB_FPGA::readShadowReg | ( | byte * | b, | |
| int | start_addr, | |||
| int | len | |||
| ) | [virtual] |
Read a set of register from the FPGA.
Implements iUSB_FPGA.
Definition at line 47 of file usbp_fpga.cpp.
References UPL_OK.
| int USB_FPGA::setupDataXfer | ( | int | ep, | |
| eXferType | type = BULK | |||
| ) | [virtual] |
FPGA Data Xfer interface.
Transfer type and Endpoint.
Implements iUSB_FPGA.
Definition at line 58 of file usbp_fpga.cpp.
References UPL_OK.
| int USB_FPGA::writeData | ( | byte * | b, | |
| int | len | |||
| ) | [virtual] |
Write data to the FPGA.
Implements iUSB_FPGA.
Definition at line 69 of file usbp_fpga.cpp.
References iUSB_Driver::bulkWrite(), UPL_ERR, and UsbD.
| int USB_FPGA::readData | ( | byte * | b, | |
| int | len | |||
| ) | [virtual] |
Read data from the FPGA.
Implements iUSB_FPGA.
Definition at line 88 of file usbp_fpga.cpp.
References iUSB_Driver::bulkRead(), UPL_ERR, and UsbD.
Pointer to the USB interface.
Definition at line 42 of file usbp_fpga.h.
Referenced by configEnd(), configStart(), configWrite(), readData(), setUSB(), USB_FPGA(), writeData(), XILINX_XS3::XILINX_XS3(), ~USB_FPGA(), and XILINX_XS3::~XILINX_XS3().
1.5.1-p1