XS40 Prototyping Board

(XC4005XL FPGA)

Contents This document gives a brief description of the XS40 board and should be sufficient to get you started with the labs. For a more detailed description of the board, consult the XESS Corp. website or the references at the end of the document.

The XS40 is a convenient board for implementing and experimenting with FPGA designs. In contrast to the FPGA Demoboard, the XS40 board contains additional components such as a 8031 microcontroller, SRAM (32 KB for the XS-005XL and 128 KB for the XS-005XL+ boards), a 100 MHz programmable oscillator, a parallel port, PS/2 port for a mouse or keyboard, and a VGA monitor port. This makes it a convenient system to implement not only FPGA designs but also microcontroller applications with the FPGA as a coprocessor and the SRAM for data/program storage. The board can be programmed through a parallel port. The FPGA can also be tested using the XSPORT utility that allows you to apply test signals through the parallel port.

The board has a XC4005XL FPGA which contains 9,000 gates and operates at 3.3V but is it 5V tolerant. It has a breadboard interface that allows you to plug the board into a breadboard so that you can easily access its pins. A schematic diagram of the board is given in Figure 1 below. The board can be configured for different purposes, such as use in a design environment (default) or use as a stand-alone board, reprogramming the clock, etc. The mode of operation is determined by jumpers. The settings of the jumpers and the correspondent configurations are explained later on in Table 6

.

Figure 1: Schematic diagram of the XS40 board.

Notice that the FPGA chip is volatile which implies that it needs to be reprogrammed every time you switch off the power supply and restart the board. If you like to use the board by itself without having to reprogram it through the parallel port, you can download the configuration file in an on-board EEPROM. The XS40 board allows you to do so. Every time that you start the board, the configuration file will now be loaded into the FPGA from the serial EEPROM. How to program the EEPROM using the XS40 board is explained in the section on "configuring a FPGA with the XS40 board".

Power supply

The XS40 board is powered through a 9V DC supply. This can be easily done using a 9V AC adapter (300 mA) which plugs into a 9V DC jack, with a center positive terminal. The board has two voltage regulators that generate the 3.3V for the FPGA and 5V for the rest of the components. Pin 2 of the board is connected to 5V, pin 54 to 3.3V and pin 52 is connected to the ground. See also pins of the FPGA.

Seven-segment Display

The XS40 board contains one 7-segment LED display whose elements are connected to one of the pins of the FPGA. The pin I/O connections of the display to the FPGA are shown in the table below. A 220W resistor is placed between the LED element and the ground to limit the current needed from the FPGA output. A schematic diagram of the LED circuit used in the display and the numbering of the elements is shown in Figure 3. The LEDs are active-high, which implies that they will light up when a logic "1" is applied to their terminal.

Table 1: Pin connection of the 7-segment LED display

Segment 
XC4005XL Pin
a
S6
19
b
S4
23
c
S1
26
d
S0
25
e
S2
24
f
S5
18
g
S3
20

Figure 3: Seven-segment display: (a) LED segments and (b) LED connection

On-board clock

A 100 MHz programmable oscillator is available. The clock is connected to the clock input (GCK1) of the XC4005XL FPGA on pin number 13.

The default setting of the clock on the XS40 V1.4 is 50 MHz. This frequency can be re-programmed by dividing the 100 MHz master clock by any integer from 1 to 2052, resulting in frequencies ranging between 100 MHz and 48.7 KHz.

Programming the clock oscillator

