CME 4456 Reconfigurable Computing: Şerife YILMAZ
CME 4456 Reconfigurable Computing: Şerife YILMAZ
RECONFIGURABLE COMPUTING
VHDL
Şerife YILMAZ 1
Languages Other Than VHDL
2
ABEL
ABEL
– Simplified HDL
– PLD language
– Dataflow primitives, e.g., registers
– Program XILINX FPGA
3
ALTERA
ALTERA
– Created by Altera Corporation
– Simplified dialect of HDL
4
AHPL
5
CDL
6
CONLAN
7
IDL
8
ISPS
9
TEGAS
10
TI-HDL
11
VERILOG
Verilog
– Essentially identical in function to VHDL
– Simpler and syntactically different
– Gateway Design Automation
– Early de facto standard for ASIC programming
– Open Verilog International standard
– Programming language interface to allow
connection to non-Verilog code
12
ZEUS
ZEUS
– Created at General Electric
– Hierarchical
– Functional Descriptions
– Structural Descriptions
– Clock timing, but no gate delays
– No asynchronous circuits
13
Different Representation Models
14
Behavioral Model
15
Dataflow Model
16
Structural Model
17
Physical Model
18
Outline
VHDL Background/History
VHDL Design Example
VHDL Model Components
– Entity Declarations
– Architecture Descriptions
Basic Syntax and Lexigraphical
Conventions
19
22
A Brief History of VHDL
23
A Brief History of VHDL
July
1983: contract awarded to develop
VHDL
– Intermetrics
– IBM
– Texas Instruments
August 1985: VHDL Version 7.2 released
24
A Brief History of VHDL
25
Revisions
IEEE 1076-1987 First standardized revision of ver 7.2 of the language from the
United States Air Force.
IEEE 1076-1993 (also published with ISBN 1-55937-376-8). Significant
improvements resulting from several years of feedback. Probably the most widely
used version with the greatest vendor tool support.
IEEE 1076-2000. Minor revision. Introduces the use of protected types.
IEEE 1076-2002. Minor revision of 1076-2000. Rules with regard to buffer ports
are relaxed.
IEC 61691-1-1:2004. IEC adoption of IEEE 1076-2002.
IEEE 1076-2008 (previously referred to as 1076-200x). Major revision released on
2009-01-26. Among other changes, this standard incorporates a basic subset of
PSL, allows for generics on packages and subprograms and introduces the use of
external names.
IEC 61691-1-1:2011. IEC adoption of IEEE 1076-2008.
26
Related standards
IEEE 1076.1 VHDL Analog and Mixed-Signal (VHDL-AMS)
IEEE 1076.1.1 VHDL-AMS Standard Packages (stdpkgs)
IEEE 1076.2 VHDL Math Package
IEEE 1076.3 VHDL Synthesis Package (vhdlsynth) (numeric_std)
IEEE 1076.3 VHDL Synthesis Package – Floating Point (fphdl)
IEEE 1076.4 Timing (VHDL Initiative Towards ASIC Libraries:
vital)
IEEE 1076.6 VHDL Synthesis Interoperability (withdrawn in
2010)[11]
IEEE 1164 VHDL Multivalue Logic (std_logic_1164) Packages
27
Gajski and Kuhn’s Y Chart
Architectural Structural
Behavioral
Algorithmic
Processor
Functional Block
Systems Hardware Modules
Algorithms Logic
ALUs, Registers
Register Transfer
Circuit Gates, FFs
Logic
Transfer Functions Transistors
Rectangles
Floor Plans
Clusters
Physical Partitions
28
Physical/Geometry
Copyright 1995, 1996 RASSP E&F
VHDL Model
Package
Generic Ports
Entity
29
VHDL Design Example
Problem: Design a single bit half adder with carry and enable
Specifications
– Inputs and outputs are each one bit
– When enable is high, result gets x plus y
– When enable is high, carry gets any carry of x plus y
– Outputs are zero when enable input is low
x
carry
y Half Adder
result
enable
30
ENTITY half_adder IS
END half_adder;
x
Half carry
y
Adder result
enable 31
x
y carry
enable
result
COMPONENT and2
PORT (in0, in1 : IN BIT;
out0 : OUT BIT);
END COMPONENT;
COMPONENT and3
PORT (in0, in1, in2 : IN BIT;
out0 : OUT BIT);
END COMPONENT;
COMPONENT xor2
PORT (in0, in1 : IN BIT;
out0 : OUT BIT);
END COMPONENT;
BEGIN
END half_adder_c;
36
37
VHDL Model Components
38
Process
39
VHDL Model Components
Primary Communication Mechanism Is the
Signal
– Process executions result in new values being
assigned to signals which are then accessible to
other processes
– Similarly, a signal may be accessed by a process
in another architecture by connecting the signal
to ports in the the entities associated with the two
architectures
Output
Output <=
<= My_id
My_id ++ 10;
10; 40
Entity Declarations
41
x
Half carry
y result
Adder
enable
ENTITY half_adder IS
GENERIC(prop_delay : TIME := 10 ns);
PORT( x, y, enable : IN BIT;
carry, result : OUT BIT);
END half_adder;
42
Entity Declarations
Port Clause
PORT clause declares the interface signals of the object to the outside
world
– Note port signals (i.e. ‘ports’) of the same mode and type or subtype may be
declared on the same line
PORT
PORT (( input
input :: IN
IN BIT_VECTOR(3
BIT_VECTOR(3 DOWNTO
DOWNTO 0);
0);
ready,
ready, output
output :: OUT
OUT BIT
BIT );
); 43
44
Entity Declarations
Port Clause (Cont.)
46
47
Architecture Bodies
48
Architecture Bodies
49
Architecture Bodies
50
Architecture Body, e.g.
ARCHITECTURE half_adder_d OF half_adder
IS
-- architecture declarative part
SIGNAL xor_res : BIT ;
-- architecture statement part
BEGIN
carry <= enable AND (x AND y) ;
result <= enable AND xor_res ;
xor_res <= x XOR y ;
END half_adder_d ;
51
Structural Descriptions
52
Structural Descriptions
53
54
55
Lexical Elements of VHDL
Comments
– two dashes to end of line is a comment, e.g.,
--this is a comment
56
Basic Identifiers
– Can Only Use
» alphabetic letters ( A-Z, a-z ), or
» Decimal digits ( 0-9 ), or
» Underline character ( _ )
– Must Start With Alphabetic Letter ( MyVal )
57
Basic Identifiers
– Not case sensitive
( LastValue = = lAsTvALue)
– May NOT end with underline ( MyVal_ )
– May NOT contain sequential underlines
(My__Val)
58
Extended Identifiers
– Any character(s) enclosed by \ \
– Case IS significant
– Extended identifiers are distinct from basic
identifiers
– If “ \ ” is needed in extended identifier, use
“ \\ “
59
Reserved Words
– Do not use as identifiers
Special Symbols
– Single characters
& ‘ ( ) * + , - . / : ; < = > |
– Double characters (no intervening space)
=> ** := /= >= <= <>
60
Lexical Elements of VHDL
Numbers
– Underlines are NOT significant
( 10#8_192 )
– Exponential notation allowed
( 46e5 , 98.6E+12 )
– Integer Literals ( 12 )
» Only positive numbers; negative numbers are preceded by
unary negation operator
» No radix point
61
62
Lexical Elements of VHDL
String
– A sequence of any printable characters enclosed in
double quotes
( “a string” )
– Quote uses double quote
( “ he said ““no!”” “)
– Strings longer than one line use the concatenation
operator ( & ) at beginning of continuation line.
63
Characters
– Any printable character including space
enclosed in single quotes ( ‘x‘ )
Bit Strings
– B for binary ( b”0100_1001” )
– O for Octal ( o”76443” )
– X for hexadecimal ( x”FFFE_F138” )
64
VHDL Syntax
65
– e.g.,
variable_assignment <= target :=
expression;
– A clause of the category variable_assignment is
defined to be a clause from the category target
followed by the symbol “ := “ followed by a
clause from the expression category followed
by a terminating “ ; ”
66
VHDL Syntax
67
68
identifier_list <=
identifier { , . . . }
69
70
71
VHDL Lecture 1
The end...
72