vlsi Internship Report
vlsi Internship Report
TABLE OF CONTENTS
(i)
Industrial Training Report VLSI Design
INTRODUCTION
Gone are the days when huge computers made of vacuum tubes sat humming in entire dedicated
rooms and could do about 360 multiplications of 10 digit numbers in a second. Though they
were heralded as the fastest computing machines of that time, they surely don’t stand a chance
when compared to the modern day machines. Modern progressing second. But what drove this
change? The whole domain of computing ushered into a new dawn of electronic miniaturization
with the advent of semiconductor transistor by Bardeen (1947-48) and then the Bipolar
Transistor by Shockley (1949) in the Bell Laboratory.
Since the invention of the first IC (Integrated Circuit) in the form of a Flip Flop by Jack Kilby in
1958, our ability to pack more and more transistors onto a single chip has doubled roughly every
18 months, in accordance with the Moore’s Law. Such exponential development had never been
seen in any other field and it still continues to be a major area of research work.
VLSI chiefly comprises of Front End Design and Back End design these days. While front end
design includes digital design using HDL, design verification through simulation and other
verification techniques, the design from gates and design for testability, backend design
comprises of CMOS library design and its characterization. It also covers the physical design and
fault simulation.
While Simple logic gates might be considered as SSI devices and multiplexers and parity
encoders as MSI, the world of VLSI is much more diverse. Generally, the entire design
procedure follows a step by step approach in which each design step is followed by simulation
before actually being put onto the hardware or moving on to the next step. The major design
steps are different levels of abstractions of the device as a whole:
1. Problem Specification: It is more of a high level representation of the system. The major
parameters considered at this level are performance, functionality, physical dimensions,
Page 1
Industrial Training Report VLSI Design
2. Architecture Definition: Basic specifications like Floating point units, which system to
use, like RISC (Reduced Instruction Set Computer) or CISC (Complex Instruction Set
Computer), number of ALU’s cache size etc.
3. Functional Design: Defines the major functional units of the system and hence facilitates the
identification of interconnect requirements between units, the physical and electrical
specifications of each unit. A sort of block diagram is decided upon with the number of inputs,
outputs and timing decided upon without any details of the internal structure.
4. Logic Design: The actual logic is developed at this level. Boolean expressions, control
flow, word width, register allocation etc. are developed and the outcome is called a Register
Transfer Level (RTL) description. This part is implemented either with Hardware Descriptive
Languages like VHDL and/or Verilog. Gate minimization techniques are employed to find the
simplest, or rather the smallest most effective implementation of the logic.
5. Circuit Design: While the logic design gives the simplified implementation of the logic,
the realization of the circuit in the form of a netlist is done in this step. Gates, transistors and
interconnects are put in place to make a netlist. This again is a software step and the outcome is
checked via simulation.
6. Physical Design: The conversion of the netlist into its geometrical representation is done in
this step and the result is called a layout. This step follows some predefined fixed rules like the
lambda rules which provide the exact details of the size, ratio and spacing between components.
This step is further divided into sub-steps which are:
6.1 Circuit Partitioning: Because of the huge number of transistors involved, it is not
possible to handle the entire circuit all at once due to limitations on computational
capabilities and memory requirements. Hence the whole circuit is broken down into
blocks which are interconnected.
Page 2
Industrial Training Report VLSI Design
6.2 Floor Planning and Placement: Choosing the best layout for each block from
partitioning step and the overall chip, considering the interconnect area between the
blocks, the exact positioning on the chip in order to minimize the area arrangement while
Page 3
Industrial Training Report VLSI Design
meeting the performance constraints through iterative approach are the major design
steps taken care of in this step.
6.3 Routing: The quality of placement becomes evident only after this step is completed.
Routing involves the completion of the interconnections between modules. This is
completed in two steps. First connections are completed between blocks without taking
into consideration the exact geometric details of each wire and pin. Then, a detailed
routing step completes point to point connections between pins on the blocks.
6.4 Layout Compaction: The smaller the chip size can get, the better it is. The
compression of the layout from all directions to minimize the chip area thereby reducing
wire lengths, signal delays and overall cost takes place in this design step.
6.5 Extraction and Verification: The circuit is extracted from the layout for comparison
with the original netlist, performance verification, and reliability verification and to check
the correctness of the layout is done before the final step of packaging.
7. Packaging: The chips are put together on a Printed Circuit Board or a Multi Chip Module
to obtain the final finished product.
Initially, design can be done with three different methodologies which provide different levels of
freedom of customization to the programmers. The design methods, in increasing order of
customization support, which also means increased amount of overhead on the part of the
programmer, are FPGA and PLDs, Standard Cell (Semi Custom) and Full Custom Design.
While FPGAs have inbuilt libraries and a board already built with interconnections and blocks
already in place; Semi Custom design can allow the placement of blocks in user defined custom
fashion with some independence, while most libraries are still available for program
development. Full Custom Design adopts a start from scratch approach where the programmer is
required to write the whole set of libraries and has full control over the block development,
placement, and routing. This also is the same sequence from entry level designing to professional
designing.
Page 4
Industrial Training Report VLSI Design
HISTORY
In 1920s when several inventors attempted devices that were intended to control current in solid-
state diodes and convert them into triodes. After World War II, when the use of silicon and
germanium crystals as radar detectors led to improvements in fabrication and theory. Scientists
who had worked on radar returned to solid-state device development. The invention of the
first transistor was at Bell Labs in 1947, the field of electronics shifted from vacuum tubes
to solid-state devices.
With the small transistor at their hands, electrical engineers of the 1950s saw the possibilities of
constructing far more advanced circuits. However, as the complexity of circuits grew, problems
arose.[1] One problem was the size of the circuit. A complex circuit like a computer was
dependent on speed. If the components were large, the wires interconnecting them must be long.
The electric signals took time to go through the circuit, thus slowing the computer.
The invention of the integrated circuit by Jack Kilby and Robert Noyce solved this problem by
making all the components and the chip out of the same block (monolith) of semiconductor
material. The circuits could be made smaller, and the manufacturing process could be automated.
This led to the idea of integrating all components on a single-crystal silicon wafer, which led to
small-scale integration (SSI) in the early 1960s, and then medium-scale integration (MSI) in the
late 1960s.
Very large-scale integration was made possible with the wide adoption of the MOS transistor,
originally invented by Mohamed M. Atalla and Dawon Kahng at Bell Labs in 1959. Atalla first
proposed the concept of the MOS integrated circuit chip in 1960, followed by Kahng in 1961,
both noting that the MOS transistor's ease of fabrication made it useful for integrated
circuits. General Microelectronics introduced the first commercial MOS integrated circuit in
1964. In the early 1970s, MOS integrated circuit technology allowed the integration of more than
10,000 transistors in a single chip. This paved the way for VLSI in the 1970s and 1980s, with
tens of thousands of MOS transistors on a single chip (later hundreds of thousands, then millions,
and now billions).
The first semiconductor chips held two transistors each. Subsequent advances added more
transistors, and as a consequence, more individual functions or systems were integrated over
Page 5
Industrial Training Report VLSI Design
time. The first integrated circuits held only a few devices, perhaps as many as
ten diodes, transistors, resistors and capacitors, making it possible to fabricate one or more logic
gates on a single device. Now known retrospectively as small-scale integration (SSI),
improvements in technique led to devices with hundreds of logic gates, known as medium-scale
integration (MSI). Further improvements led to large-scale integration (LSI), i.e. systems with at
least a thousand logic gates. Current technology has moved far past this mark and
today's microprocessors have many millions of gates and billions of individual transistors.
At one time, there was an effort to name and calibrate various levels of large-scale integration
above VLSI. Terms like ultra-large-scale integration (ULSI) were used. But the huge number of
gates and transistors available on common devices has rendered such fine distinctions moot.
Terms suggesting greater than VLSI levels of integration are no longer in widespread use.
Page 6
Industrial Training Report VLSI Design
Page 7
Industrial Training Report VLSI Design
Binary Arithmetic
In the binary number system, there are only two digits 0 and 1, and any number can be
represented by these two digits. The arithmetic of binary numbers means the
operation of binary addition, binary subtraction, binary multiplication and binary
division.
Logic Circuits
There are two main types of digital logic circuits in digital electronics combinational
and sequential logic circuits.
Combinational Circuit
The combinational logic circuits are the circuits that contain different types of logic gates.
Simply, a circuit in which different types of logic gates are combined is known as
a combinational logic circuit. The output of the combinational circuit is determined from the
present combination of inputs, regardless of the previous input. The input variables, logic gates,
and output variables are the basic components of the combinational logic circuit. There are
different types of combinational logic circuits, such as Adder, Subtractor, Decoder, Encoder,
Multiplexer, and De-multiplexer.
There are the following characteristics of the combinational logic circuit:
o At any instant of time, the output of the combinational circuits depends only on
the present input terminals.
o The combinational circuit doesn't have any backup or previous memory. The present
state of the circuit is not affected by the previous state of the input.
o The n number of inputs and m number of outputs are possible in combinational
logic circuits.
Page 8
Industrial Training Report VLSI Design
Sequential Circuit
The sequential circuit is a special type of circuit that has a series of inputs and outputs. The
outputs of the sequential circuits depend on both the combination of present inputs and previous
outputs. The previous output is treated as the present state. So, the sequential circuit contains the
combinational circuit and its memory storage elements. A sequential circuit doesn't need to
always contain a combinational circuit. So, the sequential circuit can contain only the memory
element.
The finite state machines (FSMs) are significant for understanding the decision making logic as
well as control the digital systems. In the FSM, the outputs, as well as the next state, are a
present state and the input function. This means that the selection of the next state mainly
depends on the input value and strength lead to more compound system performance. As in
sequential logic, we require the past inputs history for deciding the output. Therefore, FSM
proves very cooperative in understanding sequential logic roles. Basically, there are two methods
for arranging a sequential logic design namely mealy machine as well as more machine. This
Page 9
Industrial Training Report VLSI Design
article discusses the theory and implementation of a finite state machine or FSM, types, finite
state machine examples, advantages, and disadvantages.
FSMs are used in games; they are most recognized for being utilized in artificial intelligence, and
however, they are also frequent in executions of navigating parsing text, input handling of the
customer, as well as network protocols.
These are restricted in computational power; they have the good quality of being comparatively
simple to recognize. So, they are frequently used by software developers as well as system
designers for summarizing the performance of a difficult system.
The finite state machines are applicable in vending machines, video games, traffic
lights, controllers in CPU, text parsing, analysis of protocol, recognition of speech, language
processing, etc.
FSMs are used in games; they are most recognized for being utilized in artificial intelligence, and
however, they are also frequent in executions of navigating parsing text, input handling of the
customer, as well as network protocols.
These are restricted in computational power; they have the good quality of being comparatively
simple to recognize. So, they are frequently used by software developers as well as system
designers for summarizing the performance of a difficult system.
The finite state machines are applicable in vending machines, video games, traffic
lights, controllers in CPU, text parsing, analysis of protocol, recognition of speech, language
processing, etc.
Applications of Finite State Machine:
UART-Transmitter-Design
UART-Receiver-Design
Traffic-Light-Controller
Simple-Traffic-Controller
Serial-Adder
Sequential-Counters-JKFF
Sequential-Counters-DFF
Sequential-Counters
Sequence-Generator
Sequence-Detector
Lift-Controller
Page 10
Industrial Training Report VLSI Design
Page 11
Industrial Training Report VLSI Design
hardware description language. Now while comparing HDL and C languages, the major
difference is that HDL provides the timing information of a design.
Verilog
Verilog was developed to simplify the process and make the Hardware description
language(HDL) more robust and flexible. Today, Verilog is the most popular HDL used and
practiced throughout the semiconductor industry.
Why Verilog?
Verilog consist a level of abstraction that helps hide away the details of its implementation and
technology.
For example, the design of D-flip flop would require the knowledge of how the transistors need
to be arranged to achieve a positive edge triggered FF and what the rise, fall and clk-Q times
required to latch the values onto a flop among many other technology oriented details. Power
dissipation, timing and the ability to drive nets and other flops would also require a more
thorough understanding of the physical characteristic of a transistor.
Verilog helps on the behaviour and leave the rest to be sorted out later.
Page 12
Industrial Training Report VLSI Design
Verilog introduces several new data types. These data types make RTL descriptions easier to
write and understand.
The data storage and transmission elements found in digital hardware are represented using a set
of Verilog Hardware Description Language (HDL) data types.
In Verilog, data types are divided into NETS and Registers. These data types differ in the way
that they are assigned and hold values, and also they represent different hardware structures.
Verilog introduces new two-state data types, where each bit is 0 or 1 only. Using two-
state variables in RTL models may enable simulators to be more efficient. And they are not
affecting the synthesis results.
The data types include bit, byte, shortint, int, longint, reg, logic,
Arrays
In Verilog, we can define scalar and vector nets and variables. We can also define memory
arrays, which are one-dimensional arrays of a variable type.
Verilog allowed multi-dimensioned arrays of both nets and variables and removed some of the
restrictions on memory array usage.
Page 13
Industrial Training Report VLSI Design
Verilog takes this a stage further and refines the concept of arrays and permits more operations
on arrays.
Packed dimensions
Nets
Nets are used to connect between hardware entities like logic gates and hence do not store any
value.
The net variables represent the physical connection between structural entities such as logic
gates. These variables do not store values except trireg. These variables have the value of their
drivers, which changes continuously by the driving circuit.
Some net data types are wire, tri, wor, trior, wand, triand, tri0, tri1, supply0, supply1, and trireg.
A net data type must be used when a signal is:
1. Wire
A wire represents a physical wire in a circuit and is used to connect gates or modules. The value
of a wire can be read, but not assigned to, in a function or block. A wire does not store its value
but must be driven by a continuous assignment statement or by connecting it to the output of a
gate or module.
2. Wand(wired-AND)
The value of a wand depends on logical AND of all the drivers connected to it.
Page 14
Industrial Training Report VLSI Design
3. Wor (wired-OR)
The value of wor depends on the logical OR of all the drivers connected to it.
4. Tri (three-state)
All drivers connected to a tri must be z, except one that determines the tri's value.
5. Supply0 and Supply1
Supply0 and supply1 define wires tied to logic 0 (ground) and logic 1 (power).
Registers
A register is a data object that stores its value from one procedural assignment to the next. They
are used only in functions and procedural blocks.
An assignment statement in a procedure acts as a trigger that changes the value of the data
storage element.
Reg is a Verilog variable type and does not necessarily imply a physical register. In multi-bit
registers, data is stored as unsigned numbers, and no sign extension is done for what the user
might have thought were two's complement numbers.
Some register data types are reg, integer, time, and real.reg is the most frequently used type.
Reg is used for describing logic.
An integer is general-purpose variables. They are used mainly loops-indices, parameters,
and constants. They store data as signed numbers, whereas explicitly declared reg types
store them as unsigned. If they hold numbers that are not defined at compile-time, their
size will default to 32-bits. If they hold constants, the synthesizer adjusts them to the
minimum width needed at compilation.
Real in system modules.
Time and realtime for storing simulation times in test benches. Time is a 64-bit quantity
that can be used in conjunction with the $time system task to hold simulation time.
Page 15
Industrial Training Report VLSI Design
always @(s or
i) begin
case (s)
2'b00 : o = i[0];
2'b01 : o = i[1];
2'b10 : o = i[2];
2'b11 : o = i[3];
default : o = 1'bx;
endcase
end
endmodule
Simulation Result of 4:1 Mux Behavioral level model:
Dataflow level
2) Looking towards the design, one can realize how data flows between hardware registers
and how the data is processed in the design.
assign o = (~s[1] & ~s[0] & i[0]) | (~s[1] & s[0] & i[1]) | (s[1] & ~s[0] & i[2]) | (s[1] &
s[0] & i[3]);
endmodule
Page 17
Industrial Training Report VLSI Design
Page 18
Industrial Training Report VLSI Design
The switch level transistors are modelled as being either on or off, conducting or not conducting.
The values carried by the interconnections are abstracted from the whole range of analog
voltages or currents to a small number of discrete values. These values are referred to as
signal strengths.
Verilog also provides support for transistor level modelling. However, designers rarely use these
days as the complexity of circuits has required them to move to higher levels of abstractions
rather than use switch level modelling.
Page 19
Industrial Training Report VLSI Design
Simulations are controlled using testbenches. A testbench is an additional Verilog module (not
part of the actual system design) used to generate the appropriate waveforms on the input ports
of the module under test, in order to exercise the functionality of that module. Optionally, the
testbench also monitors the outputs of the module under test, and generates warnings if they
deviate from the expected output values. A testbench is simply a Verilog module. But it is
different from the Verilog code we write for a DUT. Since the DUT’s Verilog code is what we
use for planning our hardware, it must be synthesizable. Whereas, a testbench module need not
be synthesizable. We just need to simulate it to check the functionality of our DUT.
Verilog code for the half adder which is tested using different stimulus in testbench:
module half_adder
(
input wire a, b,
output wire sum, carry
);
assign sum = a ^ b;
assign carry = a & b;
endmodule
Above program illustrates the functioning of half adder. Testbenches are written in separate
Verilog files.Simplest way to write a testbench, is to invoke the ‘design for testing’ in the
testbench and provide all the input values inside the ‘initial block’.
A testbench with name ‘half_adder_tb’ is defined below.in tesbenches port is always empty, i.e.
no inputs or outputs are defined in the definition. Then 4 signals are defined i.e. a, b, sum and
carry. these signals are then connected to actual half adder design using structural modelling.
Lastly, different values are assigned to input signals.
Page 20
Industrial Training Report VLSI Design
‘always’ statement is used in the testbench; which includes the input values along with the
corresponding output values. If the specified outputs are not matched with the output generated
by half-adder, then errors will be displayed.
// half_adder_tb.v
module half_adder_tb;
reg a, b;
wire sum, carry;
// duration for each bit = 20 * timescale = 20 * 1 ns = 20ns
localparam period = 20;
a = 0;
b = 1;
#period;
a = 1;
b = 0;
#period;
a = 1;
b = 1;
#period;
end
endmodule
Page 21
Industrial Training Report VLSI Design
Theory: Design and Verification of Asynchronous FIFO using Verilog/UVM FIFOs are often
used to safely pass data from one clock domain to another asynchronous clock domain. Using a
FIFO to pass data from one clock domain to another clock domain requires multi-asynchronous
clock design techniques. There are many ways to design a FIFO wrong. There are many ways to
design a FIFO right but still make it difficult to properly synthesize and analyze the design. This
project will detail one method that is used to design, synthesize and analyze a safe FIFO between
different clock domains without using Gray code pointers that are synchronized into a different
clock domain before testing for "FIFO full" or "FIFO empty" conditions.
PROGRAM:
/*Write Enable=wr_en
Write data=wr_data
Write pointer=wr_ptr
wr_clk= clk for wrinting
rd_clk= clock for reading
Page 22
Industrial Training Report VLSI Design
module fifo(wr_en,wr_data,wr_ptr,wr_clk,wr_rst,rd_en,rd_clk,rd_rst,rd_data,rd_ptr,full,empty);
//INPUT GIVEN FROM TESTBENCHES
parameter RAM_DEPTH=7;
input wr_en;
input rd_en;
input [7:0]wr_data;
input rd_rst,wr_rst;
input wr_clk;
input rd_clk;
integer i;
//OUTPUT
output reg[2:0]wr_ptr=3'b000;
output reg [2:0]rd_ptr=3'b000;
output reg [7:0]rd_data;
output reg full=1'b0;
output reg empty=1'b0;
reg [7:0]mem[RAM_DEPTH:0];
//CLK WHICH IS USED FOR WRITING OPERATION
always @(posedge wr_clk)
begin
if(wr_en)
begin
if(wr_rst)
begin
wr_ptr=3'b000;
rd_ptr=3'b000;
full=1'b0;
for(i=0;i<RAM_DEPTH+1;i=i+1)
begin
mem[i]<=8'h0;
en
end d
else
begin
if((wr_ptr!=3'b111)&&(!full)) // this will check till 110
begin
//$display("data before assign in mem=%h",mem[wr_ptr]);
mem[wr_ptr]<=wr_data;
//$display("data after assign in mem=%h",mem[wr_ptr]);
Page 23
Industrial Training Report VLSI Design
//$display("mem[%b]=%h,full=%b,wr_ptr=%b,data=%h",wr_ptr,mem[wr
_ptr],full,wr_ptr,wr_data);
wr_ptr<=wr_ptr+3'b001;
//$display("Worked full= %b mem[wr_ptr]=%h",full,mem[wr_ptr]);
end
else
if(!full)
begin
$display("i also worked");
mem[wr_ptr]<=wr_data; //this will work for wr_ptr=3'b111
full<=1'b1; //now when full goes one then none of them
work
//wr_en=1'b0;
end
end
end
end
end
else
begin
rd_data<=mem[rd_ptr];
Page 24
Industrial Training Report VLSI Design
empty<=1'b1;
//rd_en=1'b0;
end
end
end
end
endmodule
//TESTBENCH
module tb_fifo;
reg rd_en;
reg wr_en;
reg [7:0]wr_data;
wire [7:0]rd_data;
reg rd_clk;
reg wr_clk;
wire [2:0]rd_ptr;
wire [2:0]wr_ptr;
reg rd_rst;
reg wr_rst;
wire full;
wire empty;
//wire [7:0]mem[2:0];
fifo a0(.rd_en(rd_en),
.wr_en(wr_en),
.wr_data(wr_data),
.rd_data(rd_data),
.rd_clk(rd_clk),
.wr_clk(wr_clk),
.rd_ptr(rd_ptr),
.wr_ptr(wr_ptr),
.rd_rst(rd_rst),
.wr_rst(wr_rst),
.full(full),
.empty(empty)
//.mem(mem)
);
always #20 rd_clk=~rd_clk;
always #5 wr_clk=~wr_clk;
initial
begin
{rd_en,wr_en,rd_clk,wr_clk,wr_data,wr_rst,rd_rst}=0;
Page 25
Industrial Training Report VLSI Design
#5
wr_en=1'b1;
wr_data=8'hff;
#9
wr_en=1'b1;
wr_data=8'h1f;
#9
wr_en=1'b1;
wr_data=8'h2f;
#9
wr_en=1'b1;
wr_data=8'h3f;
#9
wr_en=1'b1;
wr_data=8'h4f;
#9
wr_en=1'b1;
wr_data=8'h5f;
#9
wr_en=1'b1;
wr_data=8'h6f;
#9
wr_en=1'b1;
wr_data=8'h7f;
#9
wr_en=1'b1;
wr_data=8'h8f;
#9
wr_en=1'b1;
wr_data=8'h9f;
#9
wr_en=1'b1;
wr_data=8'haf;
#9
rd_en=1'b1;
wr_en=1'b0;
end
endmodule
Page 26
Industrial Training Report VLSI Design
RESULT:
Page 27
Industrial Training Report VLSI Design
Page 28
Industrial Training Report VLSI Design
CONCLUSION
This project has really been faithful and informative. It has made us learn and understand the
many trivial concepts of Hardware Description Language. I have used Mentor Graphics tool
Model PE student edition. It helped me to watch the wave patterns after providing multiple
stimulus, and also this version is free for students. The fast growing VLSI Technology provides
good future and scope of the proposed project. Finally, it has taught us a valuable lifelong lesson
about the improvements and working and interacting in a group. I have received criticism and
advice from engineers and technician when mistakes were made. Throughout the industrial
training, I found that several things are important such as Time management, Goal management,
Critical and Analytical thinking, Keen observation of technical concepts etc.
Page 29