Before reprogramming the oscillator you need to put the oscillator in the programming mode. This is done by placing a shunt on jumper J12 (see Figure 1). Do the following steps (exactly in this sequence):

    1. Remove the power from the XS40 board
    2. Remove the parallel download cable (only after removing the power)
    3. Place a shunt on jumper J12 (Figure 1)
    4. Attach the parallel download cable
    5. Connect the power cable
    6. In the Xstools/bin directory, click on the GXSSETCLK.exe icon. This will open the "XS board divisor frequency" window shown in Figure 4. Select the board type (e.g. XS40-005XL) and type in the divisor frequency. Leave the External Clock box unchecked. Next, click on the SET button. The frequency divisor is stored in non-volatile memory of the oscillator and does not need to be re-entered when you start up the board unless you want to change the frequency. (NOTE: if you don't have the GSSETCLK program, you can program the oscillator by going to a DOS window and typing the following command:

    7.  

       
       
       

      C:\> XSSETCLK Board_Type Divisor

      As an example, in case you want to run the oscillator at 5 MHz (divisor of 20), you would give the following command,

      C:\ > XSSETCLK XS40-005XL 20

    8. Repeat steps 1 and 2.
    9. Remove the shunt from jumper J12.
    10. Re-attach the download and the power cables (in this sequence).
Figure 4: Set XS Board Clock Frequency window (Screen clip from XESS (TM) GXtools)
At start up the oscillator will now be in its active mode and give an output clock of the programmed frequency. You can always check the clock frequency on an oscilloscope by connecting a scope probe to pin 13 of the FPGA.

Parallel Port

The XS40 board is programmed through a PC parallel port, using a female DB25 connector on the XS40, labeled J1 in Figure 1. The PC can then transmit signals to the XS40 board for programming the FPGA or testing later on. Communication from the board to the PC is also possible through the status input pins of the PC parallel port.

In case you want to download test signals to the FPGA, this can be done through pins 2 to 9 of the parallel port J1.

Table 2 gives the pin numbers of the J1 connector, the corresponding XC4005 pins and the XSPORT arguments. It should be noted that pins 2 and 3 of J1 are connected to an inverting Schmitt-trigger in order to clean up high frequency clock signals through built-in hysteris. This makes the two pins suitable for clock input signals in sequential circuits. If you are using the XSPORT program, you do not need to worry about the inversion since the program accounts for the inversion of these two signals.

Table 2: Pin correspondence between the parallel port J1, the XS4005 chip and the XSPORT arguments

J1 Pin
XC4005 Pin
XSPORT argument
2
( with inverting Schmitt-trigger)
44
D0
3
( with inverting Schmitt-trigger)
45
D1
4
46
D2
5
47
D3
6
48
D4
7
49
D5
8
32*
D6
9
34*
D7

Note: The pins 32 and 34 correspond to the special purpose pins M0 and M2 of the FPGA which determine the mode of the device at power-up. This implies that in order to use these pins for a regular input signal, you need to place special symbol PADs on the schematic: MD0 and MD2. This will automatically assign the pin numbers 32 and 34 to these pads, respectively.

SRAM

The XS40 boards are equipped with static RAM that can be used to store data for FPGA based designs or can be used in conjunction with the microcontroller to store programs or data. The XS40-005 has 32 Kbyte while the XS4005XL+ has 128 Kbyte of SRAM. The RAM is organized as a 32K x 8 bit, or 128K x 8 bit memory devices. Connections between the memory and the FPGA and microcontroller are made on the board. A schematic of the memory package and pin names is shown in Figure 5. The 32Kbyte and 128Kbye memory has 14 and 16 address pins, respectively. The correspondence between the SRAM pins, the XC4005XL and the microcontroller pins are given in Table 4. The Chip Enable (/CE1, /CE2), Output Enable (/OE) and Write Enable (/WE) are active low signals. The /CE2 pin is always connected to the Vdd while, the /CE1 pin is pulled high through a 4.7kW resistor in order to disable the RAM when the FPGA is being configured. This pin is connected to pin 65 of the FPGA and can be driven low when needed. The /OE1 is driven by the FPGA through pin 61. The /WE signal comes from the microcontroller (Port 3, pin P3.6) and is also connected to pin 62 of the FPGA.
 
 

Figure 5: SRAM memory chip used on the XS40 board (32Kbyte or 128Kbyte)
 

Table 4: Correspondence between the SRAM, XC4005XL and the microcontroller pins.

SRAM Pin Function
XC4005XL Pin No.
Microcontroller Pin No.
A0
3
 
A1
4
 
A2
5
 
A3
78
 
A4
79
 
A5
82
 
A6
83
 
A7
84
 
A8
59
P2.0 (A8)
A9
57
P2.1 (A9)
A10
51
P2.2 (A10)
A11
56
P2.3 (A11)
A12
50
P2.4 (A12)
A13
58
P2.5 (A13)
A14
60
P2.6 (A14)
A15*
28
P2.7 (A15)
A16*
16
-
D0
41
P0.0 (A0/D0)
D1
40
P0.1 (A1/D1)
D2
39
P0.2 (A2/D2)
D3
38
P0.3 (A3/D3)
D4
35
P0.4 (A4/D4)
D5
81
P0.5 (A5/D5)
D6
80
P0.6 (A6/D6)
D7
10
P0.7 (A7/D7)
/CE1
65
 
/CE2 (to +5V)
-
 
/OE
61
 
/WE
62
P3.6 (/WR)
* Only for the XS40+ board with the 128KB SRAM


8031 Microcontroller

A 8031 microcontroller is resident on-board and is powered by the XS40 power supply. Connections to the FPGA and SRAM are made on the board. The INTEL 8031 is a 8-bit controller with, data and program memory, bi-directional and individually addressable I/O lines and full duplex serial port.

The microcontroller multiplexes the eight lower address bits [A0:A7] and the data bits [D0:D7] on port P0 which is connected to both the SRAM data bus and FPGA. Data between the microcontroller and the SRAM is exchanged through this connection. When the lower address bits are present on this port, the microcontroller will generate an ALE signal that latches the address bits in the FPGA which sends them to the lower eight address lines of the SRAM. For the connections between the FPGA, microcontroller and SRAM see Table 4 and Table 5.

Table 5: Correspondence between the 8031 microcontroller pin functions and the SRAM and XC4005XL FPGA pin
Microcontroller Pin
SRAM Pin function
XC4005XL pin number
Other
XTAL1 (clock input)
-
37
 
RST (Reset)
-
36
 
ALE (address latch enable)
-
29
 
/PSEN (Prog. Store enable)
-
14
 
P0.0 (A0/D0)
D0
41
 
P0.1 (A1/D1)
D1
40
 
P0.2 (A2/D2)
D2
39
 
P0.3 (A3/D3)
D3
38
 
P0.4 (A4/D4)
D4
35
 
P0.5 (A5/D5)
D5
81
 
P0.6 (A6/D6)
D6
80
 
P0.7 (A7/D7)
D7
10
 
P1.0
-
7
 
P1.1
-
8
 
P1.2
-
9
 
P1.3
-
6
 
P1.4
-
77
Parallel status input 
PC-S4
P1.5
-
70
PC-S3
P1.6
-
66
PC-S5
P1.7
-
67
VSYNC of VGA
P2.0 (A8)
A8
59
 
P2.1 (A9)
A9
57
 
P2.2 (A10)
A10
51
 
P2.3 (A11)
A11
56
 
P2.4 (A12)
A12
50
 
P2.5 (A13)
A13
58
 
P2.6 (A14)
A14
60
 
P2.7 (A15)
A15*
28
 
P3.0 (RXD- serial input)
     
P3.1 (TXD-serial output)
 
69
KB_DATA (PS/2);
PC-S6 (Status)
P3.2 (/INT0-ext interrupt 0)
     
P3.3 (/INT1- interrupt 1)
     
P3.4 (T0 - timer 0 ext input)
 
68
KB_CLK (PS/2)
P3.5 (T1- timer 1 ext input)
     
P3.6 (/WR -ext data memory write strobe))
/WE
62
 
