Comos
Comos
2) Draw Vds-Ids curve for a MOSFET. Now, show how this curve changes (a) with
increasing Vgs (b) with increasing transistor width (c) considering Channel Length
Modulation
6)How do you size NMOS and PMOS transistors to increase the threshold voltage?
13) What happens to delay if we include a resistance at the output of a CMOS circuit?
14) What are the limitations in increasing the power supply to reduce delay?
15) How does Resistance of the metal lines vary with increasing thickness and increasing
length?
16) You have three adjacent parallel metal lines. Two out of phase signals pass through
the outer two metal lines. Draw the waveforms in the center metal line due to
interference. Now, draw the signals if the signals in outer metal lines are in phase with
each other
17) What happens if we increase the number of contacts or via from one metal layer to
the next?
18) Draw a transistor level two input NAND gate. Explain its sizing (a) considering Vth
(b) for equal rise and fall times
19) Let A & B be two inputs of the NAND gate. Say signal A arrives at the NAND gate
later than signal B. To optimize delay, of the two series NMOS inputs A & B, which one
would you place near the output?
21) For CMOS logic, give the various techniques you know to minimize power
consumption
22) What is Charge Sharing? Explain the Charge Sharing problem while sampling data
from a Bus
23) Why do we gradually increase the size of inverters in buffer design? Why not give
the output of a circuit to one large inverter?
24) In the design of a large inverter, why do we prefer to connect small transistors in
parallel (thus increasing effective width) rather than lay out one transistor with large
width?
25) Given a layout, draw its transistor level circuit. (I was given a 3 input AND gate and
a 2 input Multiplexer. You can expect any simple 2 or 3 input gates)
26) Give the logic expression for an AOI gate. Draw its transistor level equivalent. Draw
its stick diagram
27) Why don't we use just one NMOS or PMOS transistor as a transmission gate?
28) For a NMOS transistor acting as a pass transistor, say the gate is connected to VDD,
give the output for a square pulse input going from 0 to VDD
29) Draw a 6-T SRAM Cell and explain the Read and Write operations
30) Draw the Differential Sense Amplifier and explain its working. Any idea how to size
this circuit? (Consider Channel Length Modulation)
31) What happens if we use an Inverter instead of the Differential Sense Amplifier?
33) Approximately, what were the sizes of your transistors in the SRAM cell? How did
you arrive at those sizes?
34) How does the size of PMOS Pull Up transistors (for bit & bit- lines) affect SRAM's
performance?
37) Give a big picture of the entire SRAM Layout showing your placements of SRAM
Cells, Row Decoders, Column Decoders, Read Circuit, Write Circuit and Buffers
38) In a SRAM layout, which metal layers would you prefer for Word Lines and Bit
Lines? Why?
41) For an AND-OR implementation of a two input Mux, how do you test for Stuck-At-0
and Stuck-At-1 faults at the internal nodes? (You can expect a circuit with some
redundant logic)
42) What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do
you avoid Latch Up?
Digital Design:
2) Given a circuit, draw its exact timing response. (I was given a Pseudo Random Signal
Generator; you can expect any sequential ckt)
3) What are set up time & hold time constraints? What do they signify? Which one is
critical for estimating maximum clock frequency of a circuit?
5) Design a divide-by-3 sequential circuit with 50% duty circle. (Hint: Double the Clock)
6) Suppose you have a combinational circuit between two registers driven by a clock.
What will you do if the delay of the combinational circuit is greater than your clock
signal? (You can't resize the combinational circuit transistors)
7) The answer to the above question is breaking the combinational circuit and pipelining
it. What will be affected if you do this?
9) Give the truth table for a Half Adder. Give a gate level implementation of the same.
13) How do you detect a sequence of "1101" arriving serially from a signal line?
Computer Architecture:
1) What is pipelining?
3) For a pipeline with 'n' stages, what�s the ideal throughput? What prevents us from
achieving this ideal throughput?
5) Instead of just 5-8 pipe stages why not have, say, a pipeline with 50 pipe stages?
8) What is a cache?
10) Cache Size is 64KB, Block size is 32B and the cache is Two-Way Set Associative.
For a 32-bit physical address, give the division between Block Offset, Index and Tag.
19) The CPU is busy but you want to stop and do some other task. How do you do it?
1) How would you decide weather to use C, C++ or Perl for a particular project?
5) Write a C program to compare two arrays and write the common elements in another
array
6) Write a function in C to accept two integers and return the bigger integer
11) Perl Regular Expressions are greedy. What does that mean?
13) Suppose a Perl variable has your name stored in it. Now, how can you define an array
by the name? (i.e., you have $a="Adarsh"; now you want @Adarsh=[.....])
14) Write a Perl script to parse a particular txt file and output to another file in a desired
format. (You can expect the file to have some data arranged rows & columns)
15) Suppose you have the outputs of a test program in some big test file. In Perl, how can
you test if all the outputs match a particular string?
19) How do you search for a particular string in all the text files in current directory from
command line?
2) What is Normal Distribution? Where is the Mean and Median on the graph for Normal
Distribution?
2) Tell me something about some problems you faced in a project and how did you
handle it?
1. amr Says:
January 12th, 2007 at 10:20 am
I would like to ask about how can we design NAND gate using c++,by asking the
user to enter 3 inputs and gives out an output, by drawing it’s nand gate as
follows:
example
F=[(AB)'.(CD)'.E']‘=AB+CD+E the gate looks like this:
A ————–|
|——————-|
B—————| |
|
C————-| ———-
|——————————– F
D————-| ———-
|
E————————————–
ans 61/62:
LVS is Layout vs Schematic….
this basically compares the generated extracted layout with that of the netlist
extracted from the schematic.
DRC is Design Rules Check…this defines the rules we have to follow in order to
make Device work after fab.
Question 77:
1. For a single computer processor computer system, what is the purpose of a processor cache and
describe its operation?
2. Explain the operation considering a two processor computer system with a cache for each
processor.
What are the main issues associated with multiprocessor caches and how might you solve it?
3. Explain the difference between write through and write back cache.
4. Are you familiar with the term MESI?
5. Are you familiar with the term snooping?
VALIDATION QUESTIONS:
What are the total number of lines written in C/C++? What is the most complicated/valuable
program written in C/C++?
What compiler was used?
Have you studied busses? What types?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what
is the latency of an
instruction in a 5 stage machine? What is the throughput of this machine ?
How many bit combinations are there in a byte?
What is the difference between = and == in C?
Are you familiar with VHDL and/or Verilog?
MEMORY, I/O, CLOCK AND POWER QUESTIONS
1. What types of CMOS memories have you designed? What were their size? Speed? Configuration
Process technology?
2. What work have you done on full chip Clock and Power distribution? What process technology
and budgets were used?
3. What types of I/O have you designed? What were their size? Speed? Configuration? Voltage
requirements?
Process technology? What package was used and how did you model the package/system?
What parasitic effects were considered?
4. What types of high speed CMOS circuits have you designed?
5. What transistor level design tools are you proficient with? What types of designs were they used
on?
6. What products have you designed which have entered high volume production?
What was your role in the silicon evaluation/product ramp? What tools did you use?
7. If not into production, how far did you follow the design and why did not you see it into
production?
• Two capacitors are connected in parallel through a switch. C1= 1uF, C2=
0.25uF.
Initially the switch is open, C1 is charged to 10V. What happens if we
close the switch? No losses in wires and capacitors.
• You have 2 switches to control the light in the long corridor. You want to
be able to turn the light on entering the corridor and turn it off at the other
end. Do the wiring circuit.
• There are 3 switches that can turn on and off a light in the room. How to
connect them?
• 8bit ADC with parallel output converts an input signal into digital numbers.
You have to come up with an idea of a circuit , that finds MAX of every 10
numbers at the output of the ADC.
• You have a 8 bit ADC clocking data out every 1mS. Design a system
that will sort the output data and keep the statistics of how often each
binary number appears at the output of ADC.
• Describe the operation of a DAC. What are the most important parameters
of a DAC? Do we really need both INL and DNL to estimate linearity?
• How will the output signal of an ideal integrator look like after
- a positive pulse is applied to the input;
- a series of 10 positive pulses ?
• Your system has CPU, ALU and two 8bit registers. There is no external
memory. Can you swap the contence of the registers ?
• To enter the office people have to pass through the corridor. Once
someone gets into the office the light turns on. It goes off when noone is
present in the room. There are two registration sensors in the corridor.
Build a state machine diagram and design a circuit to control the light.
• A voltage source with internal impedance Z_source = 50 OHm is
connected to a transmission line with Z = 50 OHm. Z_load is also 50
OHm.
The voltage source generates a single voltage step 1V.
What will be the voltage level on the load:
• Design a FIFO 1 byte wide and 13 words deep. The FIFO is interfacing 2
blocks with different clocks. On the rising edge of clk the FIFO stores data
and increments wptr. On the rising edge of clkb the data is put on the b-
output,the rptr points to the next data to be read.
If the FIFO is empty, the b-output data is not valid. When the FIFO is full
the existing data should not be overriden.
When rst_N is asserted, the FIFO pointers are asynchronously reset.
endmodule
• Design a 2bit up/down counter with clear using gates. (No verilog or vhdl)
• We have a circular wheel with half painted black and the other half painted
white. There are 2 censors mounted 45 degree apart at the surface of this
wheel( not touching the wheel) which give a "1" for black and "0" for white
passing under them. Design a circuit to detect which way the wheel is
moving. Can not assume any fixed position for start.
• We have a fifo which clocks data in at 100mhz and clocks data out at
80mhz. On the input there are only 80 data bits in any order during each
100 clocks. In other words, a 100 input clock will carry only 80 data bits,
and the other twenty clocks carry no data (data is scattered in any order).
How big the fifo needs to be to avoid data over/under-run.
| No Comments »
From the number of hits, it looks like the last post was quite popular. Therefore, I decided
to give the problem some more thought and to try to find more minimal solutions - or as
defined in the above quote “to cook this problem”.
My initial hunch was to try and utilize an SR latch somehow. After all it is a memory
element for the price of only two gates. I just had a feeling there is someway to do it like
that.
I decided to leave the count-to-3 circuitry, cause if we want to do a divide by 3, we
somehow have to count…
Here is what I first came up with:
The basic idea is to use the LSB of the counter to set the SR flop and to reset the SR flop
with a combination of some states and the low clock.
Here is the timing diagram that corresponds to the circuit above.
But! not everything is bright. The timing diagram is not marked red for nothing.
In an ideal world the propagation time through the bottom NOR gate would be zero. This
would mean that exactly when the S pin of the SR latch goes high the R pin of the flop
goes low - which means both pins are never high at the same time. Just as a reminder, if
both inputs of an SR latch are high, we get a race condition and the outputs can toggle -
not something you want on your clock signal. Back to the circuit… In our case, the
propagation time through the bottom NOR gate is not zero, and the S pin of the latch will
first go high, then - only after some time, the R pin will go low. In other words we will
have on overlap time where both R and S pin of the latch will be high.
Looking back at the waveform, it would be nice if we could eliminate the second pulse in
each set of two pulses on the R pin of the latch (marked as a * on the waveform). This
means we just have to use the pulse which occurs during the “00″ state of the counter.
This is easy enough, since we have to use the “00″ from the counter and the “0″ from the
clock itself - this is just the logic for a 3 input NOR gate!
And the corresponding waveform below. Notice how the S and R inputs of the SR latch
are not overlapping.
OK, so I am getting tons of email with requests to post a solution for this question which
was initially posted here.
I am going to post now what I consider the “standard minimal solution”, but some of you
have come up with some neat and tricky ways, which I will save for future a post.
The basic insight was to notice that if you are doing a divide by 3 and wanna keep the
duty cycle at 50% you have to use the falling edge of the clock as well.
The trick is how to come up with a minimal design, implementing as little as possible
flip-flops, logic and guaranteeing glitch free divided clock.
Most solutions that came in, utilized 4 or 5 flip flops plus a lot more logic than I believe
is necessary. The solution, which I believe is minimal requires 3 flops - two working on
the rising edge of the clock and generating a count-to-3 counter and an additional flop
working on the falling edge of the clock.
A count-to-3 counter can be achieved with 2 flops and a NOR or a NAND gate only, as
depicted below. These counters are also very robust and do not have a “stuck state”.
The idea now is to use the falling edge of the clock to sample one of the counter bits and
generate simply a delayed version of it.
We will then use some more logic (preferably as little as possible) to combine the rising
edge bits and falling edge bit in a way that will generate a divide by 3 output (with
respect to out incoming clock).
The easiest way (IMHO) to actually solve this, is by drawing the wave forms and simply
playing around. Here is what I came up with, which I believe to be the optimal solution
for this approach - but you are more than welcome to question me!
and here is also the wave form diagram that describes the operation of the circuit, I guess
it is self-explanatory.
One more interesting point about this implementation is that it does not require reset! The
circuit will wake up in some state and will arrive a steady state operation that will
generate a divide by 3 clock on its own. We discussed some of those techniques in the
past when talking about ring counters - link to that post here.
Posted in Interview Questions | 1 Comment »
Your company is pretty tight on budget this year and it happens to have only Muxes to
design with.
You are required to design a circuit equivalent to the one below, using only Mux
structures.
NAND is a better gate for design than NOR because at the transistor level the mobility of
electrons is normally three times that of holes compared to NOR and thus the NAND is a
faster gate.
Additionally, the gate-leakage in NAND structures is much lower. If you consider t_phl
and t_plh delays you will find that it is more symmetric in case of NAND ( the delay
profile), but for NOR, one delay is much higher than the other(obviously t_plh is higher
since the higher resistance p mos's are in series connection which again increases the
resistance).
The minimum amount of noise that can be allowed on the input stage for which the
output will not be effected.
4)Explain sizing of the inverter?
In order to drive the desired load capacitance we have to increase the size (width) of the
inverters to get an optimized performance.
5) How do you size NMOS and PMOS transistors to increase the threshold voltage?
The minimum amount of noise that can be allowed on the input stage for which the
output will not be effected.
delay increases.
9)What are the limitations in increasing the power supply to reduce delay?
The delay can be reduced by increasing the power supply but if we do so the heating
effect comes because of excessive power, to compensate this we have to increase the die
size which is not practical.
10)How does Resistance of the metal lines vary with increasing thickness and
increasing length?
R = ( *l) / A.
11)For CMOS logic, give the various techniques you know to minimize power
consumption?
Power dissipation=CV2f ,from this minimize the load capacitance, dc voltage and the
operating frequency.
12) What is Charge Sharing? Explain the Charge Sharing problem while sampling
data from a Bus?
In the serially connected NMOS logic the input capacitance of each gate shares the
charge with the load capacitance by which the logical levels drastically mismatched than
that of the desired once. To eliminate this load capacitance must be very high compared
to the input capacitance of the gates (approximately 10 times).
13)Why do we gradually increase the size of inverters in buffer design? Why not
give the output of a circuit to one large inverter?
Because it can not drive the output load straight away, so we gradually increase the size
to get an optimized performance.
14)What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter.
How do you avoid Latch Up?
Latch-up is a condition in which the parasitic components give rise to the Establishment
of low resistance conducting path between VDD and VSS with Disastrous results.
CV2
In general multiple MOS devices are made on a common substrate. As a result, the
substrate voltage of all devices is normally equal. However while connecting the devices
serially this may result in an increase in source-to-substrate voltage as we proceed
vertically along the series chain (Vsb1=0, Vsb2 0).Which results Vth2>Vth1.
17) Why is the substrate in NMOS connected to Ground and in PMOS to VDD?
we try to reverse bias not the channel and the substrate but we try to maintain the
drain,source junctions reverse biased with respect to the substrate so that we dont loose
our current into the substrate.
BJT has higher gain because it has higher transconductance.This is because the current in
BJT is exponentially dependent on input where as in MOSFET it is square law.
20)Why do we gradually increase the size of inverters in buffer design when trying
to drive a high capacitive load? Why not give the output of a circuit to one large
inverter?
We cannot use a big inverter to drive a large output capacitance because, who will drive
the big inverter? The signal that has to drive the output cap will now see a larger gate
capacitance of the BIG inverter.So this results in slow raise or fall times .A unit inverter
can drive approximately an inverter thats 4 times bigger in size. So say we need to drive a
cap of 64 unit inverter then we try to keep the sizing like say 1,4,16,64 so that each
inverter sees a same ratio of output to input cap. This is the prime reason behind going for
progressive sizing.
21)In CMOS technology, in digital design, why do we design the size of pmos to be
higher than the nmos.What determines the size of pmos wrt nmos. Though this is a
simple question try to list all the reasons possible?
In PMOS the carriers are holes whose mobility is less[ aprrox half ] than the electrons,
the carriers in NMOS. That means PMOS is slower than an NMOS. In CMOS
technology, nmos helps in pulling down the output to ground ann PMOS helps in pulling
up the output to Vdd. If the sizes of PMOS and NMOS are the same, then PMOS takes
long time to charge up the output node. If we have a larger PMOS than there will be more
carriers to charge the node quickly and overcome the slow nature of PMOS . Basically
we do all this to get equal rise and fall times for the output node.
In Transmission Gate, PMOS and NMOS aid each other rather competing with each
other. That's the reason why we need not size them like in CMOS. In CMOS design we
have NMOS and PMOS competing which is the reason we try to size them proportional
to their mobility.
23)All of us know how an inverter works. What happens when the PMOS and
NMOS are interchanged with one another in an inverter?
I have seen similar Qs in some of the discussions. If the source & drain also connected
properly...it acts as a buffer. But suppose input is logic 1 O/P will be degraded 1
Similarly degraded 0;
24)A good question on Layouts. Give 5 important Design techniques you would
follow when doing a Layout for Digital Circuits?
a)In digital design, decide the height of standard cells you want to layout.It depends upon
how big your transistors will be.Have reasonable width for VDD and GND metal
paths.Maintaining uniform Height for all the cell is very important since this will help
you use place route tool easily and also incase you want to do manual connection of all
the blocks it saves on lot of area.
b)Use one metal in one direction only, This does not apply for metal 1. Say you are using
metal 2 to do horizontal connections, then use metal 3 for vertical connections, metal4 for
horizontal, metal 5 vertical etc...
c)Place as many substrate contact as possible in the empty spaces of the layout.
d)Do not use poly over long distances as it has huge resistances unless you have no other
choice.
e)Use fingered transistors as and when you feel necessary.
f)Try maintaining symmetry in your design. Try to get the design in BIT Sliced manner.
Metastable state: A un-known state in between the two logical known states.This will
happen if the O/P cap is not allowed to charge/discharge fully to the required logical
levels.
One of the cases is: If there is a setup time violation, metastability will occur,To avoid
this, a series of FFs is used (normally 2 or 3) which will remove the intermediate states.
26)Let A and B be two inputs of the NAND gate. Say signal A arrives at the NAND
gate later than signal B. To optimize delay of the two series NMOS inputs A and B
which one would you place near to the output?
The late coming signals are to be placed closer to the output node ie A should go to the
nmos that is closer to the output.
43. How do you tackle coupling when design deep submicron SRAM memories?
It’s been a while since I posted a nice puzzle and since I know they are so popular, here is
a relatively simple one. It was used in job interviews btw (the last line will boost the
amount of views for this post…)
A snail leaves his warm house and takes a crawl through the forest leaving behind him on
the ground a trail of “0″s and “1″s. He takes a very complicated route crossing his path
several times. At one point he becomes tired and disoriented and wishes to go back home.
He sees his own path of “0″s and “1″s on the ground which he is about to cross (i.e. not
the trail ending in his tail) and wonders whether to follow the trail towards the left or
towards the right.
What is the shortest repeating code of “0″s and “1″s he should leave as he crawls in order
to easily and deterministically track the way back home? What is the minimum amount of
bits he needs to observe (or the sample length of the code)?
Take the clock frequency circuit I posted about here. As I mentioned the XOR gate at the
output might cause some duty cycle distortion with some libraries, due to the fact that
most XOR gates are not built to be symmetrical with respect to transition delay.
Now, assume your library has a perfectly symmetrical NAND gate. Could you modify
the circuit so the XOR will be replaced by a NAND gate and still have a clock frequency
at the output (You are of course allowed to add more logic on other parts of the circuit).
If not, give a short explanation why not. If yes send a circuit description/diagram.
This one was solved pretty quickly. Basically I was trying to trick you. The idea was to
try to create the impression an infinite amount of memory is necessary to hold all the 0–
>1 and 1–>0 transitions. In practice there cannot be 2 consecutive 0–>1 transitions (or
vice versa) since if the input goes from 0 to 1 before the next 0–>1 transition it must
change to a 0 and thus have a 1–>0 transition!
The FSM can have only three states: “exactly one more 0–>1″, “equal amount of 0–>1
and 1–>0″ or “exactly one more 1–>0″.
Puzzle #7 - Transitions
July 17, 2007
An FSM receives an endless stream of “0″s and “1″s. The stream can not be assumed to
have certain properties like randomness, transition density or the like.
Is it possible to build a state machine, which at any given moment outputs whether there
were more 0–>1 or 1–>0 transitions so far?
I had countless interviews, with many different companies, large corporations and start
ups. For some reason in almost all interviews, which were done in Israel, a single
question popped up more often than others (maybe it is an Israeli High-Tech thing…).
The solution should be easy enough even for a beginner designer. Since this is such a
popular question, and since I am getting a decent amount of readers lately, I thought why
not make a small challenge - try to find a solution to this problem with minimum
hardware.