Professional Documents
Culture Documents
Verilog HDL
92
.................................................... III
................................................... IV
.................................................... V
............................................... 1
1.1 ........................................... 1
1.2 ........................................... 1
1.3 IC .................................... 2
1.3.1 ........................ 2
1.3.2 ............................ 2
1.3.3 .................... 3
1.3.4 .................................. 4
1.3.5 ................................ 4
1.3.6 IC ............................. 4
1.3.7 HDL .............................. 5
1.4 ................................... 6
1.5 ........................................... 6
IC .............................. 7
2.1 VHDL Verilog................................. 7
2.1.1 ...................... 7
2.1.2 HDL....................... 7
2.1.3 VHDL Verilog ......................... 7
2.1.4 Verilog HDL ........................... 10
2.1.5 ....................... 10
2.2 IC ............................. 11
2.2.1 IC ...................... 11
2.2.2 ......................... 12
Altera ............................ 13
3.1 OPEN FPGA 3.0 .......................... 13
3.2 OPEN FPGA 3.0 ....................... 14
3.3 EMP3064A .......................... 14
3.4 ...................................... 14
3.5 MAX3000A ..................................... 15
I
..................................
4.1 ....................................
4.2 ....................................
4.3 ......................................
................................
5.1 ..........................................
5.2 ..........................................
5.3 ......................................
5.4 rpt ......................................
5.5 ........................................
........................................
6.1 MAX+PLUS ..............
6.2 MAX+PLUS ......................
6.3 ..........................................
..............................................
7.1 ..............................................
7.1.1 OPEN FPGA 3.0 ...................
7.1.2 Verilog HDL .....................
7.1.3 License .......................
7.1.4 .............................
7.1.5 .....................................
7.1.6 Verilog HDL C .......................
7.2 ............................................
7.2.1 Verilog HDL ...............
7.2.2 .....................................
7.2.3 License ...............................
7.2.4 ModelSim ..............................
7.2.4 .....................................
7.2.5 .............................
7.2.6 .................................
7.3 ..........................................
............................................
II
16
16
19
19
21
21
21
22
22
24
25
25
30
33
39
39
39
39
39
40
41
42
42
42
42
43
43
43
44
44
44
46
IC
Verilog HDL VHDL
IC
OPEN FPGA 3.0
III
2-1 IC ....................... 11
3-1IC ........................... 13
4-1Altera ........................... 16
4-2............................ 17
4-3.................................. 17
4-4.................................. 18
4-5................................ 18
4-6JTAG ..................... 19
4-7................ 20
4-8............................ 20
5-1.............................. 22
6-1Compiler ................................. 25
6-2Assign Device................................. 26
6-3 EMP3064ATC44-4 ........................... 26
6-4...................................... 27
6-5...................................... 28
6-6.................................... 29
6-7...................................... 30
6-8Waveform Editor............................... 30
6-9...................................... 31
6-10................................. 31
6-11 rst ..................................... 32
6-12 clk ..................................... 32
6-13..................................... 33
6-14................................... 33
6-15................................... 34
6-16................................... 35
6-17................................... 36
6-18................................... 36
6-19................................... 37
6-20................................... 38
IV
1-1........... 5
5-1.......................... 21
1.1
IC
68.7%
IC
SOC
IC
IC
IC IC
ModelSimLeonardo
SpectrumMAX+PLUS BASELINE
ALTERA
IC IC
IC
1.2
,
1.3 IC
1.3.1
21
1.3.2
PDA
Application Engineer
Back-endPCB Layout
Front-end
ARM
Intel Intel IC IC Designer
IC
IP-Intellectual Property IC
Back-endIC
Placement & Routing
IC
Front-endIC
Intel IC ARM
ARM IP
IP Designer
IP
IC
2
SOC
ARM IP
IC
IC
Linux
Open Source
1.3.3
Virtual Fab
Engineering
Collaboration
1.3.4
IC
IC
IC
CAD-Computer Added Design
IC
IC
IC
1.3.5
IC
IC
HDLHardware Description Language
EDA-Electronic Design Automation
PLD-Programmable Logic Device
IC
1.3.6 IC
IC
4
Emulation
IC
IC
IC
ModelSim
Leonardo Spectrum
MAX+PLUS BASELINE
1.3.7 HDL
IEEE
Verilog HDL VHDLVerilog HDL C
VHDL
IC
.v->.edf->.pof
Editor.c ->Complier.obj
->Linker.exe
1-1
1.4
PAL Programmable Array Logic GAL Generic Array
LogicCPLDComplex Programmable Logic Device
FPGAField Programmable Gate Array
CPLD
FPGA PAL GAL
SPLDSimple Programmable Logic
Device
FPGA CPLD IC
1.5
IC IC
Verilog HDL VHDL IC
IC
2.1 VHDL Verilog
2.1.1
(1)SSI
(2)MSI
(3)LSI
(4)
CADComputer
Aided Design
2.1.2 HDL
(1)
(2) Verilog HDL VHDL
(3)Verilog HDL Gateway Design Automation
(4)VHDL DARPA
(5)1980
(7)
system boards
interconnect buses
VHDL Verilog
1970 1980 The
United States Department of Defense
reuse
VHSICVery High Speed Integrated
Circuit
formatsyntax
VHSIC
gate level
VHSIC VHSIC
Hardware Description Language 1982
VHDL 1986
International Electrical & Electronic
EngineeringIEEE IEEE
standard 1076
Gateway Design Automation
1984 VHDL Verilog
HDL VHDL Verilog HDL
Programming Language Interface, PLI
Verilog
VHDL
reuse
VHDL
8
primitive model
ASIC
sign-off
VHDL
ASIC
Verilog
Verilog
ASIC
time-to-market
Verilog
niche
ASIC Verilog
Verilog HDL
1987
Synopsys Verilog HDL
digital circuit synthesizer
Verilog
Verilog
Verilog
ASIC EDA
VHDL IEEE standard
Verilog
VHDL EDA VHDL
Verilog EDA
Verilog IEEE
1995 Verilog IEEE
IEEE standard 1364
EDA
EDA
Verilog HDL
VHDL VHDL
10
(2)
(3)
(4)
RTL
Verilog HDL
(5)
RTL
(6)
bottom-up Verilog HDL
2.2 IC
2.2.1 IC
2-1 IC
11
2.2.2
(1)
(2)
(3)
12
Altera
3.1 OPEN FPGA 3.0
Test Pattern
Test Coverage
FGPA
IC
OPEN FPGA 3.0
IC
IC
3-1IC
OPEN FPGA 3.0
ALTERA CPLD MAX EPM3064A-100TQFP-10
8 LED
4
8
512 KHz
JTAG
3.3V 5V
13
(2)9 /500ma
(3)9 5 3.3
(4) 512KHz
(5)JTAG
(6)
8
4
(7)
8 LED
(8)
3.3 EMP3064A
Altera EMP3064A PLD OPEN FPGA 3.0
(1)CMOS EEPROM
8 8
LED
(2)8
OPEN FPGA 3.0
8 LED
14
(3)8 LED
OPEN FPGA 3.0 LED
LED
(4)
OPEN FPGA 3.0
7SEGM_IO1
7SEGM_IO2
(5)
OPEN FPGA 3.0
512KHz
1KHz
3.5 MAX3000A
MAX3000A ISP
3.3V MAX3000A
ISP
32 256 4.5ns
15
4.1
(1) Altera
Altera
http://www.altera.com/support/licensing/lic-index.html
Free Software Licenses
4-1Altera
(2)MAX+PLUS II Student Edition software
Version 10.1 or 9.23 Continue
(3) MS-DOS
dir/p Continue
16
4-2
(4)
E-mail
Continue
C:\flexlm
4-3
17
(5)
Next
Next
(6) MAX+PLUS II 10.1 BASELINE
MAX+PLUS 10.1 BASELINEOptionsLicense
SetupBrowse4
License.datOK
MAX3000A Family Unlicensed Features
Licensed Features OK
4-4
4-5
18
4.2
(1) OPEN FPGA3.0
JTAG
4-6JTAG
(2) OPEN FPGA 3.0
4.3
License
Free
License
Compiler
MAX+PLUS License
License
License Compiler
4-7:
4-8
20
5.1
Q
LED
rst
LED
LED 0
1
7 3
7
17
7 3
10
5.2
mgsrnull
7
mysrnull
3
mgml
sr
bz7
mrsgnull
7
mrsynull
3
5-1
21
5-1
5.3
512KHZ
64KHZ512/2^3 512KHZ 1
1.clk
2.
3.counter
5.4 rpt
22
75%
** DEVICE SUMMARY **
Chip/
POF
tl
Device
EPM3064ATC100-4
User Pins:
Input
Output
Bidir
Shareable
Pins
Pins
Pins
LCs
Expanders
% Utilized
48
27
75 %
** RESOURCE USAGE **
Logic Array Block
A:
LC1 - LC16
B:
Logic Cells
I/O Pins
Shareable
External
Expanders
Interconnect
1/166%
1/166%
1/166%
8/3622%
LC17 - LC32
16/16100%
5/1533%
16/16100%
27/3675%
C:
LC33 - LC48
15/16 93%
6/1637%
16/16100%
26/3672%
D:
LC49 - LC64
16/16100%
2/1513%
15/16 93%
21/3658%
25%
22%
75%
42%
75%
32%
Total
Total
Total
Total
Total
Total
4
48
17
190
0
26
21/64
32%
5.5
state next_state
finite state machine
Compiler
always always
Verilog HDL
always
always
24
6.1 MAX+PLUS
(1) MAX+PLUSFileProject
Name
(2) MAX+PLUS.v .pof
d:\eden-3\example\traffic\rtl\TL.v
OK
(3)MAX+PLUSCompiler
Start
MAX3000A
EMP3064ALC44-4
6-1Compiler
(4)
AssignPin/Location/Chip
Assign Device
25
6-2Assign Device
(5)Compiler Device Family
MAX3000AEMP3064ATC44-4
44 Devices
EMP3064ATC100-4
6-3 EMP3064ATC44-4
(6)
26
Search
Node Name*
List Nodes of Type
Output
Bidirectional
Input
List
(7) 11
clkOK
6-4
(8)
clk OPEN FPGA 3.0
clk 87 512 KHz
Pin Type
Add
(9)7
6-5
(11) MAX+PLUS BASELINE MAX+PLUS
Programmer
OptionsHardware Setup
MV
Parallel Port
OK
(13)File
Select Programming File
Step 10 tl.pof
OK
6-6
(14)Program
LED
29
6-7
6.2 MAX+PLUS
(1)MAX+PLUSWaveform Editor
6-8Waveform Editor
30
OK
6-9
(3)FileEnd Time
End Time Time 900us
OK
6-10
31
6-11 rst
6-12 clk
32
(5)Start
6-13
6.3
(1)
6-14
33
(2)
mg=0sr=0bz=0
6-15
(3) 7 7
mg=0sr=0bz=0
34
6-16
(4)
my=0sr=0bz=0
35
6-17
(5) 2 2
my=0sr=0bz=0
6-18
(6)
36
mr=0ml=0sr=0bz=0
6-19
(7) 7 7
mr=0ml=0sr=0bz=1
37
6-20
(8)
38
7.1
7.1.1 OPEN FPGA 3.0
Verilog HDL
Test
BenchFunction Module
Verilog HDL
7.1.3 License
MAX+PLUSLeonardo Spectrum
ModelSim
MAX+PLUSLeonardo Spectrum
License
MAX+PLUS
License Leonardo
39
Spectrum License
License
autoexec.bat
E-mail CIC
License
Leonardo Spectrum License NIC Number
ipconfig/all MAX+PLUS LicenseHard disk
volume serial number dir/p
ModelSim License
7.1.4
.v
.edf MAX+PLUS
.pof
LeonardoSpectrum
LeonardoSpectrum
.pof MAX+PLUS
.v .pof
MAX+PLUS
Leonardo Spectrum
40
Leonardo Spectrum
Compiler
MAX+PLUS
MAX+PLUS
Chip Chip
MAX+PLUS
Leonardo Spectrum
MAX+PLUS
Leonardo Spectrum
MAX+PLUS
Verilog HDL
7.1.5
Leonardo Spectrum
41
Verilog HDL
Verilog HDL
C Verilog HDL
C Verilog HDL
7.2
7.2.1 Verilog HDL
7.2.2
MAX+PLUSLeonardo Spectrum
ModelSim MAX+PLUS
Leonardo Spectrum
ModelSim
42
C pin
MAX+PLUS
Assign Pin/Location/Chip
MAX+PLUS Waveform Editor
MAX+PLUS
MAX+PLUS
7.2.3 License
MAX+PLUS
License
License
License
MAX+PLUSLeonardo Spectrum
License MAX+PLUS
Leonardo Spectrum License Setup Leonardo
Spectrum License
License
License
License
License
7.2.4 ModelSim
License
License
7.2.4
43
LED
10
01
7.2.5
http://www.cic.edu.tw/cicforum/index.php3
CIC CIC
altera Altera
IC
7.2.6
7.3
key-in
44
[1]IC 2002
6
[2]CPLD 90 3 10
[3] CPLD -
87 2
[4]CPLD -
90 9
[5]CPLD Max+plusII
2001 8
[6]CPLD MAX+plus II
88 10
[7] CPLD MAX+plus II
[8] FPGA
90 7 1
[9] VHDL FPGA 90 5
45
//**********************************************************
module
//**********************************************************
module tlclk,rst,mg,my,mr,ml,sg,sy,sr,null,bz;
input clk,rst; // 512khz rst
reg [4:0]Q; //
output mg,my,mr,ml,sg,sy,sr,null; //
output bz; //
reg mg,my,mr,ml,sg,sy,sr,null;
//**********************************************************
//**********************************************************
reg [10:0] count_1; //
wire
clk_1;
always @ posedge clk begin // clk = 512KHz
count_1=count_1+1;
end
assign clk_1=count_1[10];
// 11-bit 250Hz
// clk = 250Hz
assign clk_2=count_2[7];
// 8-bit 0.97Hz
assign bz =clk_2&!my|clk_2&!sy
;
//
//**********************************************************
//**********************************************************
always@posedge clk_2 or negedge rst
begin
if!rst
//
01
begin
mg=1'b0;
my=1'b1;
ml=1'b1;
mr=1'b1;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=5'b00000;
end
else ifmg==1'b0&&sr==1'b0&&Q!=5'b00111
// 7
begin
mg=1'b0;
my=1'b1;
ml=1'b1;
mr=1'b1;
sg=1'b1;
sy=1'b1;
47
sr=1'b0;
null=1'b1;
Q=Q+1;
end
else ifmg==1'b0&&sr==1'b0&&Q==5'b00111
// 7
begin
mg=1'b1;
my=1'b0;
ml=1'b1;
mr=1'b1;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=5'b00000;
end
else ifmy==1'b0&&sr==1'b0&&Q!=5'b00010
// 2
begin
mg=1'b1;
my=1'b0;
ml=1'b1;
mr=1'b1;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=Q+1;
end
else ifmy==1'b0&&sr==1'b0&&Q==5'b00010
// 2
begin
mg=1'b1;
48
my=1'b1;
ml=1'b0;
mr=1'b0;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=5'b00000;
end
else ifmr==1'b0&&ml==1'b0&&sr==1'b0&&Q!=5'b00110
// 6
begin
mg=1'b1;
my=1'b1;
ml=1'b0;
mr=1'b0;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=Q+1;
end
else ifmr==1'b0&&ml==1'b0&&sr==1'b0&&Q==5'b00110
// 6
begin
mg=1'b1;
my=1'b1;
ml=1'b1;
mr=1'b0;
sg=1'b0;
sy=1'b1;
sr=1'b1;
null=1'b1;
Q=5'b00000;
49
end
else ifmr==1'b0&&sg==1'b0&&Q!=5'b00111
// 7
begin
mg=1'b1;
my=1'b1;
ml=1'b1;
mr=1'b0;
sg=1'b0;
sy=1'b1;
sr=1'b1;
null=1'b1;
Q=Q+1;
end
else ifmr==1'b0&&sg==1'b0&&Q==5'b00111
// 7
begin
mg=1'b1;
my=1'b1;
ml=1'b1;
mr=1'b0;
sg=1'b1;
sy=1'b0;
sr=1'b1;
null=1'b1;
Q=5'b00000;
end
else ifmr==1'b0&&sy==1'b0&&Q!=5'b00010
// 2
begin
mg=1'b1;
my=1'b1;
ml=1'b1;
mr=1'b0;
50
sg=1'b1;
sy=1'b0;
sr=1'b1;
null=1'b1;
Q=Q+1;
end
else ifmr==1'b0&&sy==1'b0&&Q==5'b00010
// 2
begin
mg=1'b0;
my=1'b1;
ml=1'b1;
mr=1'b1;
sg=1'b1;
sy=1'b1;
sr=1'b0;
null=1'b1;
Q=5'b00000;
end
end
endmodule
51