P3.7 (/RD- ext data memory read strobe)
 
27
 
* Only on the SC40+ board with 128KB SRAM
For the 32KB SRAM, the upper 7 memory address bits, [A8:A14] are connected to the Port 2 of the microcontroller, [P2.0:P2:6]. For the board that is populated with an 128 KB SRAM, the memory bits [A8:A15] are connected to Port 2, [P2.0:P2.7], while memory address bit A16 is connected to pin 16 of the FPGA. Port 2 is also connected to the FPGA so that it can decode the address. For a more complete description of the microcontroller connection, consult the XS40 user manual [1].

PS/2 Mouse or Keyboard connector J5

The XS40 board has a connector (J5 in Figure 1) that accepts inputs from a keyboard or a mouse. You will need a keyboard driver circuit that can be downloaded from the XESS homepage, (http://www.xess.com). The Data and Clock lines are connected to port P3.1 and P3.4 of the microcontroller, and to pins 69 and 68 of the FPGA, respectively (see Table 7).

VGA Monitor connector J2

A 15-pin connector (J2) is available to connect a VGA monitor. This can be used to display images on the monitor. In order to do so, you will first need to download a VGA driver circuit to the XS40 board. Examples of drivers are available on the XESS Corp. homepage, (http://www.xess.com). Connections of the VGA port to the FPGA are given in Table 7.

Table 7: Connection of the PS/2 port and the VGA monitor inputs

VGA Inputs
FPGA Pin
Microcontroller pin
Vertical SYNC
67
Port P1.7 
Horizontal SYNC
19
 
Red1
18
 
Red0
23
 
Green1
20
 
Green0
24
 
Blue1
26
 
Blue0
25
 
PS/2 Port    
Data
69
Port P3.1
Clock
68
Port P3.4

Jumpers

If you are using the board in a normal design environment for downloading a configuration file from a PC through the parallel port, you can leave the default jumper settings. For any other use, select the jumpers settings as explained in Table 6. See Fig. 1 for the jumper numbers.

Table 6: Jumper settings for the XS40 board

Jumper
Setting
Description
J4
ON (default)
Install a shunt for downloading through the PC parallel port.
Off
Remove the shunt to configure the XS40 Board from the on-board serial EEPROM (U7).
J6
On
Install a shunt for programming the on-board serial EEPROM (U7).
Off (default)
Remove the shunt for normal board use (downloading the configuration file to the FPGA through the parallel port).
J7
1-2 (ext) (default)
Install a shunt on pins 1 and 2 (ext) if the 8031 microcontroller program is stored in the external SRAM (U8) of the XS40 Board.
2-3 (int)
Install a shunt on pins 2 and 3 (int) if the program is stored internally in the microcontroller.
J8
On

(default)

When the XS40 Board uses the 3.3V XC4000XL type of FPGAs.
Off
When the XS40 Board uses the 5V XC400E type of FPGAs.
J10
On
To configure the XS40 Board from the on-board serial EEPROM (U7).
Off (default)
Remove the shunt for downloading through the PC parallel port.
J11
On (default)
Install a shunt for downloading through the PC parallel port.
Off
To configure the XS40 Board from the on-board serial EEPROM (U7).
J12
1-2 (osc) (default)
Place a shunt over pins 1-2 for normal operations when the programmable oscillator is generating a clock signal.
2-3 (set)
Place a shunt over pins 2-3 to set the programmable oscillator frequency.

Testing the XS40 Board

Place the jumpers in the default setting, connect the cable between the PC parallel port and the J1 connector, and power up the board. Go to the XSTOOLS/BIN folder and launch the GXSTEST program. This will open the XS Board test utility, shown in Figure 6. Select the proper board type (ex. XS40-005XL) and press the TEST button. A message will appear in the window indicating the status of the test. If the test is successful, the LED on the board will display a 0, otherwise an E will be displayed to indicate an error. If an error occurs, check the parallel port connection and verify that the jumpers are in the proper location.

Figure 6: XS Board Test Window  (Screen clip from XESS (TM) GXtools)

References:

  1. XS40, XSP Board V1.4 User Manual, XESS Corp, Apex, NC, 1999 (available from the XESS website: http://www.xess.com/). This file contains a detailed schematic of the XS40 board.
  2. The Practical Xilinx Designer Lab Book, David Van den Bout, Prentice Hall, Upper Saddle River, 1999.
  3. The 8051 Cross Assembler User manual, Metalink Corp, Chandler, AZ, 1996 (see also http://www.xess.com/asm51.pdf at the XESS Corp. website)
  4. INTEL 80C31/80C51 8-bit Microcontroller Datasheet, INTEL Corp, 1995 (http://apps.intel.com/product_selector/showdetail.asp?prod=N80C31BH%2D12#section1)


Back to the Foundation Tutorial table of Contents
Go to tutorial: Entering a Schematic | Entering a design with ABEL  | Entering a design with VHDL| Simulation | Macros and Hierarchical design | State Editor  |  Design Implementation | Configuring a device  | Common Mistakes |
Board description: FPGA Demoboard | XS40 | XS95 |
Pinouts: XC4000 | XC9500.

Created by Jan Van der Spiegel <jan@ee.upenn.edu>;Updated June 4, 2000.