Pin Assignment
Pin Assignment
Chapter 4
Figure 4.1 illustrates the JTAG configuration setup. To download a configuration bit stream into the
Cyclone II FPGA, perform the following steps:
x
x
Configure the JTAG programming circuit by setting the RUN/PROG switch (on the left side
of the board) to the RUN position.
The FPGA can now be programmed by using the Quartus II Programmer module to select a
configuration bit stream file with the .sof filename extension
USB
PROG/RUN
MAX
3128
"RUN"
EPCS4
Serial
Configuration
Device
FPGA
The EPCS4 chip can now be programmed by using the Quartus II Programmer module to
select a configuration bit stream file with the .pof filename extension
Once the programming operation is finished, set the RUN/PROG switch back to the RUN
position and then reset the board by turning the power switch off and back on; this action
causes the new configuration data in the EPCS4 device to be loaded into the FPGA chip.
25
Quartus II
Programmer
AS Mode
USB
AS Mode
Config
MAX
3128
"PROG"
Auto
Power-on Config
EPCS4
Serial
Configuration
Device
FPGA
There are 27 user-controllable LEDs on the DE1 board. Eighteen red LEDs are situated above the
18 toggle switches, and eight green LEDs are found above the pushbutton switches (the 9th green
LED is in the middle of the 7-segment displays). Each LED is driven directly by a pin on the
Cyclone II FPGA; driving its associated pin to a high logic level turns the LED on, and driving the
pin low turns it off. A schematic diagram that shows the pushbutton and toggle switches is given in
Figure 4.4. A schematic diagram that shows the LED circuitry appears in Figure 4.5.
A list of the pin names on the Cyclone II FPGA that are connected to the toggle switches is given in
Table 4.1. Similarly, the pins used to connect to the pushbutton switches and LEDs are displayed in
Tables 4.2 and 4.3, respectively.
27
Description
SW[0]
PIN_L22
Toggle Switch[0]
SW[1]
PIN_L21
Toggle Switch[1]
SW[2]
PIN_M22
Toggle Switch[2]
SW[3]
PIN_V12
Toggle Switch[3]
SW[4]
PIN_W12
Toggle Switch[4]
SW[5]
PIN_U12
Toggle Switch[5]
SW[6]
PIN_U11
Toggle Switch[6]
SW[7]
PIN_M2
Toggle Switch[7]
28
SW[8]
PIN_M1
Toggle Switch[8]
SW[9]
PIN_L2
Toggle Switch[9]
Signal Name
Description
KEY[0]
PIN_R22
Pushbutton[0]
KEY[1]
PIN_R21
Pushbutton[1]
KEY[2]
PIN_T22
Pushbutton[2]
KEY[3]
PIN_T21
Pushbutton[3]
Description
LEDR[0]
PIN_R20
LED Red[0]
LEDR[1]
PIN_R19
LED Red[1]
LEDR[2]
PIN_U19
LED Red[2]
LEDR[3]
PIN_Y19
LED Red[3]
LEDR[4]
PIN_T18
LED Red[4]
LEDR[5]
PIN_V19
LED Red[5]
LEDR[6]
PIN_Y18
LED Red[6]
LEDR[7]
PIN_U18
LED Red[7]
LEDR[8]
PIN_R18
LED Red[8]
LEDR[9]
PIN_R17
LED Red[9]
LEDG[0]
PIN_U22
LED Green[0]
LEDG[1]
PIN_U21
LED Green[1]
LEDG[2]
PIN_V22
LED Green[2]
LEDG[3]
PIN_V21
LED Green[3]
LEDG[4]
PIN_W22
LED Green[4]
LEDG[5]
PIN_W21
LED Green[5]
LEDG[6]
PIN_Y22
LED Green[6]
LEDG[7]
PIN_Y21
LED Green[7]
29
30
Signal Name
Description
HEX0[0]
PIN_J2
HEX0[1]
PIN_J1
HEX0[2]
PIN_H2
HEX0[3]
PIN_H1
HEX0[4]
PIN_F2
HEX0[5]
PIN_F1
HEX0[6]
PIN_E2
HEX1[0]
PIN_E1
HEX1[1]
PIN_H6
HEX1[2]
PIN_H5
HEX1[3]
PIN_H4
HEX1[4]
PIN_G3
HEX1[5]
PIN_D2
HEX1[6]
PIN_D1
HEX2[0]
PIN_G5
HEX2[1]
PIN_G6
HEX2[2]
PIN_C2
HEX2[3]
PIN_C1
HEX2[4]
PIN_E3
HEX2[5]
PIN_E4
HEX2[6]
PIN_D3
HEX3[0]
PIN_F4
HEX3[1]
PIN_D5
HEX3[2]
PIN_D6
HEX3[3]
PIN_J4
HEX3[4]
PIN_L8
HEX3[5]
PIN_F3
HEX3[6]
PIN_D4
Description
CLOCK_27
PIN_D12, PIN_E12
CLOCK_50
PIN_L1
CLOCK_24
PIN_A12, PIN_B12
EXT_CLOCK
PIN_M21
32
Description
GPIO_0[0]
PIN_A13
33
GPIO_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25]
PIN_G18
GPIO_1[26]
PIN_G17
GPIO_1[27]
PIN_H17
GPIO_1[28]
PIN_J15
GPIO_1[29]
PIN_H18
GPIO_1[30]
PIN_N22
GPIO_1[31]
PIN_N21
GPIO_1[32]
PIN_P15
GPIO_1[33]
PIN_N15
GPIO_1[34]
PIN_P17
GPIO_1[35]
PIN_P18
35
During the data display interval the RGB data drives each pixel in turn across the row being
displayed. Finally, there is a time period called the front porch (d) where the RGB signals must
again be off before the next hsync pulse can occur. The timing of the vertical synchronization (vsync)
is the same as shown in Figure 4.12, except that a vsync pulse signifies the end of one frame and the
start of the next, and the data refers to the set of rows in the frame (horizontal timing). Figures 4.13
and 4.14 show, for different resolutions, the durations of time periods a, b, c, and d for both
horizontal and vertical timing.
The pin assignments between the Cyclone II FPGA and the VGA connector are listed in Table 4.8.
An example of code that drives a VGA display is described in Sections 5.2 and 5.3.
Configuration
Resolution(HxV)
a(us)
b(us)
c(us)
d(us)
VGA(60Hz)
640x480
3.8
1.9
25.4
0.6
Pixel clock(Mhz)
25
(640/c)
Resolution
(HxV)
a(lines)
b(lines)
c(lines)
d(lines)
33
480
10
640x480
Description
VGA_R[0]
PIN_D9
VGA Red[0]
VGA_R[1]
PIN_C9
VGA Red[1]
VGA_R[2]
PIN_A7
VGA Red[2]
VGA_R[3]
PIN_B7
VGA Red[3]
VGA_G[0]
PIN_B8
VGA Green[0]
VGA_G[1]
PIN_C10
VGA Green[1]
VGA_G[2]
PIN_B9
VGA Green[2]
VGA_G[3]
PIN_A8
VGA Green[3]
37
VGA_B[0]
PIN_A9
VGA Blue[0]
VGA_B[1]
PIN_D11
VGA Blue[1]
VGA_B[2]
PIN_A10
VGA Blue[2]
VGA_B[3]
PIN_B10
VGA Blue[3]
VGA_HS
PIN_A11
VGA H_SYNC
VGA_VS
PIN_B11
VGA V_SYNC
38
Signal Name
Description
AUD_ADCLRCK
PIN_A6
AUD_ADCDAT
PIN_B6
AUD_DACLRCK
PIN_A5
AUD_DACDAT
PIN_B5
AUD_XCK
PIN_B4
AUD_BCLK
PIN_A4
I2C_SCLK
PIN_A3
I2C Data
I2C_SDAT
PIN_B3
I2C Clock
Description
UART_RXD
PIN_F14
UART Receiver
UART_TXD
PIN_G12
UART Transmitter
39
Description
PS2_CLK
PIN_H15
PS/2 Clock
PS2_DAT
PIN_J14
PS/2 Data
40
Figure 4.23.
Figure 4.24.
SDRAM schematic.
SRAM schematic.
41
Figure 4.25.
Flash schematic.
Signal Name
Description
DRAM_ADDR[0]
PIN_W4
SDRAM Address[0]
DRAM_ADDR[1]
PIN_W5
SDRAM Address[1]
DRAM_ADDR[2]
PIN_Y3
SDRAM Address[2]
DRAM_ADDR[3]
PIN_Y4
SDRAM Address[3]
DRAM_ADDR[4]
PIN_R6
SDRAM Address[4]
DRAM_ADDR[5]
PIN_R5
SDRAM Address[5]
DRAM_ADDR[6]
PIN_P6
SDRAM Address[6]
DRAM_ADDR[7]
PIN_P5
SDRAM Address[7]
DRAM_ADDR[8]
PIN_P3
SDRAM Address[8]
DRAM_ADDR[9]
PIN_N4
SDRAM Address[9]
DRAM_ADDR[10]
PIN_W3
SDRAM Address[10]
DRAM_ADDR[11]
PIN_N6
SDRAM Address[11]
DRAM_DQ[0]
PIN_U1
SDRAM Data[0]
DRAM_DQ[1]
PIN_U2
SDRAM Data[1]
DRAM_DQ[2]
PIN_V1
SDRAM Data[2]
DRAM_DQ[3]
PIN_V2
SDRAM Data[3]
DRAM_DQ[4]
PIN_W1
SDRAM Data[4]
DRAM_DQ[5]
PIN_W2
SDRAM Data[5]
DRAM_DQ[6]
PIN_Y1
SDRAM Data[6]
42
DRAM_DQ[7]
PIN_Y2
SDRAM Data[7]
DRAM_DQ[8]
PIN_N1
SDRAM Data[8]
DRAM_DQ[9]
PIN_N2
SDRAM Data[9]
DRAM_DQ[10]
PIN_P1
SDRAM Data[10]
DRAM_DQ[11]
PIN_P2
SDRAM Data[11]
DRAM_DQ[12]
PIN_R1
SDRAM Data[12]
DRAM_DQ[13]
PIN_R2
SDRAM Data[13]
DRAM_DQ[14]
PIN_T1
SDRAM Data[14]
DRAM_DQ[15]
PIN_T2
SDRAM Data[15]
DRAM_BA_0
PIN_U3
DRAM_BA_1
PIN_V4
DRAM_LDQM
PIN_R7
DRAM_UDQM
PIN_M5
DRAM_RAS_N
PIN_T5
DRAM_CAS_N
PIN_T3
DRAM_CKE
PIN_N3
DRAM_CLK
PIN_U4
SDRAM Clock
DRAM_WE_N
PIN_R8
DRAM_CS_N
PIN_T6
Description
SRAM_ADDR[0]
PIN_AA3
SRAM Address[0]
SRAM_ADDR[1]
PIN_AB3
SRAM Address[1]
SRAM_ADDR[2]
PIN_AA4
SRAM Address[2]
SRAM_ADDR[3]
PIN_AB4
SRAM Address[3]
SRAM_ADDR[4]
PIN_AA5
SRAM Address[4]
SRAM_ADDR[5]
PIN_AB10
SRAM Address[5]
SRAM_ADDR[6]
PIN_AA11
SRAM Address[6]
SRAM_ADDR[7]
PIN_AB11
SRAM Address[7]
SRAM_ADDR[8]
PIN_V11
SRAM Address[8]
SRAM_ADDR[9]
PIN_W11
SRAM Address[9]
SRAM_ADDR[10]
PIN_R11
SRAM Address[10]
SRAM_ADDR[11]
PIN_T11
SRAM Address[11]
SRAM_ADDR[12]
PIN_Y10
SRAM Address[12]
SRAM_ADDR[13]
PIN_U10
SRAM Address[13]
43
SRAM_ADDR[14]
PIN_R10
SRAM Address[14]
SRAM_ADDR[15]
PIN_T7
SRAM Address[15]
SRAM_ADDR[16]
PIN_Y6
SRAM Address[16]
SRAM_ADDR[17]
PIN_Y5
SRAM Address[17]
SRAM_DQ[0]
PIN_AA6
SRAM Data[0]
SRAM_DQ[1]
PIN_AB6
SRAM Data[1]
SRAM_DQ[2]
PIN_AA7
SRAM Data[2]
SRAM_DQ[3]
PIN_AB7
SRAM Data[3]
SRAM_DQ[4]
PIN_AA8
SRAM Data[4]
SRAM_DQ[5]
PIN_AB8
SRAM Data[5]
SRAM_DQ[6]
PIN_AA9
SRAM Data[6]
SRAM_DQ[7]
PIN_AB9
SRAM Data[7]
SRAM_DQ[8]
PIN_Y9
SRAM Data[8]
SRAM_DQ[9]
PIN_W9
SRAM Data[9]
SRAM_DQ[10]
PIN_V9
SRAM Data[10]
SRAM_DQ[11]
PIN_U9
SRAM Data[11]
SRAM_DQ[12]
PIN_R9
SRAM Data[12]
SRAM_DQ[13]
PIN_W8
SRAM Data[13]
SRAM_DQ[14]
PIN_V8
SRAM Data[14]
SRAM_DQ[15]
PIN_U8
SRAM Data[15]
SRAM_WE_N
PIN_AA10
SRAM_OE_N
PIN_T8
SRAM_UB_N
PIN_W7
SRAM_LB_N
PIN_Y7
SRAM_CE_N
PIN_AB5
Description
FL_ADDR[0]
PIN_AB20
FLASH Address[0]
FL_ADDR[1]
PIN_AA14
FLASH Address[1]
FL_ADDR[2]
PIN_Y16
FLASH Address[2]
FL_ADDR[3]
PIN_R15
FLASH Address[3]
FL_ADDR[4]
PIN_T15
FLASH Address[4]
FL_ADDR[5]
PIN_U15
FLASH Address[5]
FL_ADDR[6]
PIN_V15
FLASH Address[6]
FL_ADDR[7]
PIN_W15
FLASH Address[7]
44
FL_ADDR[8]
PIN_R14
FLASH Address[8]
FL_ADDR[9]
PIN_Y13
FLASH Address[9]
FL_ADDR[10]
PIN_R12
FLASH Address[10]
FL_ADDR[11]
PIN_T12
FLASH Address[11]
FL_ADDR[12]
PIN_AB14
FLASH Address[12]
FL_ADDR[13]
PIN_AA13
FLASH Address[13]
FL_ADDR[14]
PIN_AB13
FLASH Address[14]
FL_ADDR[15]
PIN_AA12
FLASH Address[15]
FL_ADDR[16]
PIN_AB12
FLASH Address[16]
FL_ADDR[17]
PIN_AA20
FLASH Address[17]
FL_ADDR[18]
PIN_U14
FLASH Address[18]
FL_ADDR[19]
PIN_V14
FLASH Address[19]
FL_ADDR[20]
PIN_U13
FLASH Address[20]
FL_ADDR[21]
PIN_R13
FLASH Address[21]
FL_DQ[0]
PIN_AB16
FLASH Data[0]
FL_DQ[1]
PIN_AA16
FLASH Data[1]
FL_DQ[2]
PIN_AB17
FLASH Data[2]
FL_DQ[3]
PIN_AA17
FLASH Data[3]
FL_DQ[4]
PIN_AB18
FLASH Data[4]
FL_DQ[5]
PIN_AA18
FLASH Data[5]
FL_DQ[6]
PIN_AB19
FLASH Data[6]
FL_DQ[7]
PIN_AA19
FLASH Data[7]
FL_OE_N
PIN_AA15
FL_RST_N
PIN_W14
FLASH Reset
FL_WE_N
PIN_Y14
45