Showing posts with label Digital circuit design. Show all posts
Showing posts with label Digital circuit design. Show all posts

Sunday, 28 February 2016

How to build circuits using CMOS logic

I have been telling you for a while now that majority of the digital VLSI circuits is made using CMOS logic. It has been so long that CMOS is adopted as the basic method of building VLSI circuits and evidently it is going to last longer. So in this post I'll explain how a CMOS circuit operates, How to design circuits using CMOS logic, What are the pros and cons of CMOS logic.So let's start with the description of CMOS circuit operation.

Operation of CMOS circuits

Figure-1 shows how a CMOS circuit looks like. CMOS circuits have both NMOS and PMOS transistors. CMOS means Complementary Metal-Oxide Semiconductor transistors. The word "complementary" says that NMOS and PMOS operate complementary to each other. i.e when NMOS operates in ON(Saturation) state PMOS operates in OFF(Cutoff) state and viceversa. Every CMOS circuit can be divided into two seperate circuits, one near to supply voltage VDD which is called "Pull-up circuit" and another near to ground VSS which is called "Pull-down circuit".


The Pull-up circuit is made using PMOS transistors. We know that PMOS transistors are good conductors of logic 1, I have explained this in DC characteristics of pass transistor. Similarly the Pull-down circuit is made using NMOS transistors as NMOS are good in conducting logic 0. As we can see in Figure-1 both pull-up and pull-down circuits get the same inputs.

The primary operation of pull-up circuit is to pull the output to logic 1 i.e VDD voltage when the pull-down circuit is off. Similarly pull-down circuit is responsible to pull the output voltage to VSS(logic 0) when the pull-up circuit is off.

For example if the pull-up circuit is replaced by a single PMOS transistor and the pull-down circuit is replaced by a single NMOS transistor then a CMOS inverter is formed which is the basic building block of CMOS logic circuits. Visit CMOS inverter DC characteristics for understanding the operation a CMOS inverter.

Designing basic and compound gates using CMOS logic

I am going to explain how to design a CMOS circuit in a series of steps. Make sure all these steps are followed when you design a circuit.

Step 1: The output function of our circuit thas to be in (F)' form and not just F. If it is not in the required form consider a new function G = F' and build CMOS circuit for G and invert the output.

Let's say the given function is F = A+B (note that "+" refers to logical OR) we have to convert it to required form by applying De-Morgan's law i.e. 

