background image

 

Designing Hardware for QuickUSB

 

Slave245 I/O Model 

The Slave245 I/O Model allows QuickUSB to duplicate the functionality of the 
FTDI245BM I/O waveforms with a speed increase of up to 10X. This I/O model 
is implemented in the QuickUSB firmware file ‘quickusb-245 vX.XX.qusb’ where 
X.XX is the firmware version number. The following QuickUSB I/O connections 
are used for 245BM targets: 

QuickUSB Signal 

245BM Signal 

RDY0 (nSLRD) & PA2 (SLOE) 

RD# 

RDY1 (nSLWR) & PA5 (FIFOADR1) 

WR 

CTL2 (FLAGC) 

RXF#  

CTL1 (FLAGB ) 

TXE# 

PB0 D0 
PB1 D1 
PB2 D2 
PB3 D3 
PB4 D4 
PB5 D5 
PB6 D6 
PB7 D7 

Figure 3 - QuickUSB to 245BM Connection Table 

X

t

RDpwl

Read Cycle

Data0

t

XFDRD

t

RDpwh

Data1

Data2

t

XFLG

RD/SLOE

RDY0/PA2

WR/FIFOADR[1] RDY1/PA5

TXE

CTL2

RXF

CTL1

FD[7:0]

PB[7:0]

Name

PIN

X

X

Signifies QuickUSB Write to the Data Bus

t

XFDRD

X

X

t

ADRFLG

X

 

t

WRpwl

RD/SLOE

RDY0/PA2

WR/FIFOADR[1] RDY1/PA5

TXE

CTL2

RXF

CTL1

FD[7:0]

PB[7:0]

Name

PIN

Z

Write Cycle

Data0

t

SFD

t

WRpwh

t

FDH

Z

Data1

Z

Data2

t

XFLG

Z

Signifies QuickUSB Read from the Data Bus

X

Figure 4 - Slave245 I/O Model Timing Diagrams 

Parameter 

Description 

Min 

Max 

Unit 

tRDpwl 

SLRD Pulse Width Low 

50 

  ns 

tRDpwh 

SLRD Pulse Width High 

50 

  ns 

tWRpwl 

SLWR Pulse Width Low 

50 

  ns 

tWRpwh 

SLWR Pulse Width High 

70 

  ns 

tSFD 

SLWR to FIFO DATA Set-up Time 

10 

  ns 

tFDH 

FIFO DATA to SLWR Hold Time 

10 

  ns 

tXFLG 

SLRD/SLWR to Flags Output Propagation Delay 

 

70  ns 

tADRFLG 

SLWR/FIFOADR[1] to Flags Output Propagation 
Delay 

 10.7 

ns 

tXFDRD 

SLRD to FIFO Data Output Propagation Delay 

 

15  ns 

Figure 5 - Slave245 I/O Model Timing Parameters 

  20 

High Speed Parallel Port 

Содержание QuickUSB

Страница 1: ...Guide 6489 Calle Real Suite E Goleta CA 93117 Voice 805 683 6469 Fax 805 683 4833 Toll Free 800 224 1633 Web Site www bitwisesys com Information info bitwisesys com Technical Support support bitwisesy...

Страница 2: ...tems and is protected by United States and international copyright laws Use disclosure or reproduction is prohibited without the prior express written permission of Bitwise Systems except as agreed in...

Страница 3: ...l Purpose I O Pins 21 RS 232 21 I2C 21 SPI 22 QuickUSB Pin Definitions 23 Using the QuickUSB Library 39 Overview 39 How to Communicate with a Module 39 System Considerations 40 Blocking versus Non blo...

Страница 4: ...60 QuickUsbAsyncWait 61 General Purpose I O 62 QuickUsbReadPortDir 62 QuickUsbWritePortDir 62 QuickUsbReadPort 63 QuickUsbWritePort 63 RS 232 64 QuickUsbSetRs232BaudRate 64 QuickUsbGetNumRS232 64 Quic...

Страница 5: ...an browse www usb org and learn just about everything that there is to know about USB Just be careful because you can easily get distracted from what you really need to accomplish USB Nomenclature Con...

Страница 6: ...mended Another way to mitigate transfer latency issues is to minimize the amount of time that the USB subsystem waits to schedule USB packets You can accomplish this using asynchronous function calls...

