Transcript Lab06
數位系統實驗
Experiment on Digital System
Lab06:
Verilog HDL and FPGA (2)
負責助教:葉俊顯 stanley
Outline
Introduction to VeriLite
Programming VeriLite
Verification using VeriInstrument
Lab
2015/4/13
2
Outline
Introduction to VeriLite
Programming VeriLite
Verification using VeriInstrument
Lab
2015/4/13
3
Introduction to VeriLite
USB
開關
電源線
2015/4/13
Reset
JTAG
4
Introduction to VeriLite
2015/4/13
5
Introduction to VeriLite
虛擬元件
利用 USB 溝通
2015/4/13
6
Outline
Introduction to VeriLite
Programming VeriLite
Verification using VeriInstrument
Lab
2015/4/13
7
Programming VeriLite
一般組合電路不會有 clk 訊號出現,clk只會
在循序電路出現
備註:此 FPGA 板子需要額外的 clk 訊號
腳位設定才可以動作,所以務必記得加入
2015/4/13
8
Programming VeriLite
Start compilation
2015/4/13
9
Programming VeriLite
Open Assignment editor
2015/4/13
10
Programming VeriLite
Show input and output pins
2015/4/13
11
Programming VeriLite
Pin assignment
Double click
2015/4/13
12
Programming VeriLite
Assign pin location to all inputs and outputs and add Clk
Please refer to pin.xls for pin location assignment
Clock must be assigned to location Pin_28
2015/4/13
13
Programming VeriLite
Start compilation
2015/4/13
14
Programming VeriLite
Programming device
2015/4/13
15
Programming VeriLite
Hardware setup: add USB-Blaster
2015/4/13
16
Programming VeriLite
Programming device
2015/4/13
17
Outline
Introduction to VeriLite
Programming VeriLite
Verification using VeriInstrument
Lab
2015/4/13
18
Verification using VeriInstrument
一定要先確認!!!
2015/4/13
19
Verification using VeriInstrument
Specify the name of project file and the pin information
file (*.qsf) generated by QuartusII
2015/4/13
20
Verification using VeriInstrument
Check pin assignment
2015/4/13
21
Verification using VeriInstrument
Add I/O device
2015/4/13
22
Verification using VeriInstrument
Add I/O device
Drag here
2015/4/13
23
Verification using VeriInstrument
Assign user pins
Drag here
2015/4/13
24
Verification using VeriInstrument
Run FPGA
2015/4/13
25
Outline
Introduction to VeriLite
Programming VeriLite
Verification using VeriInstrument
Lab
2015/4/13
26
Lab
2-Bit by 2-Bit Binary Multiplier
A0
B1
x
+
C3
A1B1
C2
B1
B0
A1
A0B1
A1B0
C1
A0
A0B0
B0
A1
B1
B0
HA
HA
C2
C1
C0
Four input, B1,B0, A1,A0
Four output, C3, C2, C1, C0
C3
C0
Lab
Hint
x
S
C
y
reg s,c;
always @(x or y)
begin
xor xor01(s, x, y);
and and01(c, x, y);
s=x^y;
c=x&y;
assign s=x^y;
assign c=x&y;
end
Notice
請勿在桌面建立 Project 及請勿命名中文資料夾
Device family 請確認與 FPGA Chip 符合 (EP1C6Q240C8)
Top module name & Project name 需要一致
確認 module … endmodule 為keyword 變成藍色字體
30