Lec 5 - HDL-Based Digital Design
Lec 5 - HDL-Based Digital Design
)
2012/10/18 1
2012/10/18
p. 2 2
2012/10/18
2012/10/18
2012/10/18
INTRODUCTION
Design Ideas
Behavioral Design
Flow Chart, Pseudo Code,
Logic Design
Gate Wirelist, Netlist
Physical Design
Transistor List, Layout,..
2012/10/18
Concurrent operations
Concept of propagation delay and timing Characteristics cannot be captured by traditional PLs Require new language: HDL
2012/10/18
10
Specify
Capture
Verify
Formalize
Implement
HDL supports Specify (for design specification) Capture (for design entry) Verify (for design simulation) Formalize (for documentation) Implement (for logic synthesis)
2012/10/18 11
Advantages of HDLs
advantages compared to traditional schematicbased design o design with RTL description + logic synthesis tools different levels of abstraction easier and cheaper to explore different design options with the aid of a logic synthesis tool HDL offers the mechanism to describe, test and synthesize such complex design design reuse
2012/10/18 12
Advantages of HDLs
o
functional verification can be done early optimized to meet the desired functionality analogous to computer programming textual description and comments
2012/10/18
13
Design Entry
Test Development
Synthesis
Functional Simulation
Device Fitting/Mapping
Timing Simulation
Device
HDLs can be used for both d e s i g n e nt ry a n d te s t development . HDL makes it easy to build, use and r euse lib raries of circuit elements.
2012/10/18
15
2012/10/18
16
Verilog
open standard (initiated by OVI) oriented to digital circuit design well support from EDA and ASIC vendors C-like syntax and more intuitive students should have some prior programming experience on C shallow learning curve than VHDL Future compatibility to Digital IC Design modules
2012/10/18
17
Genesis of VHDL
VHDL is a language for describing digital hardware used by industry worldwide
2012/10/18
18
What is VHDL?
VHDL is the VHSIC ( Very High Speed Integrated Circuit ) Hardware Descriptive Language.
A Simulation Modeling Language.
2012/10/18
19
Features of VHDL
Support for concurrent statements ( All elements are active simultaneously).
Library support (user defined and system predefined ). Sequential statements (gives software-like sequential control (e.g. case, ifthen-else, loop, ). Support for design hierarchy.
Generic design (configurable for size, physicsl characteristics, timing, loading,). Use of subprograms. Type declaration and usage. - Not limited to Bit or Boolean types - Allow integers, floating point types, as well as user defined types. - Possibility to define new operators for the new types ). Timing control. Technology independent.
2012/10/18 21
Levels of Abstraction
Two basic ways of representing a digital circuit
o
Structure primitives and connectivity tools: schematic diagram Behaviour I/O functions vs time tools : Equations, Timing Waveforms, HDL
2012/10/18
23
Structure transistors, resistors, capacitors, gates, latches, flip-flops adders, comparators, multiplexers, registers, counters, queues, datapaths, memories CPU, memories, buses, ASICs
Behaviour I-V diagrams, differential equations Boolean equations, truth tables, state diagrams, timing diagrams flowcharts, algorihtms, generailized FSMs executable specifications, programs
Gate
Register
Processor
Levels of Abstraction
Physical/Switch/Transistor Level
a model that describes layout of the wires, resistors, capacitors and transistors and interconnections between them on an IC chip Gate-level o a circuit is described in terms of logic primitives (such as AND, OR, XOR, NAND, NOR, .), flip-flops, interconnections, logic levels and timing properties (e.g. gate delay)
o
2012/10/18
25
Levels of Abstraction
Register Transfer Level (Dataflow)
o
a type of behavioural description that describes the flow of data between registers and how a design processes these data defines signal values with respect to a clock RTL (Register Transfer Level) is frequently used for the Verilog description with the combination of behavioural and dataflow constructs which is acceptable to logic synthesis tools
26
2012/10/18
Levels of Abstraction
Behavioural Modeling
o o
highest level of abstraction a component is described by its design algorithms and/or input/output responses without implying any hardware details of implementation behaviour is implied by the functional definitions of the components synthesis tools accept only a limited subset of these high-level constructs
27
2012/10/18
Black Box F
Behaviour
D Q Logic D Q
RTL A B C D
CLK
CLK
Gate
Layout
2012/10/18
28
Information Contents Functional timing behaviour e.g. "after 10ns, signal A switches to 1" Describe clock, dataflow, functions and events
Machineoriented
Gate types, connections and gate delays Shape, dimensions, path delays
o
o
Design Entry RTL Simulation Logic Synthesis Verification Placement and Routing Configuration
2012/10/18
30
Design Entry
Technology-independent
RTL HDL Design Constraints
Test Bench
Functional Simulation
Technology Library
Logic Synthesis
Technology-dependent
Gate-level Netlist
Test Bench
Post-synthesis Simulation
Layout Data
Timing Extraction
Test Bench
Post-layout SImulation
Simulation Library
31
Design Entry
Schematic Diagram Text-based Entry e.g. ABEL, Verilog, VHDL
Functional Simulation
Design Verification
Functional and Timing Simulation Static Timing Analysis In-circuit Verification
Back-annotation
Design Implementation
Optimization FPGA - Mapping, Placement, Routing CPLD - Fitting Bit Stream Generation
Synthesis
Translation of a high-level design to a lowerlevel form o Map a more abstract representation to an optimized and more physical form
IP Blocks VHDL or Verilog Behavioural Synthesis Register Transfer Design Data Files Other EDA Tools
Logic Synthesis
VHDL or Verilog
Technology Libraries
Synthesis
Logic Synthesis the predominate synthesis
technology in use today o a design is specified at the RTL level o capable of optimizing a design with respect to various constraints, such as area, timing, power o an optimized gate-level implementation that is targeted to a particular technology o requiring a technology library to specify the components to be used in the design
2012/10/18 34
HDL Description always @(state) begin hwy = GREEN; cntry = RED; if (clear) Q <= 4'd0; else Q <= Q + 1; end
Technology-independent
Logic Synthesis Tools Design Constraints Technology Libraries IP Cores Reports all constraints met ?
2012/10/18
Synthesis
Behavioural synthesis
an emerging technology that allows a more algorithmic specification of the system to be synthesized exploring design alternativesConsideration to be taken when carrying out a HDL-based design for logic synthesis: o synthesizable subset o synthesis policy o modeling style o functionally identical vs functionally equivalent
o
2012/10/18 36
Circuit Description module FA (SUM, CO, A, B CIN) output SUM, COUT, input A, B, CIN; ... ... endmodule
Verilog Simulator
Verilog Parser
User Interface
Simulator Engine
Analog Verilog ?
Gateway Design Automation introduced Verilog-XL Simulator and its proprietory HDL
There were numerous proprieory HDLs in the academic and industrial sectors
38
2012/10/18
System
Programming Language Interface Algorithmic Hierarchial structure and instantiation Verilog modeling range
o
{ Behaviour From switch/transistor to RTL { processor level { Data Flow Our main focus will be on RTL
diagram of solution Code block diagram in Verilog HDL Create verification script to test design Synthesize Verilog Run static timing tool to check all thing is met Design is mapped, placed and routed Bitstream (*.bit) file is generated and downloaded to target devices (e.g. FPGA or CPLD)
41
2012/10/18
Full Custom IC
Semi Custom IC
Standard Cell
Gate Array
PLDs
* Nonrecurring engineering cost * Design Complexity * Process complexity Characteristics of various * Logic Density * Speed Digital Design Technologies
2012/10/18 43
100,000
FPGA
PLD
10
100 1,000
Total Cost
Discrete Gates and Standard ICs cheap unit cost low levels of integration standard but limited functionality variety of stock required low performance Programmable Logic Devices (FPGAs, CPLDs)
Cell-based and Full-custom ASICs advanced and specialized functionality high level of integration high performance tailored for small market segment => inventory risk high non-recurring engineering cost high investment cost to cater for small-volume requirements
2012/10/18
46
Classification
Programmable Logic Device (PLD) or Field
Programmable Logic Device (FPLD) o a generic term that refers to any integrated circuit used for implementing digital hardware, where the chip can be configured by the end user to realize different designs o fixed architecture but functionality programmable for a specific application
2012/10/18
47
PROM
PROMs are not classified as PLDs since they are mainly used for storage and special-purpose applications.
CPLD
FPGA
2012/10/18
48
3 categories of PLDs: 1. SPLD (Simple Programmable Logic Device) PLA (Programmable Logic Array) PAL (Programmable Array Logic) Registered PAL 2. CPLD (Complex Programmable Logic Device) 3. FPGA (Field Programmable Gate Array)
2012/10/18
49
3 basic characteristics distinguish PLDs from each other : o architecture of basic functional units o programmable interconnections o programming technology
2012/10/18
50
Architecture of PLDs
in[0] in[1] : : in[n-1] n inputs nxp AND Array (Programmable) P[0] P[1] : : P[p-1] pxm OR Array (Programmable) out[0] out[1] : : out[p-1] m outputs
2012/10/18
51
PLA o Two programmable planes: AND & OR planes o Any combinations of ANDs / ORs o Sharing of AND terms across multiple ORs o High logic density o High fuse count o Slower than PALs o Higher power dissipation than PALs
2012/10/18
52
Programmable AND Plane Programmable Element (e.g. Metallic Fuse, UV EPROM Cell) Outputs
PAL o Programmable AND plane / Fixed OR plane o Finite combination of ANDs / ORs o Medium logic density o Low fuse count o Faster than PLAs
2012/10/18
54
Inputs
Fixed OR Plane
Outputs
D CLK
Clock
CPLD o Each basic logic block is constructed from registered PLDs o Central, global interconnects o Simple and deterministic timing o Easily routed o PLD tools add only interconnects o Wide, fast complex gating o Clock speed > 300MHz
2012/10/18
57
PLD
PLD
PLD
Programmable Interconnect
PLD
PLD
PLD
2012/10/18
58
Outputs
2012/10/18
59
FPGA o a regular structure of configurable logic blocks (or modules) and interconnects o Channel-based routing o Fine-grained configurable logic block o Post-layout timing analysis required o Tools more complex than CPLDs o Fast register pipelining
2012/10/18
60
Row 1
Horizontal Channel
Vertical Channel
Channel Channel
Row 2
Row 3
I/O Pads
Channel
Row 4
Configurable Logic Blocks (a) Matrix-based Architecture (e.g. Xilinx and QuickLogic devices)
Interconnect Delay
Block Delay
2012/10/18
Example:
Show how the PLD shown in the Figure can be used to implement typical 2-input logic functions: AND, OR, NAND, NOR, XOR and XNOR.
2012/10/18
64
Replacement of glue logic (random logic) Implementing dedicated controller circuits Implementing finite state machines (FSM)
2012/10/18
65
Selection Criteria
Main factors to be considered when choosing a
PLD: o Process technology o Programming technology reprogrammable vs OTP UV EPROM, E2EPROM, RAM and Flash o Logic capacity Dont miss the hidden factor: utilization It is a surprise if you can achieve a utilization well over 70%.
2012/10/18
66
o o
o
o o
Dedicated logic functions E.g. Flip-flop types, I/O buffers, macrocells Timing characteristics & speed requirements Tpd, Tsetup, Thold, . Power dissipation Voltage requirements E.g. 2.5V, 3.3V, 5V I/O pins available Packages Special features E.g. In-system Programmability/Testability CAD tools and vendor-supplied libraries
67
2012/10/18
Synthesis
Functional SImulation
Device Fitting
Timing Simulation
In-circuit Testing
2012/10/18
69
Idea
Sche matics ECS State M achine State CAD
HDL
Design Entry
Synthesis
Xilinx Synthe sis Te chnology (XST)
Translate
NGDBuild
CPLD Fitting
CPLD Fitte r
FPGA Mapping
M AP/PAR
Estimation
XPowe r
Programming
IM PACT Programme r
TestBench
HDL Be nche r
Simulate
M ode lSim XE
2012/10/18
Example:
A sequential circuit is implemented into a PLD as in the following figure
D CLK
Q Q Q Q Q Q
Q1
D CLK
Q2
D CLK
Q3
O4 O5 CLOCK
2012/10/18
72
2012/10/18
73
*Specification:
- Passes results only on enable high. - Passes zero on enable low.
x y enable
Half Adder
carry result
2012/10/18
74
Behavioral Design
Starting with algorithm, a high level description of the adder is created. IF enable=1 THEN result = x XOR y carry = x AND y ELSE carry = 0 result = 0
x y enable
Half Adder
carry result
*The model can now be simulated at this high level description to verify correct under standing of the problem.
2012/10/18 75
x y enable
carry result
*Again, the model can be simulated at this level to confirm the logic equations
2012/10/18 76
Logic Design
Finally, the structural description is created at the gate level
x y enable
carry result
2012/10/18
77
o o o
USA DoD:United States Department of Defense RTL:register-transfer level EDA or ECAD:Electronic design automation is a category of software tools for .... Logic simulation digital-simulation of an RTL or gate-netlist's digital (boolean ...
2012/10/18
p. 78