Страница 7: ...n once the host configures the module This behavior is required by the USB specification The QuickUSB module incorporates a current limiting circuit that will shut down the VBUS pins on an over curren...

Страница 8: ...dels Overview The high speed parallel port HSPP is an 8 or 16 bit port that is used to transfer high speed data between the host PC and your device The WORDWIDE setting controls the data element width...

Страница 9: ...D and the address bus GPIFADR to read and write data to and from the target hardware The QuickUsbReadCommand and QuickUsbWriteCommand functions are used to perform command transfers They transfer data...

Страница 10: ...FCLK All CMD_DATA All REN or nREN All WEN or nWEN All nEMPTY FIFO Block nFULL FIFO Block nOE FIFO Block Table 1 GPIF Master Mode I O Connections GPIF Master Mode Timing Parameters Internally Sourced I...

Страница 11: ...RANSFER LENGTHS THAT MAY RESULT IN A FATAL SOFTWARE ERROR WHICH MAY CRASH YOUR COMPUTER The simplest valid transfer length calculation is to request data transfer lengths in multiples of 512 bytes for...

Страница 12: ...GPIFADR GPIFADR FD PB PD Name Pin Z Data0 Write Cycle Addr1 Data1 Addr2 Addr3 Addr4 Addr N 1 Addr N X Data2 Data3 Data4 Data N 1 Data N Z tSGA nEMPTY RDY0 nFULL RDY1 X tXCTL tIFCLK Addr N 1 X X X tXC...

Страница 13: ...s to the QuickUSB module Please note the FIFO timing requirements given in the Data Transfers section This I O model is implemented in the QuickUSB firmware file quickusb fifohs vX XX qusb where X XX...

Страница 14: ...peed Byte Wide N 63 High Speed Byte Wide N 511 Full Speed Word Wide N 31 High Speed Word Wide N 255 Addr1 Addr2 Addr N 1 Z tSGA IFCLK IFCLK tXGD CMD_DATA CTL0 REN CTL1 WEN CTL2 nREN CTL3 nWEN CTL4 nOE...

Страница 15: ...Y tRYH tSRYtRYH tSGA Signifies QuickUSB Read from the Data Bus Signifies QuickUSB Write to the Data Bus tXCTL tXCTL Data Transfers IFCLK IFCLK Addr0 X tDAH tSGD CMD_DATA CTL0 REN CTL1 WEN CTL2 nREN CT...

Страница 16: ...GTHS THAT MAY RESULT IN A FATAL SOFTWARE ERROR WHICH MAY CRASH YOUR COMPUTER The simplest valid transfer length calculation is to request data transfer lengths in multiples of 512 bytes for Hi Speed m...

Страница 17: ...yte Wide N 63 High Speed Byte Wide N 511 Full Speed Word Wide N 31 High Speed Word Wide N 255 IFCLK IFCLK Addr0 X tXGD CMD_DATA CTL0 REN CTL1 WEN CTL2 nREN CTL3 nWEN CTL4 nOE CTL5 GPIFADR GPIFADR FD P...

Страница 18: ...VALID TRANSFER LENGTHS THAT MAY RESULT IN A FATAL SOFTWARE ERROR WHICH MAY CRASH YOUR COMPUTER The simplest valid transfer length calculation is to request data transfer lengths in multiples of 512 by...

Страница 19: ...TL5 GPIFADR GPIFADR FD PB PD Name Pin Z Data0 Write Cycle Addr1 Data1 Addr2 Addr3 Addr4 Addr N 1 Addr N X Data2 Data3 Data4 Data N 1 Data N Z tSGA nEMPTY RDY0 nFULL RDY1 X tXCTL tIFCLK Addr N 1 X X X...

Страница 20: ...g The following signals are required for slave mode operation Pin Name Alternate Name Description Default Config IFCLK IFCLK Clock for synchronous I O Rising edge FD 15 0 PD 7 0 PB 7 0 Bi directional...

Страница 21: ...SRD tRDH FIFOADR 1 0 PA5 PA4 tSFA tFAH tFAFLG X X tFAFD tSRD tRDH tSFA tSRD tRDH X tFAH tFAFD tFAFLG X X X Z Data0 Data1 Data2 Data3 Data N 1 Data N 00 X Z X 00 nPKTEND PA6 Signifies QuickUSB Write to...

