Professional Documents
Culture Documents
CIRCUIT
Prepared by :Mariyum Jamshid
Design Methodology
• Top down
• Bottom up
• In general a hybrid of the two is used
Top Down Design Methodology
• We define the top level blocks and identify the
sub blocks necessary to build the top level
block.
• We further sub divided the sub-blocks until we
come to leaf cells which are the cells that
cannot further be divided.
Top Down Design Methodology
Top Down Design Methodology
• In other words
• Define the final (top level) module
• Analyze the components which are composed
of top module step by step
Bottom Up Design Methodology
• We first identify the building blocks that are
available to use
• We build bigger cells using these building
blocks
• These cells are then used for higher level
blocks until we build the top level block in the
design
Bottom Up Design Methodology
Bottom Up Design Methodology
• In other words,
• Design the basic components
• Assemble basic components to larger design
until the top design is completed
Design Methodology Example
IN1
OUTPUT
IN2
IN3
S1
S0
Test bench
/* $display is a system task to display expressions, values and
strings (similar to printf in C),
%b displays in binary format see details in 3.3.1.
#1 timing delay. It means that the instruction will be executed
after 1 time unit.*/
Test bench Output
Simulate the design given below
Design code:
and and g(out, i1, i2, …) Performs AND operation on two or more inputs
xor xor g(out, i1, i2, …) Performs XOR operation on two or more inputs
nand nand g(out, i1, i2, …) Performs NAND operation on two or more inputs
nor nor g(out, i1, i2, …) Performs NOR operation on two or more inputs
xnor xnor g(out, i1, i2, …) Performs XNOR operation on two or more inputs
Gate types Syntax Description
The buffer (buf) passes input to the output as it is. It
buf buf g(out, in) has only one scalar input and one or more scalar
outputs.
bufif1 g(out, in, It is the same as buf with additional control over the
bufif1 control) buf gate and drives input signal only when a control
signal is 1.
notif1 g(out, in, It is the same as not having additional control over
notif1 control) the not gate and drives input signal only when a
control signal is 1.
bufif0 g(out, in, It is the same as buf with additional inverted control
bufif0 control) over the buf gate and drives input signal only when a
control signal is 0.