Digital System Design Using Verilog
Digital System Design Using Verilog
Communication Engineering 1
Digital circuit design has evolved rapidly over the last
25 years.
The earliest digital circuits were designed with vacuum
Structural Functional
High level of
abstraction
Low level of
abstraction
“Y-chart” due to
Gajski & Kahn
Geometric
School of Electronics and
Communication Engineering 10
Domains and Levels of Modeling
Structural Functional
Algorithm
(behavioral)
Register-Transfer
Language
Boolean Equation
Differential Equation
“Y-chart” due to
Geometric Gajski & Kahn
Structural Functional
Processor-Memory
Switch
Register-Transfer
Gate
Transistor
“Y-chart” due to
Gajski & Kahn
Geometric
School of Electronics and
Communication Engineering 12
Domains and Levels of Modeling
Structural Functional
Polygons
Sticks
Standard Cells
Floor Plan
Field Reprogramability:
A new bitstream ( i.e. your program) can be uploaded
remotely, instantly. FPGA can be reprogrammed . But
not possible with ASIC.
School of Electronics and
Communication Engineering 21
Reusability:
Prototype of the design can be implemented on FPGA
which could be verified for almost accurate results so
that it can be implemented on an ASIC.
Low power:
ASIC can be optimized for required low power. There are several low
power techniques such as power gating, clock gating, cell libraries,
pipelining etc are available to achieve the power target.
Expensive Tools:
ASIC design tools are very much expensive. You spend a huge amount.
Xilinx FPGA
Configuration
School of Electronics and
Communication Engineering
12/1
26
A field-programmable gate array (FPGA) is a logic
device that contains a two-dimensional array of
generic logic cells and programmable switches.
The next few lines specifies the i/o type and width of each port. The default port
width is 1 bit.
Then the port variables must be declared wire, wand,. . ., reg The default is wire.
Typically inputs are wire since their data is latched outside the module.
Outputs are type reg if their signals were stored inside an always or initial block
endmodule
School of Electronics and
Communication Engineering 34
Note : All keywords are defined in lower case
Examples :
module, endmodule
input, output, inout
reg, integer, real, time
not, and, nand, or, nor, xor
parameter
begin, end
fork, join
specify, endspecify
Syntax
input [msb:lsb] input_port_list;
output [msb:lsb] output_port_list;
inout [msb:lsb] inout_port_list;
X: unknown
A = 1; A && B 1 && 0 0
B = 0; A || !B 1 || 1 1
C = x; C || B x || 0 x
but
butC&&B=0
C&&B=0
a = 4’b1010;
b = 4’b1100;
c = a ^ b;
a = 4’b1010;
b = 2’b11;
A
1
Y
B Y = (sel)? A : B;
0
sel
count[5]
chk_point[100]
port_id[3]
Note the difference between vectors and arrays