Страница 22: ...s tXFD Clock to FIFO Data Output Propagation Delay 11 15 ns tSWR SLWR to Clock Set up Time 18 1 12 1 ns tWRH Clock to SLWR Hold Time 0 3 6 ns tSFD FIFO Data to Clock Set up Time 9 2 3 2 ns tFDH Clock...

Страница 23: ...OADR 1 0 PA5 PA4 00 X X tSFA tFAH tFAH tOEon tOEoff tXFD tXFLG X X X nPKTEND PA6 Signifies QuickUSB Write to the Data Bus nSLCS PA7 Figure 2 Asynchronous Slave FIFO I O Model Timing Diagrams Parameter...

Страница 24: ...FIFOADR 1 RDY1 PA5 TXE CTL2 RXF CTL1 FD 7 0 PB 7 0 Name PIN X X Signifies QuickUSB Write to the Data Bus tXFDRD X X tADRFLG X tWRpwl RD SLOE RDY0 PA2 WR FIFOADR 1 RDY1 PA5 TXE CTL2 RXF CTL1 FD 7 0 PB...

Страница 25: ...LK nCONFIG nCONFIG PROGRAM nSTATUS nSTATUS INIT CONF_DONE CONF_DONE DONE Table 6 FPGA Configuration Signals General Purpose I O Pins The QuickUSB Module implements General Purpose I O Pins on Ports A...

Страница 26: ...I PE0 MISO PE5 X X D N 7 X X Signifies QuickUSB Write to MOSI D N 6 D 0 2 D 0 1 D 0 0 D N 5 D N 4 D N 3 D N 2 D N 1 SCLK PE1 Name Pin Write Read Cycle nSS 9 0 PA 7 0 PE 7 6 MOSI PE0 MISO PE5 Dout N 7...

Страница 27: ...tion is currently unused 83 5 PA1 nSS3 nINT1 I O Port A Bit 1 Multifunction Pin PA1 default is a bi directional general purpose I O pin nSS3 is the SPI slave select signal for Address 3 Automatically...

Страница 28: ...1 0 PA5 default is a bi directional general purpose I O pin Enabled when SETTING_FIFO_CONFIG 1 0 00 or 10 nSS7 is the SPI slave select signal for Address 7 See Note for nSS2 FIFOADR1 is an input only...

Страница 29: ..._CONFIG 1 0 00 FD0 default is the bi directional GPIF data bus low byte Enabled when SETTING_FIFO_CONFIG 1 0 10 45 23 PB1 FD1 I O Port B Bit 1 Multifunction Pin whose function is selected by SETTING_F...

Страница 30: ...when SETTING_FIFO_CONFIG 1 0 00 FD6 default is the bi directional GPIF data bus low byte Enabled when SETTING_FIFO_CONFIG 1 0 10 57 35 PB7 FD7 I O Port B Bit 7 Multifunction Pin whose function is sel...

Страница 31: ...abled when SETTING_FIFO_CONFIG 1 0 00 GPIFADR4 default is a GPIF address output pin Enabled when SETTING_FIFO_CONFIG 1 0 10 77 49 PC5 GPIFADR5 I O Port C Bit 5 Multifunction Pin whose function is sele...

Страница 32: ...IDE 0 FD9 default is the bi directional GPIF data bus Enabled when SETTING_FIFO_CONFIG 1 0 10 and when SETTING_WORDWIDE 1 104 61 PD2 FD10 I O Port D Bit 2 Multifunction Pin whose function is selected...

Страница 33: ...ING_WORDWIDE 0 FD13 is the bi directional GPIF data bus Enabled when SETTING_FIFO_CONFIG 1 0 10 and when SETTING_WORDWIDE 1 123 69 PD6 FD14 I O Port D Bit 6 Multifunction Pin whose function is selecte...

Страница 34: ...clock output signal for the SPI port Automatically switches functionality when using the SPI commands 110 62 PE2 nCE I O Port E Bit 2 Multifunction Pin PE2 is a bi directional general purpose I O por...

Страница 35: ...O if using SPI nSS0 nSS1 115 72 PE7 GPIFADR8 nSS1 I O Port E Bit 7 Multifunction Pin PE7 is a bi directional general purpose I O port Enabled when SETTING_FIFO_CONFIG 1 0 00 or 11 GPIFADR8 default is...

