Professional Documents
Culture Documents
<rehan.hafiz@seecs.edu.pk>
Course Information
Couse Website
http://lms.nust.edu.pk/
Acknowledgement: Material from the following sources has been consulted/used in these
slides:
1. [SHO] Digital Design of Signal Processing System by Dr Shoab A Khan
2. [SAM] Samir Palnitkar, Verilog HDL, Prentice Hall, ISBN: 0130449113. , Latest Edition
3. [STV] Advanced FPGA Design, Steve Kilts
4. [PAR] VLSI Signal Processing Systems, Parhi
Material/Slides from these slides CAN be used with following citing reference:
Dr. Rehan Hafiz: Advanced Digital System Design 2015
Creative Commons Attribution--ShareAlike 3.0 Unported License.
Lectures:
Contact:
Office:
Todays Lecture
Introduction
What are Digital Systems ?
What shall you learn in this course ?
Where you can apply the learned knowledge?
Will this course open any new job horizon for
you ?
Introduction - Mine
4
Area
PhD in Reconfigurable System Design for Optical Tomography form The University of
Manchester (2008)
Activities
VISpro
Group Director :
Head: Digital Systems & Signal Processing Knowledge Group (Summer 2009-2011)
Projects
Ultra High Definition Panorama Generation & Rendering (with ETRI Korea)
Digital Image Calibration for Multi Projector Displays (with Epic Technologies)
A Multi View Imaging (MVI) Processing Platform: FPGA based Real Time Panoramic Mosaic
Generation (Funded by ICT R&D Fund)
Have been part of the project Design and Verification of Low-Power, High-Speed IP Suite for
Universal Serial Bus (USB 3.0) with Dr. Nazar (Funded by ICT R&D Fund)
[http://vispro.seecs.nust.edu.pk/]
VISpro
Vision
System
Design
Digital
System
Design
Image
Processing
5
Low Level
Computer
Vision
LL
Stitching System
Applications
Planetarium Displays
Tele-Broadcasting
Dome Displays for Museums
Wide Display Screens for Control
Rooms
Technical Outcomes
1 International Patent Accepted
7 International Patents Pending
5 Journal Papers
1 Conference Paper
Rendering System
VISpro
South Korea
R
R
VISpro
National ICT R&D Fund
Ministry of IT
VISpro
Vision
System
Design
Digital
System
Design
Low Level
Computer
Vision
3.
M. Shafique, W. Ahmad, R. Hafiz, Jrg Henkel, A low latency Generic Accuracy Configurable Adder in
ACM/EDAC/IEEE 52nd Design Automation Conference (DAC), San Francisco, CA, USA, June 8-12, (2015)
M. Ahmad, A. Kamboh & R. Hafiz, "Power & Throughput Optimized Lifting Architecture for Wavelet Packet
Transform", IEEE International Symposium on Circuits and Systems ISCAS 2014 (June 2014, Melbourne)
R. Bilal, R. Hafiz, M. Shafique, S. Shoaib, A. Munawar, and Jorg Henkel. "ISOMER: Integrated selection, partitioning,
and placement methodology for reconfigurable architectures." In Computer-Aided Design (ICCAD), 2013
9
IEEE/ACM International Conference on, pp. 755-762.
(A>1)?
1000
=
916
( B > 1.102 ) ?
11
http://www.youwall.com/index.php?ver=NDAwNg==
^ Tocci, R. 2006. Digital Systems: Principles and Applications (10th Edition). Prentice
Hall. ISBN 0-13-172579-3
Digital Systems.
Endless List
[SHO]
The Course
20
Course Outline
Week
1
Topic
Introduction
Verilog + Sequential
Logic
Synthesis in Verilog
Micro-Architecture
Controllers
Optimizing Speed
Optimizing Area
FIR Implementation FIR Implementations + Pipelining & Parallelism in Non Recursive DFGs
Course Outline
Week Topic
10
Cross Clock Domain (CDC)
Issues
11
Fixed-Point Arithmetic &
Addition
12
Multipliers
13
Approximate Computing
13
CORDIC
14
Algorithmic Transformations
for Recursive DFGs
15
16
Algorithmic Transformations
for Recursive DFGs
17
Project
Project Presentations
Micro-Coded Controllers
Representation of Non Recursive DFGs & Optimizations for Non Recursive DFGs
10
11
13
14
Approximate Computing
15
CORDIC (sine, cosine, magnitude, division, etc) & HW- TERM PROJECT-END
16
17
Selected Topics, DFG representation of Recursive DSP Algorithms, Iteration Bound &
Optimization
TERM PROJECT-START
Relevant Books
25
Reference/Related Books
26
Distribution
27
Quizzes
Assignment
Research Project
OHT1
OHT2
Final
10%
10%
15%
15%
15%
35%
Relevant Conferences
28
IEEE/ACM ICCAD
FPL (International Conference on Field- Programmable Logic
and Applications)
FPL FPGA (http://www.fpl.uni-kl.de/fpl/)
ES Week : International Conference on Hardware - Software
Codesign and System Synthesis
DATE - Design, Automation, and Test in Europe
IEEE Symposium on Computer Arithmetic ISCA
Applied Reconfigurable Computing ARC
Engineering of Reconfigurable Systems and Algorithms ERSA
Design Automation Conference DAC
International Symposium on High-Performance Computer
Architecture - HPCA
Relevant Journals
29
Verilog Tutorial
http://www.asic-world.com/verilog/veritut.html
http://www1.cs.columbia.edu/~hgs/etc/writing-style.html
31
Class Ethics
Attendance
Respect for all & classroom discipline
Quizzes
Never cheat
Anytime
Plagiarism
No copying
PLAGIARISM
33
Oh !
I forgot to
replace-all the
variable names..
34
or even more
Questions.
37
Assessment
Status quo Where we stand?
Please do fill in the GOOGLE Survey form that
I shall be sharing with you !
int a,b,c,d,e,f,r1,r2,r3,r4,rr1,rr2
Verilog Code
my_verilog_module (
inputs: a,b,c,d,e,f,g,h
Outputs: Result)
wire a,b,c,d,e,f,r1,r2,r3,r4,r5
----------
r1= a+b;
r1= a+b;
r2 = c+d;
r2 = c+d;
r3 = e+f;
r3 = e+f;
r4 = g+h
r4 = g+h
rr1 = r1+r2
rr1 = r1+r2
rr2= r3 + r4;
rr2= r3 + r4;
Verilog Code
Gets sequentially
executed on a processor
A datapath is created
& its parallel & this is where
H/W benefit comes
a,b
Instructions Queue
r1= a+b;
r2 = c+d;
r3 = e+f;
r4 = g+h
rr1 = r1+r2
rr2= r3 + r4;
Result = rr1 + rr2;
Controller
ALU
Memory
c,d
e,f
g,h
44
The number of transistors on a chip was doubling every 18 to 24 months and made the prediction for future
[SHO]
Design Options/Space
46
Programming flexibility
Programming flexibility. Optimized Architectures for DSP Applications e.g. dedicated MAC units
Reconfigurable Hardware
Hybrid Architectures
Canon DIGIC 5+
Application Specific Instruction Set Processor
http://thenewcamera.com/wp-content/uploads/2012/01/Canon-1D-X-processing-syste.jpg
http://www.dancewithshadows.com/tech/wp-content/uploads/2009/03/canon-eos-t1i-photo.jpg
Hybrid Architectures
New Trend
Pre-Fabrication Customization
For example Xilinx ZYNQ architecture where you have a dual core ARM processor
closely coupled with reconfigurable logic that can be used as a hardware accelerator.
The future..
Hybrid Architectures
Pre-Fabrication
Compile Time Customization
Xtensia from
Tensillica
Hybrid Architectures
New Trend
Pre-Fabrication Customization
For example Xilinx ZYNQ architecture where you have a dual core ARM processor
closely coupled with reconfigurable logic that can be used as a hardware accelerator.
The future..
Hybrid Architectures
Post Fabrication
reconfigurable
Enhancements
Xilinx
ZYNQ 7000
Application
Specific
Custom
Dedicated
Design
[SHO]
Applications are
characterized by amount
of data, parallelism, real
time requirements.
And..
Time to market
Cost
Quantity
Power Requirements
Standard Tasks/Protocols/Interfaces/Encoding
Consist of code that has loops with no/less dependencies. For example array operations
Adaptive Algorithms with multiple IF/Else such as Motion Vector Estimation, Matrix^Power
User interfaces, control processes, system controllers and other code intensive protocols are
usually mapped on GPPs or microcontrollers.
Multiple interrupts & Complex Scheduling are conveniently handled by Operating Systems so
better handled by instruction based Processors
A typical system
57
Application
Specific
Custom
Dedicated
Design
[SHO]
http://www.openmoko.com/freerunner.html
A little exercise
59
Wifi, Bluetooth,
An examples
60
..& you
need an
OS too
Memory
Of-theshelf
ASIC
Custom
Design
In a modern architecture
Everything on a single system on chip (SoC)
Reading Assignment
62
LECTURE-2
DIGITAL DESIGN
METHODOLOGY
http://nigamanth.net/vlsi/category/asic-design-flow/
Arch. Spec.
(Macro
Architecture)
Micro-Architecture
Document
(DetailedDesign,
DesignPartition)
(Design Entry)
HDL
Pre synthesis
Sign-Off
Design
Integration &
Verification
Functional
Verification
Simulation
Synthesize &
Map Gate-Level
Netlist
Post synthesis
Design
Verification
Test Generation
& Fault
Generation
Clock Trees
Cell Routing
Extract Parasitics
Design Sign-Off
Design Methodology
Marketing Requirement
Document (MRD)
Architecture Specification
(Macro Architecture)
Block diagrams
Sample
Architecture
69
Design Methodology
Design Specification
Micro Architecture
Design Partitioning
Control vs. datapath separation
Interconnection structures
(modules) within datapath
Design Methodology
RTL HDL Design
(Register Transfer Level)
72
Behavioral descriptions
Testbench Development
Design Methodology
Design Integration and
Verification
73
Integrate
Bugs lurking in the interface
behavior among modules
The Testbench
Test Vectors
Full functionality
Demonstrated
Make sure that the behavior
specification (HDL) meets
the design specification
(coded in HDL or system
verilog)
Design Methodology
Gate-Level Synthesis and
Technology Mapping
Synthesize the design from
the behavior description
Map onto target
technology
Optimizations
74
Minimize logic
Reduce area
Reduce power
Balance speed vs. other
resources consumed
Produces netlist of
standard cells(for ASICS)
or database to configure
LUTs (for FPGAs)
Post-synthesis Design
Validation
Design Methodology
Post synthesis Timing
Verification
75
architecture
Choose a different target
device or technology
ASIC Specific
Determining Parastics /
Interference
Arch. Spec.
(Macro
Architecture)
Micro-Architecture
& Design Partition
Design Entry
HDL
Pre synthesis
Sign-Off
Design
Integration &
Verification
Functional
Verification
Simulation
Synthesize &
Map Gate-Level
Netlist
Post synthesis
Design
Verification
Test Generation
& Fault
Generation
Clock Trees
Cell Routing
ASIC Specific
Design Sign-Off
Extract Parasitic
Reading Assignment
77
ASIC's
Questions.
Related Reading
Section
2.5.2
2.5.3.1
2.5.3.2
81
Verilog Basics
Todays Lecture
Modules in Verilog
Instantiating a Module
Gate Level Modeling in Verilog
Data Flow Level Modeling in Verilog
Conditional
Behavioral Level
CASE,
IF-ELSE
Verilog
83
HW or SW ?
Verilog --- Programming language ?
Verilog
HW
Description
In H/W Everything
is always active
Creates
your Datapath/Circuit
Its simulation is Event Based
Verilog
Data Types
85
net
reg
Word Size
wire
[7:0] data_bus;
// A bus of width 8
//8 bit bus, with bit-7 as the most significant
Memories
Vectors
reg
reg
mem1bit [0:1023];
[7:0] membyte [0: 1023];
Others
// 1K 1 bit words
// 1K 8 bit words
Examples
Example
(Use This)
Accessing 3D Array
d[1][0][0] = data;
d[1][0][0] [3:0]= 4b1010;
e = d[3][1][0][3:0];
http://www.sutherland-hdl.com/papers/2000HDLCon-paper_Verilog-2000.pdf
Constants
Verilog
89
Comments //
Number Specification
Output_Data
Input_Data
wire Input_Data;
wire Output_Data;
wire Output_Enable;
assign Input_Data = IO_Pad;
assign IO_Pad
= Output_Enable ? Output_Data : 1bz
IO_PAD
Outside
Verilog Module
HA
HA
FA
gate(out,in1,in2)
[CIL]
Verilog 1995
module HA_GateLevel(
input a, b ,
output c_o, s_o
);
Module Logic
Comb./Seq.
xor (s_o,a,b);
and (c_o,a,b);
xor (s_o,a,b);
and (c_o,a,b);
End Module
endmodule
endmodule
Intermediate
Connections, Wire
Declarations
Module
Declaration &
Port Listing
module FA(
input a,b,c_in,
output sum, cout
);
Intermediate
Connections, Wire
Declarations
wire s1,c1,c2;
Instantiation
of
Lower Level
Modules &
Port
Connection
(2001)
Module Logic
Comb./Seq.
End Module
HA_GateLevel HAB1 (
.a(a),
.b(b),
.c_o(c1),
.s_o(s1)
);
HA_GateLevel HAB2 (
.a(c_in),
.b(s1),
.c_o(c2),
.s_o(sum)
);
or(cout,c2,c1);
endmodule
module HA_GateLevel(
input a, b ,
output c_o, s_o
);
xor (s_o,a,b);
and (c_o,a,b);
endmodule
module HA_GateLevel(
input a, b ,
output c_o, s_o
);
xor (s_o,a,b);
and (c_o,a,b);
endmodule
Module
Declaration &
Port Listing
module FA(
input a,b,c_in,
output sum, cout
);
Intermediate
Connections, Wire
Declarations
wire s1,c1,c2;
Instantiation
of
Lower Level
Modules &
Port
Connection
(2001)
Module Logic
Comb./Seq.
End Module
HA_GateLevel HAB1 (
.a(a),
.b(b),
.c_o(c1),
.s_o(s1)
);
HA_GateLevel HAB2 (
.a(c_in),
.b(s1),
.c_o(c2),
.s_o(sum)
);
or(cout,c2,c1);
endmodule
wire
wire
InOut
Dataflow Statements
assign out = in1 & in2
wire out = in1 & in2
endmodule
Output
wire
Example
[SHO]
[SHO]
This
method is
better for
block with
greater no.
of ports