Digital Design and Synthesis: Instructors
Digital Design and Synthesis: Instructors
3 4
1
What You Should Already Know Course Website
Principles of basic digital logic design (ECE 352) eCOW2
• Number representations (unsigned, signed, Hex & Binary) • Follow the link on:
http://www.engr.wisc.edu/ece/courses/ece551.html
• Boolean algebra
• Gate-level design
What the Website will have:
• K-Map minimization
• Lecture Notes (I will try to stay 1 week ahead of class)
• Finite State Machines
• Homework Assignments
• Basic datapath structures (adders, shifters, SRAM)
• Tutorials
How to log in to CAE machines and use a shell • Project Information
• Midterm Solution
5 6
7 8
2
Class Project Course Tools
Work in groups of 2 or 3 students Industry-standard design tools:
Design, model, simulate, synthesize, and test a • Modelsim HDL Simulation Tools (Mentor)
complex digital system • Design Vision Synthesis Tools (Synopsys)
Several milestones • LSI Logic Gflx 0.11 Micron CMOS Standard Cell
• Forming teams Technology Library
• Project status report Tutorials will be available for both tools
• Progress demonstrations (maybe) • Modelsim tutorial next week
• Final demonstration & report • Design Vision tutorial a few weeks later
• Tool knowledge will be required to complete homeworks
More details coming later in the course • TA will be a resource for help on tools
9 10
11 12
3
What is an HDL? What is an HDL? (continued)
HDL = Hardware Description Language
module counter(clk,rst_n,cnt); • It looks like a programming language
• Allows for modeling & simulation (with timing) of digital
input clk,rst_n; • It is NOT a programming language
designs
output [3:0] cnt;
• Can be synthesized into hardware (netlist) by synthesis reg [3:0] cnt;
It is always critical to recall you
are describing hardware
tools (Synopsys, Ambit, FPGA compilers)
always @(posedge clk) begin
This codes primary purpose is to
• Two major standards in industry & academia if (~rst_n) generate hardware
Verilog (Flexible, loose, more common in industry) cnt = 4’b0000;
else The hardware this code describes
VHDL (Strongly typed, more common in defense and automotive) (a counter) can be simulated on a
cnt = cnt+1;
Having used both I prefer Verilog. This course will use Verilog end computer. In this secondary use of
Once you have the concept of an HDL down (can think and code endmodule
the language it does act more like a
hardware), the language makes little difference. programming language.
13 14
written in verilog
as well. always @(posedge clk) begin
Output if (~rst_n) rst_n 4 4
Testbench verilog Stimulus Design 4
Monitoring cnt = 4’b0000;
is not describing Generation Under Test
Self Checking else
hardware and (verilog) (verilog)
(verilog) cnt = cnt+1;
can be thought end
of as more of a clk
endmodule
program. file file
Verilog test bench shell
15 16
4
Synthesizing the Hardware Described Why Use an HDL?
All hardware created during Enables Larger Designs
if (a) f = c & d;
synthesis else if (b) f = d; • More abstracted than schematics, allows larger designs.
• Even if a is true, still else f = d & e; Register Transfer Level Description
computing d&e Wide datapaths (16, 32, or 64 bits wide) can be abstracted to a
single vector
Synthesis tool does the bulk of the tedious repetitive work vs
Learn to understand how schematic capture
• Work at transistor/gate level for large designs: cumbersome
descriptions translated to
c
hardware f Portable Design
d • Behavioral or dataflow Verilog can be synthesized to a new
e process library with little effort (i.e. move from 0.11µ to
45nm process)
b a
17 18
• Synthesis options and coding styles can help examine Errors caused in synthesis fall in the following categories
Timing
tradeoffs Bad Library definitions
Speed Bad coding style…sloppyness
Power
area
19 20
5
Other Important HDL Features Hardware Implementations
Are highly portable (text) HDLs can be compiled to semi-custom and
Are self-documenting (when commented well) programmable hardware implementations
Describe multiple levels of abstraction
Full Semi- Programmable
Represent parallelism Custom Custom
Provides many descriptive styles
• Structural
Manual Standard Gate
• Register Transfer Level (RTL) VLSI Cell Array
FPGA PLD
• Behavioral
Serve as input for synthesis tools less work, faster time to market
implementation efficiency
21 22
23 24
6
FPGAs What is a Netlist?
“Programmable” hardware A netlist is a ASCII text representation of the interconnect of a
schematic
Use small memories as truth tables of functions
Many Standards Exist:
Decompose circuit into these blocks • Spice Netlist
Connect using programmable routing • EDIF (Electronic Data Interchange Format)
SRAM bits control functionality • Structural Verilog Netlist (this is what we will use)
module comb(Z,A,B,C);
FPGA Tiles P1 input A,B,C;
P2 output Z; A comb
P P3 OUT n1
P4 wire n1, n2; A1
P6
P5
and02d1 A1(n1,A,B);
= B
P7 I1
A2
inv01d1 I1(n2,C); C n2 Z
P8 and02d1 A2(Z,n1,n2);
I1 I2 I3 endmodule
25 26
27 28
7
FSMs Remember Bubble Diagrams?
Moore They can be useful. I sometimes will draw a bubble
• Output depends only on current state diagram first for a complex FSM. Then code it.
• Outputs are synchronous (but not necessarily glitch free) Analog_in
Given the datapath
+
gt
For a single slope
A2D converter.
Counter DAC
• Output depends on current state and inputs inc_dac
clk
10 Draw a bubble
diagram
For a FSM that can
• Outputs can be asynchronous control it.
Compare smp_eq_8
inc_smp Counter
To 7
accum
29 30
8
Declaring A Module Declaring Ports
Can’t use keywords as module/port/signal names A signal is attached to every port
• Choose a descriptive module name Declare type of port
• input
• output
Indicate the ports (connectivity) • inout (bidirectional)
Declare the signals connected to the ports Scalar (single bit) - don’t specify a size
• input cin;
• Choose descriptive signal names
Vector (multiple bits) - specify size using range
• Range is MSB to LSB (left to right)
Declare any internal signals • Don’t have to include zero if you don’t want to… (D[2:1])
• output [7:0] OUT;
• input [0:4] IN;
Write the internals of the module (functionality)
33 34
9
Structural Example RTL Example
module majority (major, V1, V2, V3) ; module majority (major, V1, V2, V3) ;
37 38
39 40
10
Review Questions
What are some advantages of using HDLs, instead of
schematic capture?
What advantages and disadvantages do standard cell
designs have compared to full-custom designs?
What are some ways in which HDLs differ from
conventional programming languages? How are they
similar?
What are the different styles of Verilog coding?
41
11