Страница 36: ...sitive This function is currently unused N A 12 RXD_0 Input Serial Port 0 RxD Serial Port 0 RxD Note If U1 is populated with a Linear Tech part QuickUSB Module uses EIA TIA 564 Levels If U1 is populat...

Страница 37: ...tput 2 Multifunction Pin whose function is selected by SETTING_FIFO_CONFIG 1 0 CTL2 default is a GPIF output signal whose function WEN is waveform specific Enabled when SETTING_FIFO_CONFIG 1 0 10 WEN...

Страница 38: ...TST is the Ready Test output signal for the Full Handshake I O Model RDYTST outputs the correct handshake waveform for the READY line so it can be connected to READY to test the Full Handshake functio...

Страница 39: ...ifunction Pin whose function is selected by SETTING_FIFO_CONFIG 1 0 RDY1 default is a GPIF input whose function nFULL is waveform specific Enabled when SETTING_FIFO_CONFIG 1 0 10 nFULL is an active lo...

Страница 40: ...D6 I O 88 N A D7 I O 8051 Data Bus 8051 Data Bus Bi directional bus used for external 8051 program and data memory High Impedance when inactive Active only for external bus accesses Driven low in susp...

Страница 41: ...A VCC Power VCC VCC Connect VCC to 3 3V Power Source 107 N A VCC Power VCC VCC Connect VCC to 3 3V Power Source 10 N A AVCC N A Analog VCC ANALOG VCC connect to 3 3V power source Provides power to th...

Страница 42: ...116 N A GND N A Ground Ground 125 N A GND N A Ground Ground 14 N A NC N A No Connect This pin must be left open 15 N A NC N A No Connect This pin must be left open 16 N A NC N A No Connect This pin mu...

Страница 43: ...uickUSB Library directly from your programming language For instance your application will include a file that has all the QuickUSB function declarations then from your code you would call the appropr...

Страница 44: ...lows a user to make both Blocking QuickUsbReadData and QuickUsbWriteData and Non blocking QuickUsbReadDataAsync and QuickUsbWriteDataAsync data transfer calls When called the Blocking functions will i...

Страница 45: ...ters For example after executing this function with one module connected nameList will contain QUSB 0 0 0 If there are two devices plugged in nameList will contain QUSB 0 0QUSB 1 0 0 Notes This routin...

Страница 46: ...string descriptor index given in the following table buffer A PCHAR that points to a buffer in which to place the string descriptor The buffer should be at least 128 bytes long length A WORD that con...

Страница 47: ...major version number minor A PWORD that points to a variable in which to place the minor version number build A PWORD that points to a variable in which to place the build number Returns A LONG that...

Страница 48: ...aining 1 Notes Error Code Error Description 0 No error 1 Out of memory Please free some memory and try again 2 Cannot open module 3 Cannot find specified QuickUSB module Please check the specified mod...

Страница 49: ...ion 0 Output 1 Input Bit 13 12 Type Defines EP2 Type 00 Invalid 01 Isochronous 10 Bulk 11 Interrupt Bit 11 Size Sets Size of EP2 Buffer 0 512 Bytes 1 1024 Bytes Bit 10 Unused R O 0 Bit 9 8 Buf EP2 Buf...

Страница 50: ...Sets the FIFO configuration Controls the FX2 IFCONFIG register MSB FIFOINPOLAR Slave FIFO Interface Pins Polarity Bit Definitions Bit 15 14 Unused R O 0 Bit 13 PKTEND FIFO Packet End Polarity 0 Activ...

Страница 51: ...0 Force full speed 12Mbps 1 Allow high speed 480Mbps Bit 14 8 Reserved for future use LSB CPUCS Bit definitions Bit 7 6 Unused R O 0 Bit 5 Reserved do not change Bit 4 3 CLKSPD CPU clock speed 00 12MH...

Страница 52: ...l completion 00001010 Slave wait 00001011 Timeout LSB I2CTL I2C Compatible Bus Control Bit definitions Bit 7 2 Reserved for future use Bit 1 Reserved Do not change Bit 0 400KHz Sets I2C bus clock spee...

Страница 53: ..._PORTE Configures Port E default state Reading a bit from IOE returns the logic level of the port pin that is two CLKOUT clocks old Writing a register bit to IOE writes to the port pin latch The port...