F = (F')' 
F = ( (A+B)' )'
G = (A+B)'

Nothing complex right, simple boolean operations. Now we can see that we have converted our output function to our required format. Now our new function G = F' =  (A+B)'

Step-2: Now implement the pull-down logic first for our new function,G. Just follow two rules,
1. If two or more literals are OR-ed then the respective transistors should be parallel(Source to source and drain to drain).
2. If two or more literals are AND-ed then the respective transistors should be in series(source to drain).

Here in our example A and B are OR-ed so in the pull-down logic two transistors will be in parallel. The gate terminals of these two transistors are connected to A and B. Figure-2 shows the pull down network.

Step-3: This is the final and simple step. We have to reverse the rules of Step-2 for AND-ed and OR-ed literals and build pull up network using PMOS transistors. 

Now if we join the output of both pull-up and pull-down circuits the complete CMOS circuit is made for output function G(NOR), since we need a circuit for F(OR) we will give the output to a CMOS inverter.Thus we can implement CMOS circuits. Figure-3 shows the pull-up block and the complete CMOS circuit for function F.
So that's how we can design CMOS circuits for any function. Try for all basic gates AND, OR, XOR, XNOR, NAND, NOR and comment if you found any difficulty.

Pros and Cons of CMOS logic

CMOS logic is the most preferred logic in VLSI industry to build digital circuits because of the benefits that it provides. But as we all know nothing will come for free in the world so there are some cons also. Important point is that the pros dominate for CMOS logic. Before CMOS, circuits used to be designed using only NMOS transistors (NMOS logic,pseudo NMOS logic) but as the technology grew and the number of transistors in a chip increased power dissipated by transistors became so large that the chip was unable to handle such power. So here are the pros,

pros

  • CMOS dissipate very less power compared to any other logic family.
  • CMOS do not degrade output for both logic 0 and logic 1.
  • CMOS circuits have very high fan-in and fan-out.
  • Fabricating a CMOS chip is well established.
  • CMOS cost of fabrication is very less.
  • CMOS chips are very denser accumulating more number of transistors in a given silicon area.

cons

  • For the same output function CMOS circuits take approximately 2 times more number of transistors than the NMOS counterpart.
That's it gyus, I hope this article have given you enough information about building CMOS circuits. feel free to post any comment or doubt in the comments section below.

Saturday, 20 February 2016

Analog VLSI Vs Digital VLSI

VLSI is the current trend of manufacturing electronic integrated circuits. As we know that there are two divisions of electronic circuits(analog and digital) VLSI also have this division. In this article we will have a brief introduction about VLSI and then explain the differences between Analog VLSI and Digital VLSI in all aspects like design,testing,and application.

VLSI

An IC(Integrated Circuit) consisting of a large number of transistors, usually in the range of around 10 K to 1 Billion is called a VLSI circuit. The invention of Planar Technology for fabrication of transistors on a silicon wafer made VLSI circuits possible today. The fabrication techniques are improving every year minimizing process steps,leakage and shrinking transistor size even further. All these help in building power efficient,fast and reliable electronic circuits. Below shown is intel's core-i7 processor chip, it contains 700 Million transistors in just 1.5x1.5 square inches of silicon area.

Analog VLSI

Design aspects:

  • It is comparatively difficult to design an analog VLSI circuit than a Digital VLSI circuit.
  • Design of circuit is mostly manual.
  • It cannot be described using a HDL(Hardware Descriptive Language).
  • Analog modules are separated from the entire design because they need separate ground.
  • Transistors are operated in linear and conduction regions.
  • Transistors used are a bit larger than that used for digital circuits and run at a higher supply voltage.
  • Design is not necessarily a CMOS design.

Testing aspects:

  • It is difficult to test the circuit because in real system noise affects more and you cannot inject noise directly while testing the circuit.
  • Phase delays also effect the circuit operation.

Application aspects:

  • Only a small portion of an electronic circuit will be analog as their operation is highly affected by noise.
  • These are mostly used for high speed amplifiers in communication.
  • Used in ADCs(Analog to Digital Converters).
  • Used at the modems,RF-receiver of mobile phones.

Digital VLSI

Design aspects:

  • Mostly the design is automated and HDLs are used to describe the design.
  • Transistors are much smaller and operate at lower supply levels than analog circuits.
  • Transistors are operated in saturation(ON) and cutoff(OFF) regions.
  • Regeneration of signal is easy so long wires is not a big problem for digital circuits.
  • Design is mostly CMOS which have less power dissipation, high density, low cost and easily fabricated.

Testing aspects:

  • Circuit can be tested exhaustively giving all possible inputs increasing reliability.
  • Testing is easy and automated.
  • Phase delays and noise do not affect the system operation.
  • Failure conditions can be determined easily.
  • The delays have to be analyzed correctly so that the setup and hold time violations do not happen.

Application aspects:

  • Majority of the system is digital.
  • Processors and microcontrollers are digital circuits.
  • Used almost in all areas of application.
These are the major differences between Analog and Digital VLSI circuits.Did you find I missed any point? Please comment below and help me and my readers.

Friday, 19 February 2016

Combinational circuit Vs Sequential circuits

Digital circuits are basically divided into two types, viz. combinational circuits and sequential circuits. Almost all the digital systems use both of these circuits. Both these classes of circuits have properties different from eachother while there are some similarities also. To design a digital system efficiently, one should understand these classes properly. It is compulsory for a digital design engineer to have the basic understanding and only then he will be able to design a complete system for a given specifications.

In this article I will explain these two categories of digital circuits in detail comparing their similarities and differences by giving relevant examples. Once you understand the advantages of each of these categories it will be easy to decide when to use each of them.

Combinational Circuit:

"Combinational circuit is a digital circuit whose output at any given time depends only on one or more inputs present at that particular time and nothing else."

The following are the properties of combinational circuits,
  • It is represented by a truth table of output for all possible inputs.
  • Normally the output function is represented in either SOP(sum of products) form or POS(product of sums) form.
  • It is a time independent logic and hence we don't need a clock for the proper operation of a combinational circuit.
  • There is no feedback from output to input.
  • Combinational circuits form the DataPath of a digital system.
  • Some of the combinational circuits are Multiplexres,Encoders,Decoders,Adder,Subtractor,code converters etc.
  • The only memory that can be designed using combinational logic is ROM(Read Only Memory).
  • Combinational circuits are designed by K-Map minimization of output function and are implemented using logic gates..

Sequential Circuit:

"Sequential circuit is a digital circuit whose output at any given time depends on inputs present at that particular time and previous outputs"

The following are the properties of sequential circuits,
  • It is represented by a truth table of present output for all combinations of input and previous outputs.
  • Normally the output function is represented in either SOP(sum of products) form or POS(product of sums) form.
  • It is a time dependent logic and a clock input is required for identifying and differentiating the present and previous outputs.
  • Sequential circuits need memory to store the previous outputs and even a memory is a sequential circuit.(May be a bit confusing but will be clear once we discuss sequential circuits.)
  • Some examples of sequential circuits are Latches,Flipflops,Counters,Registers.
  • Almost all the memories are made of sequential elements(flipflops).
  • Sequential circuits form an integral part of the ControlPath of a digital system.
  • Sequential circuits are designed using K-Map minimization of output function and FSM(Finite State Machine). Implementation of sequential circuits is done using logic gates.


What,why and where of Digital VLSI circuits.



Today's electronics is completely filled with digital components and we call this "The Digital age". No matter what is the area of application, digital devices have their share. Major part of electronics is now digital. Earlier there were analog computers and they have been removed from the face of earth, once digital computer era started. Slowly one after another all analog electronic machines are converted to digital and thus began the digital revolution.

Though the real world in which we live is analog, why is a digital device dominating? Humans understand an analog signal(we can't interpret binary 1's and 0's as good as analog signals) far better than a digital signal and still they prefer a digital machine to do the job. Why is digital electronics so popular?

In this article I would be addressing all these questions forming a strong base towards why we need digital systems. However there are some places where an analog system works much better than a digital system, I am only trying to make a point that digital systems are a major part of electronics industry today and to survive in such an industry it is compulsory to understand the basics of Digital systems and how to design them.

Q1. What is a Digital VLSI Circuit?

"An electronic circuit that operates on digital inputs to produce the required digital output is called a digital VLSI circuit." 

Though the definition seems very simple but there is a lot to understand from it.

  • Firstly it is an electronic circuit i.e. the active device behavior is determined by the direction of flow of electrons inside them. 
  • It operates on digital inputs but not on analog inputs. A digital circuit only understands two voltage levels,one is the supply voltage(logic high normally called VDD) and the second is the ground(logic low,normally called VSS). Any intermediate value is considered an undermined value and the circuit will not work as expected for these values. 
  • Finally it can only produce digital outputs.

Q2. Why we use digital VLSI circuits?

Though the real world we live is completely analog, digital machines are dominating because of the invaluable benefits they provide. The most important invention of mankind is computer, it changed the world as no one would ever imagine. We are able to do millions of calculations in a fraction of a second, which enables us to do tremendous things like understanding the universe, diagnosing a person for disease, security and lot more. All this is made possible because of computers and more  importantly a digital VLSI circuit. So the basic advantages and features of a digital VLSI circuit are,
  • Does both numerical and non-numerical information processing very easily.
  • Very high noise immunity.
  • Easy to design, and the design can be automated(EDA tools and HDLs).
  • Low cost(involvement of manpower is low).
  • It is very easy to duplicate similar circuits with least performance difference.
Well these are the basic advantages and one can find a lot more. 

Q3. Where do we use digital VLSI circuits? 

As said earlier the real world we live is analog and we are talking about digital systems which accepts only digital data as input. For any electronic system the input will come from real world so we need a circuit that can convert the real world analog signals into digital signals and feed them to the digital circuits. Now the digital circuit process the data and returns the result to a circuit which converts the result back to analog. Any electronic device you take this will be the flow.
The following diagram shows the block diagram of any electronic system.

Consider a digital audio system. The input is analog signal(audio from mic) it is then converted to digital and then operated on for noise removal volume,bass and treble are adjusted then converted back to analog signal(speaker).

So what ever is the area of application, digital circuits are used every where. Some examples of application fields are, communication, security,mobiles,space applications,health and treatment,education,defense,etc.