Lal Usb Interface Vlsi 2010
Lal Usb Interface Vlsi 2010
Lal Usb Interface Vlsi 2010
Package
For Test Bench Development
D.Breton, C.Cheikali, J.Maalmi (LAL Orsay)
Introduction
USB 1.1 (~ 1 MBytes/s) Interface based on the FT245B circuit from
FTDI.
A specific frame protocol has been defined to cover all usual
acquisition modes.
Data acquisition can be driven either by the program or by the peripheral.
Interruptions are provided.
Requires just a few components on the board and little firmware in users
FPGA.
Software offers a complete library for Windows and Linux.
C and LabView kits are available
A configuration and test program is also provided
Library +
Test Software
Altera Config
EEPROM
n_config
nsco,
dclk,asdi,
epc_data
conf_done
data
FTDI chip
OSC
RD
WR
RXF
TXE
USB
Interface
Block
FTDI config
EEPROM
FPGA
USB connector
USB
Interface
Block
PC
FPGA
FT245
Config
EEPROM
OSC
User Interface
The USB Interface Block is entirely written in Verilog and can be implemented
on any type of FPGA (Altera, Xilinx, Actel )
subadd
7
F
T
D
I
chip
data
usb_data
RD
WR
RXF
TXE
User Interface
element 1
8
n_read
8
USB
Interface
Block
n_write
busy
n_sync
interrupt
read_req
n_wait
User Interface
element N
single_data_bus
FPGA
Octet\bit
b7
b6 b5 b4 b3 b2 b1 b0
Header
1
0 1 0 1 0 1 0
Control 1
Nb of words 1 (N 1)
Control 2 R/W*
Subadd
Data x N**
Data byte x N**
Trailer
0
1 0 1 0 1 0 1
* 0 for the writing, ** N < 256
Tab 1: format of a write data frame.
Octet\bit
b7
b6 b5 b4 b3 b2 b1 b0
Header
1
0 1 0 1 0 1 0
Control 1
Nb of words 1 (N 1) => LSB
Control 2 R/W*
Subadd
Data x N**
Data byte x N**
Trailer
0
1 0 1 0 1 0 1
* 1 for the reading, ** N < 65536
Tab 3: format of a read frame.
Jihane Maalmi Journes VLSI IN2P3 2010
Use of n_wait
For the slow peripherals, n_write and n_read can be retained as long
as necessary thanks to the n_wait signal.
Use of busy
The busy signal is used during all types of access. During standard
read or write operations, it just covers the phase where acess is made
to the peripheral.
Interrupts
There are two types of interrups :
Error Frames Interrupts (Header or Trailer) that are generated by the
USB_Interface_Block
User Interrupts that are generated by the peripheral user.
Octet\bit
Header
Control 1
Control 2
Data
Trailer
b7
1
0
0
b6
0
0
b5 b4 b3
1 0 1
0 0 0
Subadd
Status byte
0 1 0
b2 b1
0 1
0 0
b0
0
0
Extended Read
Tab 5 describes the format of the frame transmitted to the computer
after a read-request triggered by the user.
This type of frame permits a peripheral-driven acquisition mode of
blocks up to 256 bytes.
This mode is supposed to offer the fastest dataflow
Octet\bit b7 b6 b5 b4 b3 b2 b1 b0
Header
1 0 1 0 1 0 1 0
Control 1
Nb of words 1 (N 1)
Control 2 1
Subadd = 0x7F
Data x N*
Data byte x N*
Trailer
0 1 0 1 0 1 0 1
* N < 256
Tab 5: format of read request frame.
LALUsb has been designed to free the user from knowing about LAL frames
format, for neither encoding nor decoding.
LALUsb is mainly used as a shared library (DLL) but a static version (.lib
file) is also available.
Examples of functions
Device initialization, open and close
int UsbWrt (int id, char sub_addr, void *buffer, int count);
int UsbRd (int id, char sub_addr, void *array, int count);
(Windows 2000
SP2, XP and Vista, MacOS X,
Linux)
Board Examples
The FT245B-based interface has been used in IN2P3 and IRFU for different boards:
The MATACQ14
14-bit/2GS/s
digitizer board
The Lumi_PM
test board
for ATLAS
luminometer
The MAROC2_USB
test board
for ATLAS Luminometer
Software Examples
FT2232H also offers a synchronous interface that adds only two wires
to the FPGA interface but is supposed to reach 25 MBytes/s. (to be
tested soon)
Possible changes for the user interface
no change for the software
Documentation
Documentation of the LAL USB
Interface based on the FT245 chip
SERVICE ELECTRONIQUE
The current document seeks to describe a USB interface implementation proposal based
on the FTDI FT245B circuit. The latter in fact being only a byte pipe, a framing protocol for
distinguishing bytes is also proposed. The objective is to obtain a plug and play
combination comprising the interface part of the board, the decoding block to integrate in a
FPGA on the user side and the graphic interface software running on PC and MacIntosh.
Furthermore, the user side FPGA interface seeks to be the simplest possible, while offering all
of the different current modes of functioning in data acquisition systems. To this end, three
types of interfaces are offered.
LALUsbV2
Readme Windows 2000/XP
V1.2.0.0
C.CHEIKALI LAL Orsay
29/09/07
- DRAFT -
This document describes LALUsb library and includes a user manual (description, installation) and a programmers guide
holding all the functions reference. Its been written on a temporary basis before the real version coming soon.
Conclusion
We have designed a very simple to use USB package
It is Plug&Play
It includes hardware, firmware and software
It is available with different FTDI chips, depending on the application ()
A specific protocol has been developped, permitting all types of data
transfer
1MByte/s versions have been used for 3 years for different labs and
boards
5 to 25 (?) MBytes/S version is being developped
Hardware is already available for board design