Vlsi Report Final
Vlsi Report Final
CHAPTER 1
INDUSTRIAL INTERNSHIP
WIINNR is an unique future skill training program where industry, academia and
government comes together to offer training by experts from industry and academia. In the
rapidly evolving job market, having the right set of skills is more crucial than ever. WIINNR
is designed to equip you with the industry-relevant knowledge and hands-on experience
necessary to excel in your chosen career. This program is a rare opportunity where leading
industry giants and esteemed academic institutions have come together to create a pathway
that transforms students into highly employable graduates.
Duration: The WIINNR internship training spans around 400 hours in the Final Year,
allowing you to effectively manage your academic coursework alongside skill development.
Mode of Delivery: The training will be delivered through a blend of online and in-person
sessions, utilizing state-of-the-art audio-visual facilities at your respective colleges.
CHAPTER 2
ORGANISATION
I. Rooman Technologies
As a leader in IT certifications and future skills, Rooman Technologies will provide 165 hours of core subject
training. This intensive training is led by industry experts who bring real-world insights and practical knowledge
to the classroom. The focus is on ensuring that you not only grasp theoretical concepts but also learn how to
apply them effectively in professional settings.
II. IBM
IBM, a global leader in technology and innovation, will offer 90 hours of project-based learning. This hands-on
approach will allow you to work on real projects, giving you the opportunity to apply your skills in a practical
environment. Upon completion, you will receive a certificate of project completion from IBM, a credential that
will significantly enhance your resume.
One of India’s premier institutions, IIT Guwahati, will provide 30 hours of advanced training on cutting-edge
topics. In addition to this, IIT Guwahati will offer a one-month research internship at their campus to 2-3
selected candidates from each college. This prestigious opportunity will allow you to engage in high-level
research and development, further honing your skills and expanding your academic and professional horizons.
Understanding the importance of soft skills in today’s job market, the Wadhwani Foundation will offer 75 hours
of soft skills training. This course is designed to improve your communication, teamwork, leadership, and
problem-solving abilities, making you a well-rounded candidate who is ready to thrive in any work
environment.
In a bid to ensure that your transition from academia to industry is smooth, NASSCOM and NSDC will actively
engage with industries to facilitate internships and placement opportunities. This direct connection with
employers will give you a significant advantage in securing a position in the competitive job market
CHAPTER 3
INDUSTRIAL TRAINING
Rooman Technologies offers VLSI (Very Large Scale Integration) training, covering digital design,
VHDL/Verilog, and circuit simulation to help students gain practical expertise in chip design. VLSI
projects typically focus on designing and simulating integrated circuits, such as microprocessors or
custom ICs, using tools like FPGA or ASIC. The Wadhwani Foundation focuses on enhancing soft
skills such as communication, leadership, and time management through various training programs.
1. Gain hands-on experience in designing and simulating digital circuits using tools like
VHDL/Verilog.
2. Learn to work with FPGA or ASIC design platforms for practical implementation of VLSI
projects.
3. Understand the process of timing analysis, power optimization, and synthesis in VLSI design.
4. Develop problem-solving skills by working on real-world circuit design challenges.
5. Collaborate with teams to improve communication and teamwork skills in a technical
environment.
6. Enhance communication skills for presenting technical concepts clearly and effectively.
7. Develop leadership qualities to take initiative and manage small teams in projects.
8. Learn time management skills to handle multiple tasks efficiently in a fast-paced
environment.
9. Improve interpersonal skills for better collaboration with peers and mentors.
10. Build critical thinking abilities to approach complex design problems and find creative
solutions.
1. Communication Skills
Greetings and Introductions: Learning proper ways to introduce oneself and others.
Phone Conversations: Techniques for effective phone communication.
Articulation in Reading: Reading English texts with correct pronunciation and clarity.
Saying No Politely: How to refuse requests without sounding rude.
2. Writing Skills
3. Personal Development
6. Workplace Readiness
7. Technical Skills
The evolution of Computer-Aided Digital Design (CAD) and digital circuits has dramatically
transformed the way electronic systems are designed, especially in the realm of VLSI (Very-Large-
Scale Integration) and modern computing. Here’s an overview:
Manual Design: Digital circuits were initially designed manually on paper. Engineers used
logic gates and Boolean algebra to design and simulate circuits.
Limited Complexity: Due to manual design, only simple digital circuits with a limited
number of components could be realized.
VLSI Revolution: With the ability to integrate millions of transistors into a single chip, the
complexity of digital circuit design grew. EDA tools evolved to help handle the increasing
complexity.
Automated Design Flow: Tools were developed for logic synthesis, timing analysis, and
simulation. This era also saw the introduction of HDLs (Hardware Description Languages)
like Verilog and VHDL for higher-level abstraction in design.
SoC Design & High-Level Synthesis: With the integration of entire systems on a chip (SoC),
modern digital design tools like Verilog and SystemVerilog enable high-level synthesis and
automation.
Machine Learning in Design: AI and machine learning are starting to optimize the design
and verification processes, improving power efficiency, performance, and design time.
Digital Circuits process data using discrete signals (0s and 1s), relying on logic gates and memory
elements. Here’s a brief overview:
1. Basic Components:
o Logic Gates: The primary building blocks of digital circuits. They perform logical
operations (AND, OR, NOT, etc.) on binary inputs. Examples:
AND Gate: Outputs 1 only when both inputs are 1.
OR Gate: Outputs 1 if at least one input is 1.
o Flip-Flops: Memory elements that store binary data. They are used in sequential
circuits to remember past input states.
3. Binary Representation: Digital circuits use binary numbers (0s and 1s) to represent and
process data, making them ideal for computer systems and digital devices.
1. SystemVerilog:
This simple Verilog code describes a 2-input AND gate, where A and B are inputs, and Y is
the output.
History Facts:
1. Transistor Revolution:
The invention of the transistor in 1947 replaced vacuum tubes, leading to smaller, faster, and
more reliable electronic devices.
This revolution allowed for the rapid advancement of digital electronics, including computers,
communication systems, and other consumer electronics.
Moore's Law (proposed by Gordon Moore in 1965) predicted that the number of transistors
on a chip would double approximately every two years, leading to exponential growth in
computing power and the miniaturization of electronics.
The impact of Moore's Law has been profound, enabling the rapid evolution of
microprocessors and VLSI technology that power modern computing systems.
1. Verilog is a Hardware Description Language (HDL) used for modeling digital circuits at
various levels of abstraction, from high-level algorithmic descriptions to low-level gate-level
designs.
2. HDL Importance:
o Abstraction: Verilog allows for high-level abstraction, making it easier to model
complex circuits.
o Synthesis: HDL designs can be synthesized into gate-level implementations.
o Simulation: Verilog provides tools for simulating the behavior of digital systems to
verify correctness before hardware implementation.
1. HDLs (Hardware Description Languages): Verilog and VHDL are used to describe the
behavior and structure of digital hardware. They enable simulation, synthesis, and verification
of designs.
2. Levels of Abstraction:
o Behavioral Level: Describes the functionality of a circuit (e.g., if-else statements).
o Register-Transfer Level (RTL): Describes how data moves between registers in the
system.
o Gate-Level: Describes circuits in terms of logic gates (AND, OR, NOT, etc.).
Functional Modeling: At the higher abstraction level, describing the behavior of the system.
Structural Modeling: Describing the interconnection of components.
Timing and Power Modeling: Focus on optimizing the timing and power efficiency of the
design.
In summary, SystemVerilog and other HDLs play a crucial role in the digital design process,
allowing for efficient design, simulation, and verification of VLSI circuits. The development of
CAD tools and the ongoing evolution of transistor technology have made possible the powerful,
compact, and high-performance systems we use today.
Syntax refers to the set of rules that define the structure of valid Verilog statements (how the
code should be written).
Semantics refers to the meaning of those statements (what the code actually does or how it
behaves when executed).
2. Comments in Verilog:
Single-line comments start with //, and the comment ends at the end of the line.
3. Strings in Verilog:
4. Identifiers:
Identifiers are names given to variables, modules, and other design elements in Verilog.
They must start with a letter or underscore (_), followed by letters, digits, or underscores.
wire clk;
reg [7:0] data;
Binary: 4'b1010
Octal: 3'o7
Decimal: 5'd10
Hexadecimal: 8'hFF
These represent physical values used in simulation, like real values or time.
o Real: Used for floating-point numbers.
o Time: Used to represent simulation time.
real temperature;
time clk_time;
Nets represent connections between hardware elements, typically used for wires, buses, or
outputs.
o Wire: Default net type used to connect components.
o Reg: A variable that holds a value (used in procedural blocks).
Example:
wire clk;
reg [7:0] data;
8. Strength Levels:
Verilog allows specifying strengths for net variables. These are used to simulate physical
driving strengths.
o strong0, strong1, pull0, pull1, weak0, weak1, highz0, highz1
Example:
Advanced net types include tri, tri0, tri1, wand, wor, etc.
o Tri-state: A net type that can be driven to three states: logic 0, logic 1, and high
impedance (Z).
o tri type: A bidirectional net, often used for buses.
Gate-level modeling is the lowest level of abstraction, describing circuits in terms of logic
gates.
and (output, input1, input2); // AND gate
or (output, input1, input2); // OR gate
not (output, input); // NOT gate
Pull-up/pull-down gates are used to drive a signal to a defined value when no other signal is
driving it (used to resolve undefined states).
Tri-state gates allow multiple drivers to drive a net, but only one can drive it at a time (used in
buses).
Initial Block: Used for initializing values at the start of the simulation.
initial begin
data = 8'b00000000;
end
Parallel assignment (outside always or initial blocks) happens immediately and simultaneously.
assign a = b & c;
#5 a = 1;
Used in always or initial blocks to trigger actions based on the level of signals.
If-else:
if (a == 1) begin
data = 1;
end else begin
data = 0;
end
Case Statement:
case (a)
2'b00: data = 1;
2'b01: data = 2;
default: data = 0;
endcase
For Loop:
While Loop:
while (a == 1) begin
data = data + 1;
end
Break Statement:
generate
for (i = 0; i < N; i = i + 1) begin
// logic here
end
endgenerate
Task: A procedure that can have time delays and multiple input/output parameters.
task increment;
input [7:0] data;
begin
data = data + 1;
end
endtask
Function: A procedure that returns a value and cannot have time delays.
Department of Electronics and Communication Engineering
PDACEK, 2024-2025 Page 15
VLSI Design
Verilog allows the creation of custom logic functions using User Defined Primitives (UDP),
which are essentially user-defined gate-level models.
Describes behavior at the switch level, often used for modeling MOSFETs and other
transistors.
switch (a) begin
// logic based on transistor behavior
end
These tasks and functions allow interaction with the simulation environment. For example,
$display prints to the simulation log:
$display("Value of data: %b", data);
VCD files are used to store simulation waveforms. They record the value changes of signals
over time.
$dumpfile("wave.vcd");
$dumpvars(0, top);
Delays can be specified for different operations in Verilog to simulate real-world gate delays
and timing.
#5 a = 1;
System Verilog is an extension of Verilog, which provides advanced features for hardware design,
verification, and modeling. It combines the capabilities of hardware description languages (HDLs)
with features typically found in high-level programming languages, making it suitable for both design
and verification.
logic: Represents a 4-state value (0, 1, X, Z), often used in place of reg or wire.
reg: A data type used for storing values, similar to logic but primarily used in procedural
blocks.
Enum: Used for defining a set of named values (typically for state machines).
Arrays: SystemVerilog supports packed and unpacked arrays. Packed arrays store data in
a single contiguous block.
typedef struct {
logic [7:0] byte1;
Parameters: Constants used to define hardware configurations that are set at compile time.
parameter WIDTH = 8;
logic [WIDTH-1:0] data;
Pre/Post Increment/Decrement:
int a = 5;
int b = ++a; // b=6, a=6
Looping Statements:
For loop:
While loop:
For each loop: Useful for iterating over arrays and queues.
case (signal)
2'b10: // Matches only 2'b10
2'b1?: // Matches 2'b10, 2'b11
endcase
Interface: A way to group signals together for better modularity and encapsulation.
Program Block:
Casting:
mailbox m;
m = new;
event my_event;
class MyClass;
int data;
function void setData(int val);
data = val;
endfunction
endclass
Handle:
Methods:
Properties:
Special variables that can have automatic getter and setter methods.
class MyClass;
property int value;
get { return data; }
set { data = value; }
endproperty
endclass
Polymorphism:
The ability to define methods in a base class and override them in subclasses.
class BaseClass;
virtual function void display();
$display("Base Class");
endfunction
endclass
class MyClass;
private logic [7:0] data;
public function void setData(logic [7:0] val);
data = val;
endfunction
endclass
Randomization in SystemVerilog:
class MyClass;
int a;
constraint c { a > 0 && a < 10; }
endclass
MyClass obj = new;
obj.randomize();
If-Else in Constraints:
constraint c {
if (a == 5) a == 10;
else a != 5;
Functional Coverage: Ensures that all functionalities of the design are exercised.
covergroup cg;
coverpoint state;
endgroup
Code Coverage: Measures how much of the code has been executed during simulation.
coverpoint a: bin[4] {0, 1, 2, 3, 4};
Assertions in Programming:
Assertions are used to validate assumptions made by the programmer during the development phase.
They check if a condition is true; if it's false, the program will typically throw an error or crash.
Types of Assertions:
Class Packet:
In the context of OOPS and hardware description languages, a class packet would refer to an object or
data structure containing relevant fields (like header, payload) to represent data packets transmitted
over a network or hardware bus.
ARM (Architecture):
ARM is a family of Reduced Instruction Set Computing (RISC) architectures, widely used in
embedded systems, mobile devices, and increasingly in server systems.
Typically, an AXI lab session would involve learning how to implement and test AXI interfaces,
understand various AXI transaction types (like read, write, burst transactions), and use tools like
simulation environments to verify AXI-based designs.
Block chain mining refers to the process of validating and adding new transactions to the block chain
ledger. It involves solving complex cryptographic puzzles using computational resources.
ASIC is a custom-designed chip optimized for a particular application or task. ASIC implementation
typically involves the design of the hardware (using HDL like Verilog or VHDL), followed by
synthesis, placement, routing, and finally fabrication.
VLSI involves integrating a large number of transistors on a single chip. In the context of wearable
devices, VLSI design focuses on creating energy-efficient, small-sized chips for fitness trackers,
smartwatches, and health monitoring systems, often using Machine Learning (ML) techniques for
optimizing performance.
Device Model:
Device models describe how electronic devices behave under various conditions (e.g., current,
voltage). In VLSI, device models are used for simulation and validation of the IC before
manufacturing.
EOA refers to when a product or technology reaches its end-of-life, and it's no longer supported or
manufactured. For semiconductor companies, this can affect the availability of components and
impact the supply chain, requiring migration to newer technologies.
Open Road:
OpenROAD is an open-source physical design tool that supports the entire design flow from RTL
(register-transfer level) to GDSII (graphical data stream) for tape-out. It includes modules for
placement, routing, and optimization of chip designs.
OpenROAD Flow Script (ORFS) is used to automate the design process in OpenROAD. It is
important to install and configure OpenROAD along with the ORFS to run the full ASIC design flow.
Logical synthesis is the process of transforming a high-level RTL design into a gate-level netlist. This
process involves optimization for area, speed, and power.
Introduction to YOSYS:
YOSYS is an open-source synthesis tool that converts RTL descriptions (e.g., Verilog) into gate-level
representations. It integrates with other tools in the ASIC design flow, and it's often used for open-
source ASIC projects.
YOSYS can be installed within the OpenROAD framework to support synthesis tasks. It usually
involves setting up dependencies, configuring paths, and integrating YOSYS into the OpenROAD
tool chain.
Timing analysis is crucial to ensure that the design meets the required speed. OpenROAD provides
tools to analyze and optimize timing, ensuring the design will function at the expected clock speeds.
Physical design in VLSI involves the steps required to translate a logical design into a physical layout
(such as placement of cells and routing). It includes tasks like floorplanning, placement, routing,
power distribution, and final verification.
Power distribution involves ensuring that the design can efficiently deliver power to all components.
IR drop analysis checks if there is a significant voltage drop in the power grid that could affect circuit
performance.
Placement refers to the process of positioning the standard cells or components on the chip. Open
ROAD supports placement as part of the physical design flow, ensuring the design meets timing and
power requirements.
These topics represent a wide range of knowledge in digital design, semiconductor technology, and
ASIC/VLSI design, as well as the tools used in the industry for these tasks.
Clock Tree Synthesis (CTS) is the process of designing and optimizing the clock distribution network
of an ASIC or FPGA. In OpenROAD, CTS ensures that clock signals reach all parts of the chip with
minimal skew and balanced latency.
Clock Definition: Set up the clock nets and constraints (frequency, period).
Buffer Insertion: Insert buffers to balance the clock network.
Skew Optimization: Minimize clock skew across the design.
CTS Execution: Run the CTS tool in the OpenROAD flow to generate the clock tree.
Routing is the process of connecting the components in the layout with metal layers. OpenROAD
helps optimize routing by considering timing, area, and power constraints. It also minimizes wire
length and ensures the design meets all required specifications.
Routing Steps:
Chip finishing involves the final steps in the physical design flow. This includes ensuring that the
placement, routing, and clock tree are complete and meet design specifications. It also involves DRC
(Design Rule Check) and LVS (Layout vs. Schematic) verification.
Linux is a powerful open-source operating system used in many engineering and development
environments. Basic Linux commands are essential for navigating the file system, managing files, and
running processes.
Basic Commands:
Process Management in Linux involves managing the processes running on the system. You can
monitor, pause, or kill processes using commands like ps, top, kill, and bg.
A Ripple Carry Adder (RCA) is a type of binary adder that calculates the sum of two binary
numbers. It propagates the carry bit through each bit in the addition.
Design:
Testbench:
Apply various input combinations and check the sum and carry-out.
Design:
An 8-bit register and logic to shift bits left or right based on control signals.
Testbench:
A Comparator compares two binary numbers and outputs whether they are equal, or if one is greater
than the other.
Design:
Use basic logic gates (XOR, AND) to compare each bit and output results (greater, equal,
less).
Testbench:
Apply equal and unequal inputs and verify the comparison results.
A 3-State Decoder takes in a 2-bit input and decodes it into one of three states, often used for
enabling different outputs.
Design:
Implement a logic circuit that decodes 2-bit input to control three outputs.
Testbench:
Apply all possible 2-bit inputs and verify the corresponding outputs.
Design:
Department of Electronics and Communication Engineering
PDACEK, 2024-2025 Page 30
VLSI Design
Testbench:
Apply various bit sequences and verify if the detector detects "110".
A Multiplexer (MUX) selects one of eight 8-bit inputs based on a 3-bit control signal.
Design:
Use a combination of logic gates or a case statement to select one of the eight inputs.
Testbench:
Apply all possible 3-bit control values and check the selected 8-bit input.
A Demultiplexer (DEMUX) takes a single 8-bit input and directs it to one of eight outputs based on a
3-bit control signal.
Design:
Use logic to route the 8-bit input to the appropriate output based on control signals.
Testbench:
Apply various control signals and verify that the input is routed to the correct output.
A 4-Bit Adder/Subtractor performs addition or subtraction on two 4-bit numbers. You can use an
XOR gate to implement subtraction (by taking two's complement).
Design:
Testbench:
Apply all combinations of 4-bit numbers and check the sum or difference.
A Full Adder adds three input bits (two data bits and a carry-in) and produces a sum and carry-out.
Design:
Testbench:
Apply all combinations of the inputs and verify the sum and carry outputs.
Binary to Gray Code conversion involves converting a binary number to its equivalent Gray code.
Design:
The MSB (Most Significant Bit) remains the same, and subsequent bits are obtained by
XORing the current bit with the previous bit in binary.
Testbench:
Apply binary inputs and verify the corresponding Gray code outputs.
An ALU performs arithmetic and logical operations like addition, subtraction, AND, OR, and XOR.
Design:
Testbench:
Apply various operations (add, subtract, AND, etc.) and verify the results.
A Priority Encoder encodes the highest-priority input bit into a binary code.
Design:
Encode input bits with priority based on the position of the 1 bit.
Testbench:
CHAPTER 4
PROJECT HANDLED
Introduction
This report presents the RTL design and functional verification of an 4-bit up/down counter using
Verilog. The Up-Down Counter is a parameterized digital circuit that counts up or down based on a
control signal (i_up_down). It supports a configurable bit-width (WIDTH) and includes a reset signal
(i_rst) to initialize the counter. This module is widely used in applications like frequency division,
event counting, and timing control. Its flexibility and simplicity make it a fundamental component in
digital systems. The implementation was verified using EDA Playground with Aldec Riviera-PRO
simulator.
Design Architecture
The architecture consists of a clock (i_clk), reset (i_rst), and control signal (i_up_down). The counter
output (o_count) is parameterized to support any bit-width (WIDTH). On each clock edge, the counter
increments if i_up_down is 1 or decrements if i_up_down is 0. The reset signal initializes the counter
to 0. The design is synchronous, ensuring reliable operation in clock-driven systems.
Block Diagram
RTL Code
module up_down_counter #(
input wire
input wire
input wire
i_clk,
i_rst,
// Clock signal
// Active-high reset
);
if (i_rst)
else if (i_up_down)
else
end
endmodule
Testbench Code
module tb_up_down_counter;
// Parameters
// Inputs
reg i_clk;
reg i_rst;
reg i_up_down;
// Outputs
.i_clk(i_clk),
.i_rst(i_rst),
.i_up_down(i_up_down),
.o_count(o_count)
);
// Clock generation
initial begin
i_clk = 0;
end
// Testbench logic
initial begin
// Initialize inputs
i_rst = 1;
i_up_down = 0;
#10;
i_rst = 0;
#10;
// End simulation
$finish;
end
endmodule
Testbench Setup:
1: Count up.
0: Count down.
Simulation Results
Expected Output:
The 4-bit Up/Down Counter was successfully implemented and verified. The simulation
results matched the expected behavior, confirming the correctness of the design.
Driver
`uvm_component_utils(up_down_counter_driver)
up_down_counter_sequence_item item;
super.new(name, parent);
UVM_HIGH)
endfunction
super.build_phase(phase);
vif)))
endfunction: build_phase
super.run_phase(phase);
forever begin
this.item = uvm_object_registry#(up_down_counter_sequence_item,
"up_down_counter_sequence_item")::create("item");
seq_item_port.get_next_item(item);
drive(item);
seq_item_port.item_done();
end
endtask
@(posedge vif.i_clk);
vif.i_up_down = item.i_up_down;
endtask
endclass: up_down_counter_driver
Monitor
`uvm_component_utils(up_down_counter_monitor)
up_down_counter_sequence_item item;
super.new(name, parent);
up_down_counter_monitor", UVM_HIGH)
endfunction
super.build_phase(phase);
vif)))
endfunction: build_phase
super.connect_phase(phase);
endfunction
super.run_phase(phase);
forever begin
this.item = uvm_object_registry#(up_down_counter_sequence_item,
"up_down_counter_sequence_item")::create("item");
sample(item);
mon_port.write(item);
end
endtask
@(posedge vif.i_clk);
item.i_up_down = vif.i_up_down;
item.o_count = vif.o_count;
endtask
endclass: up_down_counter_monitor
Agent
`uvm_component_utils(up_down_counter_agent)
up_down_counter_driver drv;
up_down_counter_monitor mon;
up_down_counter_sequencer seqr;
super.new(name,parent);
UVM_HIGH)
endfunction
super.build_phase(phase);
drv=up_down_counter_driver::type_id::create("drv",this);
mon=up_down_counter_monitor::type_id::create("mon",this);
seqr=up_down_counter_sequencer::type_id::create("seqr",this);
endfunction: build_phase
super.connect_phase(phase);
drv.seq_item_port.connect(seqr.seq_item_export);
endfunction
super.run_phase(phase);
endtask
endclass: up_down_counter_agent
Environment
`uvm_component_utils(up_down_counter_env)
up_down_counter_agent agent;
up_down_counter_scoreboard scb;
super.new(name, parent);
UVM_HIGH)
endfunction
super.build_phase(phase);
endfunction : build_phase
super.connect_phase(phase);
agent.mon.mon_port.connect(scb.scb_port);
endfunction : connect_phase
endclass : up_down_counter_env
Test
`uvm_component_utils(up_down_counter_test)
up_down_counter_env env;
super.new(name,parent);
UVM_HIGH)
endfunction
super.build_phase(phase);
env=up_down_counter_env::type_id::create("env",this);
endfunction: build_phase
super.connect_phase(phase);
endfunction
endclass: up_down_counter_test
`uvm_component_utils(up_down_counter_mul_test)
up_down_counter_mul_seq mul_seq;
super.new(name,parent);
up_down_counter_mul_test", UVM_HIGH)
endfunction
super.build_phase(phase);
endfunction: build_phase
super.connect_phase(phase);
endfunction
super.run_phase(phase);
phase.raise_objection(this);
repeat(`TEST_COUNT) begin
mul_seq=up_down_counter_mul_seq::type_id::create("mul_seq");
mul_seq.start(env.agent.seqr);
end
wait(env.scb.test_cnt==`TEST_COUNT);
phase.drop_objection(this);
endtask
endclass: up_down_counter_mul_test
Testbench
`include "uvm_macros.svh"
import uvm_pkg::*;
`include "interface.sv"
`include "sequence_items.sv"
`include "sequencer.sv"
`include "sequence.sv"
`include "driver.sv"
`include "monitor.sv"
`include "scoreboard.sv"
`include "agent.sv"
`include "environment.sv"
`include "test.sv"
`timescale 1ns/1ns
`include "uvm_macros.svh"
//`include "reference.c"
//print_hello()
module top;
bit i_clk=0;
bit i_rst;
up_down_counter dut(
.i_rst (top_if.i_rst),
.i_up_down (top_if.i_up_down),
.o_count (top_if.o_count)
);
initial begin
i_rst = 1;
#2 i_rst =0;
end
initial begin
set(null,"*","up_down_counter_vif",top_if);
end
initial begin
run_test("up_down_counter_test");
end
initial begin
$dumpfile("waveform.vcd");
$dumpvars;
end
initial begin
#10000000;
$finish();
end
endmodule
Stimulus Generation
Sequence Item
super.new(name);
endfunction
endclass
Sequence
#(up_down_counter_sequence_item);
`uvm_component_utils(up_down_counter_sequencer)
super.new(name,parent);
up_down_counter_sequencer", UVM_HIGH)
endfunction
super.build_phase(phase);
endfunction: build_phase
super.connect_phase(phase);
endfunction
endclass: up_down_counter_sequencer
Scoreboard
`uvm_component_utils(up_down_counter_scoreboard)
scb_port;
up_down_counter_sequence_item item[$];
up_down_counter_sequence_item s_item;
int test_cnt = 0;
int test_valid = 0;
int test_invalid = 0;
super.new(name, parent);
vif)))
endfunction: new
super.build_phase(phase);
endfunction: build_phase
super.connect_phase(phase);
endfunction: connect_phase
item.push_front(rx_item);
endfunction
super.run_phase(phase);
forever begin
this.s_item = uvm_object_registry#(up_down_counter_sequence_item,
"up_down_counter_sequence_item")::create("s_item");
wait((item.size() != 0));
s_item = item.pop_front();
// s_item.print();
compare(s_item);
test_cnt++;
end
endtask
UVM_HIGH);
test_valid++;
test_invalid++;
end
endfunction
flag);
if (flag) begin
$display("--------------------------------------------------------------------------------");
$display("i_up_down= %0b,
end
endfunction
function automatic bit [3:0] get_expected_count(bit [3:0] current_count, bit i_rst, bit
i_up_down);
if (i_rst)
else if (i_up_down)
else
endfunction
super.report_phase(phase);
UVM_LOW)
endfunction
endclass
- Error detection.
Reference
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#define THRESHOLD (1.0f / (1 << 23)) // 'f' ensures single-precision floating point
float floatResult;
// Perform multiplication
return *(int*)&floatResult;
// Function to compute and check relative error between two floating-point values
float relative_error;
} else {
void print_hello() {
printf("Hello, World!
");
initial begin
$dumpfile("dump.vcd");
$dumpvars();
end
UVM Report
In this section, the layout of the RTL code has been generated using the OpenROAD
software tool.
export SDC_FILE =
$(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc
export ADDER_MAP_FILE :=
export CORE_UTILIZATION = 10
export EQUIVALENCE_CHECK ?= 1
current_design ud_counter
Performance Analysis
Power Measurement:
=============================================================
finish report_power
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------
=============================================================
Area Measurement:
Slack Information:
-------------------------------------------------------------------
rst (net)
-------------------------------------------------------------------
clk (net)
-------------------------------------------------------------------
clk (net)
-------------------------------------------------------------------
Generated GDS
Github link
https://github.com/preetisutar/4-bit-updown-counter-
Conclusions
In this report, the RTL code of 4-bit Up/down counter has been designed in verilog. The code is
successfully verified with the UVM with 100% test case pass. The design code is further processed in
the openROAD tool to generate its GDS using the sky130hd platform. It has shown that the generated
layout consumes 0.284 mW power which occupies 398 sq. um area. There is no setup and hold
violations
Advantages
Applications
Department of Electronics and Communication Engineering
PDACEK, 2024-2025 Page 62
VLSI Design
1. Digital Electronics & Microcontrollers – Used for event counting, frequency division, and
state tracking in embedded systems.
2. Timers & Clocks – Helps in timekeeping and delay generation in digital circuits.
3. Digital Speedometers – Counts pulses from sensors to measure speed in vehicles.
4. Elevator Control Systems – Tracks floor levels in both upward and downward directions.
5. Rotary Encoder Interface – Determines the position of rotating objects like motors or volume
knobs.
CHAPTER 5
CONCLUSION ON INTERNSHIP