L2 Digital System Modeling
L2 Digital System Modeling
EC806
Objectives
• At the end of the lecture the student
must be able to
– Appreciate top-down design methodology,
need for HDL
– Model combinational circuits using verilog
DIGITAL SYSTEMS
STANDARD
COMPONENTS ASIC
Evaluation criteria
• Size • Speed
• Power • Reliability
• NRE
• Security
• Component cost
• Assembly cost • Flexibility
• Time to market
• Risk
FPGA
◼ Logic blocks
◼ Implement combinational
and sequential logic
◼ Interconnect
◼ Wires to connect inputs
and outputs to logic
blocks
◼ I/O blocks
◼ Special logic blocks at
periphery of device for
external connections
Design Flow
Design Entry Schematic, HDL, State diagrams
Download to device
Configure device
In circuit verification
You are writing HDL code to get this image automatically using the tools
• Cadence
• Synopsys
• Siemens/Mentor Graphics
• AMD – Xilinx Vivado
• Intel - Altera Quartus
• Open source tools
Fabrication facilities
• SCL Chandigarh
• UMC
• TSMC
• Global foundries
• Intel
• Samsung ….etc.
Domains
• Digital systems modeled in 3 principal domains and
at different levels of abstraction
• Behavioral
– What does it do?
– Truth table, state diagram, waveform, algo
• Structural
– What are the components and how are they connected ?
– Schematic, net list
• Physical
– Where are the components located on Si/PCB ?
– Placement & routing
Behavioural view
• What the system does
• Info on how this will be achieved is hidden
• Inputs and outputs are defined along with
the relationship between them
• Examples
– Truth table
A
– State diagram B
Y=A+B Y
– Waveform
– Algorithm
Structural
• What the design is
– What components are used
– How are they interconnected
• No info on what the system does nor how it will be
made
• Example
– Schematic
– Net list
• The components may be defined using behavioral or
structural description
– hierarchical description
Physical
• How the design is made
• Placement & routing or Manufacturing info
• No info on what components are being made nor on how they
behave
• PCB manufacture
– GERBER files
• Etching tracks, drilling holes
• IC layout
– GDS2 files
• Mask layout: diffusion, metal …
• PLDs
– JEDEC files
• Define internal connections
high level of
abstraction
low level of
abstraction
Register-Transfer
Language
Boolean Equation
Differential Equation
Register-Transfer
Gate
Transistor
Polygons
Sticks
Standard Cells
Floor Plan
Synthesis and
Optimisation
Simulation
Physical
Design
Design Entry
• General structure of how system performs desired Design
function Concept
• Methods
– Truth tables
• Text File Design Entry
• Waveform Editor
• Practical only for small designs or subcircuits
– Schematic capture Synthesis and
• Graphical tool Optimisation
better circuit
– What makes circuit better?
• Size/area, performance, cost, power etc … Simulation
Physical
Design
Synthesis
System Description
High level Synthesis
Functional Simulation
• Check if the design actually works Design
• Tools Concept
Physical Design
• Implement intermediate format Design
Concept
Synthesis and
Optimisation
Simulation
Physical
Design
History - VHDL
• 1980 – VHSIC program (US DoD)
• 1983 – IBM, TI, Intermetrics
– VHSIC HDL (VHDL) Language & simulation tools
• 1987 – IEEE 1076 standard
– F22 aircraft – 1st design
– Lack of tools – deployment slow
• 1993 – Revised IEEE 1076 ’93
• 1996 – commercial tools for simulation & synthesis
– IEEE 1076.3 VHDL for synthesis – portability of design
libraries
– IEEE 1076.4 VITAL modeling of ASIC & FPGA libraries
• VHDL Initiative Towards ASIC Libraries
Verilog
• 1981 – Gateway design automation
• 1983 – Verilog HDL & simulator
• 1985 – Verilog XL
• 1983-87 – popular for high end designs
• 1987
– Gateway – ASIC foundry endorsement
– Synopsys – synthesis tools
• 1989 – Cadence bought Gateway
• 1990 – public domain
• 1993 – 85% ASIC designers used verilog
• 1995 – IEEE 1364
Verilog/VHDL
System
Behavioral
System
(Algorithmic)
VHDL
Algorithm V
Functional V H
E D
Verilog
(RTL, RTL R
Boolean) L
I
Logic L
Structural O
VITAL VITAL
(Gate, Switch) Gate G
VHDL/Verilog
• Concurrent hardware description
language
– Expresses parallelism in the hardware
• DO NOT code HDL like a C program
– Serializes the hardware operations
– Leads to a BIG increase in the amount of
the hardware
Concurrent vs sequential
a=6; In C/C++
b=2; a=b=2
c=9; a=b;
b=a;
In HDL
a =2 & b = 6
a=b;
b=a;
aeqb <= ‘1’ when a=b else ‘0’; If a=b then aeqb <=‘1’;
else aeqb <= ‘0’;
Concurrent statement end if;
Sequential statement
Types of simulation
• Compiled code simulation
– Generate code that evaluates a hardware block
– Operational details/temporal behavior within the
hardware block are lost
– Must evaluate events in the right order
• Event-driven simulation
– Propagate events through simulation.
– Don’t simulate a block until its inputs change
Event-driven simulation
• An event is a
change in a net’s
value.
net1
• An event has two
components: t=35 ns time
– value; net
– time.
net1=0 @ 35 ns
event
Page 37 HPCA Jan 2025
Events on a gate
• Propagate events
only when nets
change value.
• If an input change 0 1
1 no0
doesn’t cause an 1 0 event
output change, no
event is propagated.
Timewheel
• The timewheel is a data structure in the
simulator that efficiently determines the
order of events processed.
• Events are placed on the timewheel in
time order.
• Events are taken out of the head of the
timewheel to process them in order.
Timewheel operation
c=0 @ 2 ns
a c
1
1 0 b=1 @ 1 ns time
0 1
b
a=1 @ 0 ns
netlist timewheel
Order of evaluation
• Order of evaluation is important.
– Causality must be obeyed.
• Evaluating events in the wrong order
can cause inaccurate results.
a e=0 @ 3 ns
0 c 1
1 0
0 1 e d=1 @ 2 ns time
b
0 1 b=1 @ 1 ns
d
netlist timewheel
Synthesis subsets
• VHDL and Verilog were designed for
simulation
• A synthesis subset is:
– synthesizable
– produces consistent simulation results
• Different tools may use different
synthesis subsets