Страница 54: ...FLAGA and FLAGB Pin Configuration Bit 15 12 FLAGB FLAGB Show the status of the FIFO Flag selected by programming these bits with the code given below Bit 11 8 FLAGA FLAGA shows the status of the FIFO...

Страница 55: ...settings Parameters hDevice A HANDLE that was returned from a call to QuickUsbOpen address A WORD containing the setting address number setting A PWORD pointing to a variable in which to place the val...

Страница 56: ...which to place the value of the default if successful Returns A LONG that is non zero on success zero 0 on failure Notes None QuickUsbWriteDefault Purpose To write QuickUSB module defaults The default...

Страница 57: ...guration file and read a block into a buffer 3 Call QuickUsbWriteFpgaData and pass in the data from the file Repeat this process until the entire file is sent Of course the last block will probably be...

Страница 58: ...es The maximum data length is 64 A call to QuickUsbStartFpgaConfiguration must precede FPGA configuration QuickUsbIsFpgaConfigured Purpose Check to see if the FPGA is configured Parameters hDevice A H...

Страница 59: ...not be incremented after each read data A pointer to a buffer in which to place data read from the high speed parallel port See notes length A PWORD pointing to a WORD containing the number of bytes t...

Страница 60: ...then the address will not be incremented after each write data A pointer to a buffer containing the data to write to the high speed parallel port See notes length A WORD containing the number of bytes...

Страница 61: ...nections In order to obtain the maximum performance call this function with the largest appropriate length value Each call to this function will incur one call latency delay regardless of the transfer...

Страница 62: ...ength is 16 megabytes 16777216 bytes The data buffer can contain data values of any type In master mode data values are transferred over the high speed parallel port with the CMD_DATA line set to 0 In...

Страница 63: ...the operating system Failure to follow this procedure will result in a memory leak and an eventual system crash The maximum length is 16 megabytes 16777216 bytes The data buffer can receive data valu...

Страница 64: ...operating system Failure to follow this procedure will result in a memory leak and an eventual system crash The maximum length is 16 megabytes 16777216 bytes The data buffer can receive data values o...

Страница 65: ...ction call transaction A BYTE transaction identifier returned by QuickUsbReadDataAsync or QuickUsbWriteDataAsync immediate A BYTE value If nonzero the driver will not wait the default timeout value fo...

Страница 66: ...QuickUsbOpen address A BYTE containing the port address Ports are addressed 0 to 4 corresponding to port A E data A PBYTE to a BYTE in which to place the data direction bit values Each bit in data cor...

Страница 67: ...m length is 64 bytes Returns A non zero value if successful 0 otherwise Also returns the read value in value if successful Otherwise value is not modified Notes None QuickUsbWritePort Purpose None Par...

Страница 68: ...independently Parameters hDevice A HANDLE that was returned from a call to QuickUsbOpen baudRate An unsigned long integer 32 bits containing the baud rate in bits per second Returns A non zero value i...

Страница 69: ...port Parameters hDevice A HANDLE that was returned from a call to QuickUsbOpen portNum The serial port number Serial port 0 P1 0 serial port 1 P2 1 data A pointer to a buffer in which to place the dat...

Страница 70: ...ial port Parameters hDevice A HANDLE that was returned from a call to QuickUsbOpen portNum The serial port number Serial port 0 P1 0 serial port 1 P2 1 data A pointer to a buffer containing the data l...

Страница 71: ...inter to a buffer in which to place the data length The length of the data buffer in bytes The maximum length is 64 bytes Returns A non zero value if successful 0 otherwise In addition length is set t...

Страница 72: ...d from data A pointer to a buffer in which to place the received data length A pointer to the number of bytes to read The maximum length is 64 bytes Returns A non zero value if successful 0 otherwise...

Страница 73: ...e the received data length The number of bytes to send and receive The maximum length is 64 bytes Returns A non zero value if successful 0 otherwise In addition the data buffer is filled with the rece...

Страница 74: ...ynchronous slave FIFO 17 I O Model simple 7 I O Models master mode 6 I O Pins unused 4 IFCLK 5 interpacket delay 2 interrupt 1 latency 2 master 1 mode GPIF master 5 OE5 pipe 1 Power 3 power supply ext...

Отзывы:

Похожие инструкции для QuickUSB