NM1038 Manual
NM1038 Manual
COLLEGE OF ENGINEERING
COLLEGE ROAD, AYIKUDI, TENKASI – 627852
Approved by AICTE – New Delhi & Affiliated to Anna University, Chennai
DEPARTMENT OF ECE
NAME :
REGISTER NUMBER :
REGULATION : 2021
DEPARTMENT OF ECE
2024-2025
Mr/Ms...................................................Reg.No...........................................of Third
year, VII Semester B.E ECE in the NM1038 - IC CHIP DESIGN & VERIFICATION
Submitted for the Anna University Practical Examination held on _____________at J.P. College of
Engineering, Ayikudi, Tenkasi-627 852.
3. Synthesis:
o Convert the RTL design into a gate-level netlist using a synthesis tool.
This involves mapping high-level descriptions to specific logic gates
and flip-flops.
4. Physical Design:
o Translate the netlist into a physical layout, specifying where
transistors, wires, and other elements will go on the chip.
o Key steps include placement, clock tree synthesis, routing, and
ensuring timing constraints are met (Timing Closure).
o The result is a GDSII file used for fabrication.
Verification ensures that the design meets the specifications and works as intended before
fabrication. This process is crucial because any error found aftertapeout can be extremely costly.
Verification can be divided into various categories:
1. Functional Verification:
o Verify that the design behaves according to the specification. This isoften the
most time-consuming process.
o Simulation is the most common approach, where the design istested with
various input vectors to ensure correctness.
o Formal Verification: Uses mathematical proofs to verify that the design
matches the specification. It’s particularly useful for checkingcorner cases.
o Assertion-Based Verification: Uses specific properties orassertions
within the RTL code that must always hold true.
o Equivalence Checking: Ensures that the RTL design matches thegate-level
implementation after synthesis.
2. Timing Verification:
o Static Timing Analysis (STA): Verifies that all signal paths meet the timing
constraints, such as setup and hold times.
o Dynamic Timing Analysis: Simulates actual signal propagationthrough the
design, considering delays and variability in the fabrication process.
3. Power Verification:
o Ensures the design meets power consumption targets, both fordynamic
and static power.
o Power-Aware Simulation: Verifies that the design's power management
mechanisms work correctly.
4. Physical Verification:
o Ensures the physical layout meets the foundry’s manufacturing
requirements.
o This includes:
Design Rule Checking (DRC): Ensures the layout adheresto the
manufacturing process rules.
Layout vs. Schematic (LVS): Verifies that the physicallayout
matches the original circuit schematic.
Antenna Rule Checking: Ensures that long metal routes donot
accumulate too much charge during fabrication, which can damage the
chip.
5. Pre-Silicon Validation:
o Before tapeout, hardware emulation platforms or FPGA prototyping may be
used to validate the design in a near-real environment, allowing the testing of
software alongside the hardware.
6. Post-Silicon Validation:
o Once the chip is fabricated, it’s tested in real-world conditions to ensure it
functions correctly. This can reveal manufacturing defects orunforeseen issues in
the design.
Tools and Methodologies
Challenges
Early IC Design:
o Briefly describe the early days of IC design (1970s–1980s) and simple microchips
(e.g., the Intel 4004).
o Mention early verification techniques, which were manual and verytime-
consuming.
IC Verification Process
Functional Verification:
o Describe how functional verification ensures the design meets
specifications.
o Example: How UVM (Universal Verification Methodology) and
SystemVerilog enable reusable test environments.
Static and Dynamic Timing Analysis:
o Explain the significance of timing verification to ensure the chipoperates
within speed and power constraints.
Power Verification:
o Discuss the growing importance of power-aware verification inmobile
and IoT devices.
Physical Verification (DRC, LVS):
o Importance of physical verification before tapeout to avoid
manufacturing issues.
Increasing Complexity:
o Discuss how modern SoCs consist of billions of transistors, makingdesign and
verification extremely challenging.
o Example: The verification of a high-end SoC with multiple cores,GPUs, and
accelerators.
Power vs. Performance Trade-offs:
o How designers must optimize for performance, while managing
heatand power consumption, particularly in mobile and edge
devices.
Design Cycles and Time-to-Market Pressure:
o The impact of shortened product development cycles on the
designand verification process.
Verification Bottlenecks:
o Functional verification often takes up to 70% of the entire
designcycle. Mention why this is a critical bottleneck.
Emerging Trends in IC Design and Verification
1
TABLE OF CONTENTS
2
PIN DIAGRAM:
TRUTH TABLE:
3
EX.NO: 01 DESIGN AND IMPLEMENTATION OF A
DATE: 12.09.24
4:2 ENCODER
AIM:
To design and implement a 4:2 Encoder.
THEORY:
An encoder is a device or algorithm that converts information from one format
or representation to another. In the context of electronics, computer science, and
communication, encoders are used to transform data into a format suitable for
transmission, storage, or further processing.
1. Digital Encoder (Mechanical Encoder): These are used in machines like motors,
robotics, and industrial equipment. They convert mechanical position or movement
into a digital signal (e.g., rotary or linear encoders). and typically output binary
signals that represent the position or direction of motion.
4
PROGRAM:
DESIGN CODE:
module encoder(
input y0,
input y1,
input y2,
input y3,
output[1:0] out
);
assign out[0] = y3|y1;
assign out[1] = y3|y2;
endmodule : encoder
RESULT:
Thus the 4:2 Encoder circuit was designed, implemented and the output was
verified.
5
PIN DIAGRAM:
TRUTH TABLE:
y1 y0 out [3] out [2] out [1] out [0]
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
6
EX.NO: 02 DESIGN AND IMPLEMENTATION OF A
DATE: 19.09.24
2:4 DECODER
AIM:
To design and implement a 2:4 Decoder.
THEORY:
A decoder is an electronic or computational device used to translate coded or
encoded information back into its original form. It works in reverse of an encoder,
which transforms data into a coded format for transmission or storage. The decoder
essentially "decodes" the encoded signal to retrieve the original data.
(2 to 4) Decoder: The (2 to 4) decoder consists of two inputs y1and y0, and four
outputs 0 1 2 3. (4 to 2) decoder decodes the information from 2 inputs into a 4-bit
code.
7
PROGRAM:
DESIGN CODE:
module decoder(
input y0,
input y1,
output[3:0] out
);
RESULT:
Thus, the 2:4 Decoder circuit was designed, implemented and the output was
verified.
8
PIN DIAGRAM:
TRUTH TABLE:
A B sum carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
9
EX.NO: 03 DESIGN AND IMPLEMENTATION OF A
DATE: 27.09.24
1-BIT HALF-ADDER
AIM:
To design and implement a 1-Bit half-adder.
THEORY:
A half adder is a basic digital circuit used in binary arithmetic to add
two single-bit binary numbers. It produces two outputs:
1. Sum (S): The XOR (exclusive OR) of the two input bits.
S=A⊕B
2. Carry (C): The AND of the two input bits, which represents the
carry-out to the next higher bit position.
C=A⋅B
If both inputs are 0, the sum is 0, and there is no carry. If one input is
1 and the other is 0, the sum is 1, and there is no carry. If both inputs are
1, the sum is 0 (since 1 + 1 = 10 in binary), and there is a carry of 1 to the
next bit.
10
PROGRAM:
DESIGN CODE:
module half_adder(
input A,
input B,
output sum,
output carry
);
always @(*)begin
sum = A^B;
carry = A & B;
end
endmodule : half_adder
RESULT:
Thus the 1-Bit half- adder circuit was designed, implemented and the
output was verified.
11
PIN DIAGRAM:
TRUTH TABLE:
A B C sum carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
12
EX.NO: 04 DESIGN AND IMPLEMENTATION OF A
DATE: 03.10.24
1-BIT FULL-ADDER
AIM:
To design and implement a1-Bit full-adder.
THEORY:
A full adder is a digital circuit used in computing and electronics to
perform the addition of three binary bits: two significant bits A and B and
a carry-in bit Cin. The full adder produces two outputs:
13
PROGRAM:
DESIGN CODE:
module full_adder(
input A,
input B,
input C,
output sum,
output carry
);
always @(*)begin
sum = (A^B)^C;
carry = (A & B) | (A ^ B);
end
endmodule : full_adder
RESULT:
Thus the 1-Bit full adder circuit was designed, implemented and
the output was verified.
14
PIN DIAGRAM:
TRUTH TABLE:
15
EX.NO: 05 DESIGN AND IMPLEMENTATION OF A 4:1
DATE: 17.06.24 MULTIPLEXER
AIM:
To design and implement a 4:1 Multiplexer.
THEORY:
A multiplexer is a combinational circuit that has 2n inputs, n select
lines, and one output. Multiplexer selects one of the inputs and passes the
input through the output pin based on the select line.
4:1 Multiplexer has four data inputs y3, y2, y1 &y0, two selection
lines sel 0 &sel1 and one output out. One of these 4 inputs will be
connected to the output based on the combination of inputs present at
these two selection lines.
PROGRAM:
DESIGN CODE:
module mux(
input y0,
input y1,
input y2,
input y3,
input [1:0] sel,
output out
);
16
reg out_s;
always @(y0 or y1 or y2 or y3 or sel) begin
case(sel)
'b00 : begin
out_s = y0;
end
'b01 : begin
out_s = y1;
end
'b10 : begin
out_s = y2;
end
'b11 : begin
out_s = y3;
end
endcase
end
RESULT:
Thus the 4:1 Multiplexer circuit was designed, implemented and the
output was verified.
17
PIN DIAGRAM:
18
EX.NO: 06 DESIGN AND IMPLEMENTATION OF A RISE
DATE: 24.10.24 EDGE DETECTOR
AIM:
To design and implement a rise edge detector.
THEORY:
A rise edge detector is a digital circuit or logic function used to
detect the transition from a low voltage level (logic 0) to a high voltage
level (logic 1) on a signal. It responds specifically to the rising edge of a
signal.
1. Input Signal: The signal being monitored (e.g., a clock or any other
waveform).
2. Detection: The edge detector monitors the state of the input signal and
detects when it changes from 0 to 1, which is referred to as the rising
edge.
3. Output: The circuit produces an output pulse when a rising edge is
detected. This pulse is typically very brief and occurs at the moment the
input signal transitions from low to high.
The clock input of the flip-flop is connected to the signal you are
monitoring. The D input is connected to the delayed version of the signal,
usually with a slight delay (using a simple inverter or buffer). The flip-
flop will output a logic high only for one clock cycle when the input
signal rises from 0 to 1.
19
PROGRAM:
DESIGN CODE:
module rise_edge_detector(
reg a_r;
input clk,
input rst_n,
input a,
output rise_edge_o
);
always @(posedge clk or negedge rst_n) begin
if(!rst_n) begin
a_r <=0;
end
else begin
a_r <= a;
end
end
assign rise_edge_o = !a_r & a;
endmodule : rise_edge_detector
RESULT:
Thus the rise edge detector circuit was designed, implemented and
the ouput was verified.
20
PIN DIAGRAM:
21
EX.NO: 07 DESIGN AND IMPLEMENTATION OF A FALL
DATE: 24.10.24 EDGE DETECTOR
AIM:
To design and implement a fall edge detector.
THEORY:
A fall edge detector is a type of circuit or algorithm designed to
detect the falling edge of a signal. The falling edge occurs when a signal
transitions from a high state (logic 1) to a low state (logic 0). In digital
electronics, this can be important for timing or triggering specific actions
when a signal's state drops.
1. Signal Input: The circuit or algorithm monitors the input signal, which
is usually a square wave or a digital signal that oscillates between high
and low states.
2. Edge Detection: The detector identifies a transition in the signal from a
high to a low state. This falling edge can be detected by examining the
signal's changes over time.
3. Triggering: Once the falling edge is detected, the circuit can trigger an
event, such as sending a pulse or activating another process.
22
PROGRAM:
DESIGN CODE:
module fall_edge_detector(
input clk,
input rst_n,
input a,
output fall_edge_o
);
reg a_r;
always @(posedge clk or negedge rst_n) begin
if(!rst_n) begin
a_r <=0;
end
else begin
a_r <= a;
end
end
assign fall_edge_o = a_r & !a;
endmodule : fall_edge_detector
RESULT:
Thus the fall edge detector circuit was designed, implemented and
the output was verified.
23
PIN DIAGRAM:
PINDESCRIPTION:
24
EX.NO: 08 DESIGN AND IMPLEMENTATION OF A 16-BIT
DATE:07.11.2024 ADDER
AIM:
To Designandimplementationofa16-bit adder.
THEORY:
A 16-bit adder is a digital circuit that performs the addition of two
16-bit binary numbers. It is an extension of smaller adders, such as 4-bit
or 8-bit adders, to accommodate larger binary values.
Full Adder Units: Each bit of the binary number is added using a full
adder. A full adder takes three inputs: two bits (from the numbers being
added) and a carry bit (from the previous stage). It produces two outputs:
a sum bit and a carry bit.
Carry Propagation: The carry output from one bit’s addition is passed
to the next higher bit. This process is repeated until the most significant
bit (MSB).
PROGRAM:
DESIGN CODE:
module my_adder (
input valid_i,
input [15:0] data_1,
input [15:0] data_2,
output [16:0] data_out,
output valid_o,
25
input clk,
input rst_n
);
reg [15:0] data_1_r, data_2_r;
reg valid_1d, valid_2d;
reg [16:0] out_s, out_r;
always @ (posedge clk or negedge rst_n) begin
if (! rst_n) begin
data_1_r <= 0;
data_2_r <= 0;
valid_1d <= 0;
end
else begin
valid_1d <= valid_i;
if(valid_i) begin
data_1_r <= data_1;
data_2_r <= data_2;
end end
end
always @(data_1_r or data_2_r) begin
out_s = {1'b0,data_2_r} + {1'b0,data_1_r};
end
26
always @(posedge clk or negedge rst_n) begin
if(!rst_n) begin
out_r <= 0;
valid_2d <= 0;
end
else begin
valid_2d <= valid_1d;
if(valid_1d) begin
out_r <= out_s;
end
end end
assign valid_o = valid_2d;
assign data_out = out_r;
end module : my_adder
RESULT:
Thus, the 16-Bit adder circuit was designed, implemented and the
output was verified.
27
EX.NO: 09 VERIFICATION OF A 16-BIT ADDER DESIGN
DATE: 14.11.24
AIM:
To verify a 16-bit adder design.
THEORY:
A 16-bit adder is a digital circuit that performs the addition of two
16-bit binary numbers. It is an extension of smaller adders, such as 4-bit
or 8-bit adders, to accommodate larger binary values.
Full Adder Units: Each bit of the binary number is added using a full
adder. A full adder takes three inputs: two bits (from the numbers being
added) and a carry bit (from the previous stage). It produces two outputs:
a sum bit and a carry bit.
Carry Propagation: The carry output from one bit’s addition is passed
to the next higher bit. This process is repeated until the most significant
bit (MSB).
PROGRAM:
28
// local variable logic clk;
logic rst_n;
logic valid_i;
logic [DATAIN_WIDTH-1:0] data_1;
logic [DATAIN_WIDTH-1:0] data_2;
logic [DATAOUT_WIDTH-1:0] data_out;
logic valid_o;
bit [DATAOUT_WIDTH-1:0] exp_data_q[$];
bit [DATAOUT_WIDTH-1:0] act_data_q[$];
29
endtask : drive_input_signal
// input monitor
task input_monitor();
bit[DATAOUT_WIDTH-1:0] dataout;
forever begin
if(valid_i==1) begin
dataout = data_1 + data_2;
exp_data_q.push_back(dataout);
end
@(posedge clk);
end
endtask : input_monitor
// output monitor
task output_monitor();
forever begin
if(valid_o==1) begin
act_data_q.push_back(data_out);
end
@(posedge clk);
end
endtask : output_monitor
// check the expect and actual data t
ask check_exp_act();
bit[DATAOUT_WIDTH-1:0] act,exp;
forever begin
if(act_data_q.size>=1) begin
if(exp_data_q.size==0)
$error("DUT generates output without provided any input");
else begin
act = act_data_q.pop_front ;
exp = exp_data_q.pop_front ;
if(act == exp)
$display("expect data %0d == actual data%0d ",exp,act);
else
$error("expect data %0d != actual data %0d",exp,act);
end
end
@(posedge clk);
end
endtask : check_exp_act
30
function void reset_input_signals();
valid_i = 'b0;
data_1 = 'bx;
data_2 = 'bx;
endfunction : reset_input_signals
// reset generation
task reset_generation();
@(posedge clk);
rst_n = 0;
repeat(RESET_PERIOD) begin
@(posedge clk);
end
rst_n=1;
endtask : reset_generation
// clock generation
task clock_generation();
clk=0;
forever begin
#(CLOCK_PERIOD/2)
clk=~clk;
end
endtask : clock_generation endmodule: tb_top
RESULT:
31
PIN DIAGRAM:
PIN DESCRIPTION:
32
EX.NO: 10 VERIFICATION OF A MIN-MAX
DATE: 21.11.24 CALCULATOR DESIGN
AIM:
To verify a MIN-MAX calculator design.
THEORY:
A min-max calculator is a tool used to determine the
minimum and maximum values within a set of data or a range. It is often
used in various contexts, such as statistics, programming, and
optimization problems. It is a simple yet powerful tool for extracting
insights from numerical data.
2. Process: The calculator compares all the values in the dataset or range.
It identifies the smallest (minimum) and largest (maximum) numbers.
3. Output: Minimum value is the lowest number in the set or range and
the maximum value is the highest number in the set or range.
Array of Numbers:
If you have the following set of numbers: `[7, 5, 2, 9, 4]`, the min-max
calculator would:
- Find the minimum value: `2`
- Find the maximum value: `9`
Range of Values:
If you have a range from 1 to 100, the min-max calculator would:
- Minimum value: `1`
- Maximum value: `100`
Applications:
Data Analysis: To find the range of values in a dataset.
Normalization: In machine learning, min-max normalization is used to
scale data to a specific range (e.g., 0 to 1).
Optimization: In mathematical problems where you need to find the best
possible outcomes (maximum) or the worst (minimum).
33
TIMING DIAGRAM:
34
PROGRAM:
35
cnt++; P a g e | 30 end
if(cnt==count) begin
exp_data_q.push_back(dataou
t); cnt = 0; dataout = 0; end
end @(posedge clk); end
endtask : input_monitor //
output monitor task
output_monitor(); forever
begin if(output_valid==1)
begin
act_data_q.push_back(data_o
ut); end @(posedge clk); end
endtask : output_monitor //
check the expect and actual
data task check_exp_act();
bit[WIDTH-1:0] act,exp;
forever begin
if(act_data_q.size>=1) begin
if(exp_data_q.size==0)
$error("DUT genearates
output without provided any
input"); else begin act =
act_data_q.pop_front ; exp =
exp_data_q.pop_front ; if(act
== exp ) $display("expect
data %0d == actual data %0d
",exp,act); else $error("expect
data %0d != actual data %0d
",exp,act); end end P a g e | 31
@(posedge clk); end endtask :
check_exp_act // reset input
signals function void
reset_input_signals();
input_valid = 'b0; data_in =
'bx; count = 'bx; opcode = 'bx;
endfunction:
36
reset_input_signals // reset
generation task
reset_generation();
@(posedge clk); rst_n = 0;
repeat(RESET_PERIOD)
begin @(posedge clk); end
rst_n=1; endtask :
reset_generation // clock
generation task
clock_generation(); clk=0;
forever begin
#(CLOCK_PERIOD/2);
clk=~clk; end endtask :
clock_generation endmodule :
tb_top
RESULT:
37