2) Lecture2
2) Lecture2
Language
Based on slides from Pong P. Chou
Outline
COEN313 - 2
Hardware Description
Language
1. Overview on hardware
description language
Programming language
COEN313 - 4
HDL : Hardware Description Language
• Characteristics of digital hardware
– Connections of parts
– Concurrent operations
– Concept of propagation delay and timing
• Characteristics cannot be captured by
traditional PLs
• Require new languages: HDL
– Formal documentation
– Input to a simulator
– Input to a synthesizer
COEN313 - 5
Two HDLs used today
– VHDL and Verilog
– Syntax and ``appearance'' of the
two languages are very different
– Capabilities and scopes are quite
similar
– Both are industrial standards and are
supported by most software tools
COEN313 - 6
VHDL
– VHDL: VHSIC (Very High Speed Integrated Circuit) HDL
– Initially sponsored by DoD as a hardware documentation
standard in early 80s
– Transferred to IEEE and ratified it as IEEE standard
1176 in 1987 (known as VHDL-87)
– Major modification in ’93 (known as VHDL-93)
– Revised continuously
COEN313 - 7
Hardware Description
Language
COEN313 - 9
First example Entity declaration
i/o ports
(“outline” of
the circuit)
Signal declaration
concurrent
statement
COEN313 - 10
Conceptual Interpretation
COEN313 - 11
Another VHDL description!
COEN313 - 13
Example
COEN313 - 14
Structural Description of the
even_detector circuit
Stitch the
components
together via
wires
COEN313 - 15
Somewhere in the library
COEN313 - 16
Problem
library ieee;
use ieee.std_logic_1164.all;
begin
unit10: xor2 port map (i1 => a(0), i2 => a(1), o1 => sig1);
unit11: xor2 port map (i1 => a(2), i2 => a(3), o1 => sig2);
unit2: xor2 port map (i1 => sig1, i2 => sig2, o1 => odd);
end str_arch; COEN313 - 17
Solution
COEN313 - 18
“Behavioral” description
• No formal definition on “behavioral” in VHDL
• VHDL “process”: a language construct to encapsulate
“sequential semantics”
– The entire process is a concurrent statement
– Syntax:
COEN313 - 19
Behavioral description: Example
COEN313 - 20
Conceptual interpretation
COEN313 - 21
Listing 2.6
COEN313 - 22
Testbench
• a “virtual” experiment table
– Circuit to be tested
– Input stimuli (e.g., function generator)
– Output monitor (e.g., logic analyzer)
• e.g.,
COEN313 - 23
VHDL Listing 2.7
COEN313 - 24
COEN313 - 25
COEN313 - 26
Configuration
• Multiple architecture bodies can be associated with an
entity declaration
– Like IC chips and sockets
COEN313 - 27
VHDL in development
flow
COEN313 - 28
Coding for synthesis
COEN313 - 29
Summary: Synthesis
COEN313 - 31