f 4a - faculty.kfupm.edu.sa€¦ · ple based on) installa. download window s 12, kfupm. ohammad s...
TRANSCRIPT
Elec
This t
for F
exam
A1
© 20
Dr. M
ctrical Engi
tutorial provi
FPGA synthes
mple based on
A) Installa1. Download
window s
012, KFUPM.
Mohammad S
ineering D
ides step by s
sis and imple
n the NEXYS 2
tion Stepsd the XILINX I
hown in Figu
S. Sharawi
Departmen
step instructio
ementations.
2 prototyping
s: SE tool from
re 1A. Choose
t
ons for the in
In addition,
board from D
the internet (
e ISE WebPac
F
nstallation pro
it goes throu
Digilent Inc.
(~6GB). And S
ck.
Figure 1A
ocedure for t
ugh a comple
Start the insta
the Xilinx ISE
ete synthesis
allation proce
V14.2 design
s and board
ess. You will g
n environmen
programming
get the
1
t
g
22. Select thee tools to be installed as shhown in Figur
F
F
re 2A and the
Figure 2A
Figure 3A
destination llocation as in
Figure 3A.
22
33. The instal
once pro
Figure 5A
llation proces
mpted durin
, and you hav
ss will start a
g the last po
ve to register
as shown in F
ortion of the
through Xilin
F
F
Figure 4A. Allo
e installation.
nx website to
Figure 4A
Figure 5A
ow the vario
. Choose the
get a valid lic
us drivers an
e Free Web P
cense.
nd packages t
Pack License
3
to be installed
e as shown in
3
d
n
44. Register f
You will g
Save the l
location o
or a user acco
et a license fi
icense file in
of the saved li
ount on Xilinx
ile via email f
a specific fold
icense file.
x website to g
for your mach
der, and then
F
get a valid lice
hine.
n click on cop
Figure 6A
ense. Choose
y button in Fi
e the option s
igure 7A, and
hown in Figu
d direct the to
4
re 6A.
ool to the
4
5
5. You shoul
Your Insta
ld the messag
allation is COM
ge “License In
MPLETE NOW
F
nstallation Su
W!
Figure 7A
ccessful”.
55
B
I
t
1
2
B) Synthes
n this section
the Spartan 3
1. Start the X
2. You need
chip on th
sizing a De
n, we will go o
E FPGA on th
XILINX ISE De
to select the
he board. Thu
esign:
over the comp
e NEXYS 2 Dig
esign Environm
appropriate
us we choose
plete design s
gilent Board.
ment. To crea
settings for y
the options i
steps to synth
ate a new des
Figure 1B
your FPGA de
n Figure 2B. T
hesize and pr
sign, select ne
vice. For the
Then you clic
rogram the Ve
ew project as
NEXYS 2 boa
k finish.
erilog code/m
s shown in Fig
rd, we have a
6
module into
gure 1B.
an XC3S1200E
6
E
3
4
3. Now you
Verilog de
functions
4. We will ad
wizard, th
can add your
esign for a sim
are:
F1 = a
F2 = ~a
dd a Verilog m
hen select a V
r design files t
mple logic fun
& b & c;
a | d;
module, and c
Verilog modu
to the compil
nction with 4
call it function
le as shown i
Figure 2B
er. Or you ca
variables and
n1.v to the ch
n Figure 3B.
n create new
d two output
hip. Right clic
w ones. We wi
single bit Boo
ck on the chip
ill create a ne
olean functio
p, and choose
7
ew simple
ns. The
e New Source
7
5
6
5. We define
6. The modu
within the
e the input an
ule structure/
e module acc
nd output por
/Verilog code
ording to our
rts of the Ver
is automatic
r functions as
Figure 3B
rilog module a
Figure 4B
ally generate
shown in Fig
as shown in F
ed by the tool
gure 5B. Save
Figure 4B.
. Then we en
the Verilog m
nter the relati
module create
8
onships
ed.
8
77. Now you
the Synth
check will
need to chec
hesize‐XST me
l appear if yo
k your code s
enu in the Pro
ur code is err
syntax for err
ocesses windo
ror free.
Figure 5B
ors. While ch
ow as shown
Figure 6B
hoosing the V
in Figure 6B,
erilog module
then double
e “function1.
click on Chec
9
v”, expand
ck Syntax. A
9
8
9
8. Double cl
synthesis
9. Now we n
tool unde
file. Click
ick on Synthe
is ok as show
need to assign
er the User Co
ok on the me
esize‐XST to S
wn in Figure 7
n pins to the
onstraints. O
essage below
Synthesize the
B.
input and out
nce you doub
shown in Fig
e design (gen
Figure 7B
tput ports of
ble click on th
ure 8B.
Figure 8B
nerate netlist)
the module.
the I/O Pin pl
). You should
This is done
lanning, the t
get a check i
using the I/O
tool will ask y
10
f the
O Pin Planning
you for a UCT
0
g
T
1
1
10. The Plan A
11. Expand th
ways to a
location n
FPGA Dig
seven seg
Figure 10
Ahead tool fo
he Scalar Port
assign the pin
next to each
ilent board.
gments displa
B.
or pin assignm
ts folder to se
ns, either yo
port. We wil
These board
ays. Check th
ment and rou
ee all the inpu
u drag to the
l assign the p
s have some
he pins you
Pin lo
ting on the F
Figure 9B
ut/output por
e pin locatio
ports to the
e predefined
need from t
cations
PGA opens u
rts you have i
n on the FPG
pins needed
connections
he board da
p. It looks like
in your top le
GA floorplan,
according to
to Switches,
ta sheet. A b
e in Figure 9B
evel module. T
, or you can
o the ports n
, Push butto
board picture
1
B.
There are two
write the pin
eeded on the
ns, LEDs, and
e is shown in
1
o
n
e
d
n
1
a
f
T
12. In this sm
a : R17
f1 : J14
The final table
all project we
b : N
f2 : J1
e will look like
e will assign t
N17
15
e the one in F
he following:
c : L1
Figure 11B.
Figure 10B
:
13 d : L14
122
13
N
3. Save your
Now double c
r constraint/p
click on the Im
pin assignmen
mplement Des
nt file. Close t
sign and wait
Figure 11B
the Plan Ahea
t until you ge
Figure 12B
ad tool.
t checks on aall its sub‐item
ms as shown i
13
n Figure 12B.
3
.
1
1
14. Double cl
Then dou
15. Now, dou
ick on Genera
ble click on G
uble click on B
ate Programm
Generate Targ
Boundary Sca
ming File item
get PROM/AC
an and then ri
m, and wait u
CE File and th
Figure 13B
ght click and
until you get a
hen click on th
choose Initia
a check there
he message s
alize Chain as
to have a suc
hown in Figu
s shown in Fig
14
ccessful file.
re 13B.
gure 14B.
4
116. Click yes t
in Figure 1
to continue w
16B.
with configuraation file assig
Figure 14B
gnment as sh
Figure 15B
own in Figuree 15B. Choose
e function1.b
15
bit as shown
5
117. At this tim
the follow
me, we are no
wing window.
ot using the F
lash, thus clic
Figure 16B
ck NO on the
Figure 17B
message shoown in Figure
17B. And the
16
en Cancel on
6
1
F
w
1
18. Then, you
Figure 18B. Cl
well impleme
19. When the
u need to cho
ick on the FP
nts on the bo
e switches A,
ose the FPGA
GA until it be
oard, you will
B and C are O
A chip that ha
ecomes GREE
get a success
ON, LD0 turn O
s the numbe
N, then right
sful program.
Figure 18B
ON as shown
Figure 19B
THE END
r XC3S1200E,
click and Cho
.
in Figure 19B
, Click Apply
oose Program
B. This is it!
OK. This is
m. And if you
17
s shown in
r program is
7