Top 28 Digital Logic Design Interview Questions
Q1. What Is Glitch? What Causes It (provide an explanation for With Waveform)? How To Overcome It?
The following discern suggests a synchronous opportunity to the gated clock using a records route. The flipflop is clocked at every clock cycle and the facts course is managed by way of an enable. When the allow is Low, the multiplexer feeds the output of the check in back on itself. When the permit is High, new records is fed to the flipflop and the sign in modifications its state.
Q2. What Is A Ring Counter?
A ring counter is a sort of counter composed of a round shift check in. The output of the ultimate shift register is fed to the input of the first register. For example, in a 4-register counter, with preliminary sign in values of 1100, the repeating pattern is: 1100, 0110, 0011, 1001, 1100, so on.
Q3. What Are The Differences Between A Flip-flop And A Latch?
Flip-flops are edge-sensitive gadgets wherein as latches are degree sensitive devices.
Flip-flops are proof against system defects in which are latches are touchy to system defects.
Latches require much less wide variety of gates (and therefore less electricity) than flip-flops.
Latches are quicker than flip-flops.
Q4. What Is A Multiplexer?
A multiplexer is a combinational circuit which selects certainly one of many enter indicators and directs to the best output.
Q5. What Are Set Up Time And Hold Time Constraints?
Set up time is the amount of time before the clock part that the enter signal needs to be solid to guarantee it's miles established nicely on the clock part.
Hold time is the quantity of time after the clock area that same input signal needs to be held earlier than converting it to ensure it is sensed nicely at the clock side.
Whenever there are setup and maintain time violations in any flip-flop, it enters a kingdom in which its output is unpredictable, which is known as as metastable kingdom or quasi solid kingdom. At the cease of metastable state, the flip-flop settles down to either common sense excessive or good judgment low. This whole manner is referred to as metastability.
Q6. Difference Between Heap And Stack?
The Stack is greater or much less liable for retaining tune of what’s executing in our code (or what’s been “known as”). The Heap is extra or less accountable for retaining tune of our gadgets (our statistics, well… most of it – we’ll get to that later.).
Think of the Stack as a chain of packing containers stacked one on top of the following. We keep music of what’s taking place in our application by using stacking another box on pinnacle whenever we call a technique (known as a Frame). We can simplest use what’s inside the pinnacle box at the stack. When we’re completed with the pinnacle field (the technique is achieved executing) we throw it away and continue to apply the stuff in the preceding field at the pinnacle of the stack. The Heap is comparable besides that its motive is to hold records (not maintain music of execution maximum of the time) so some thing in our Heap can be accessed at any time. With the Heap, there are no constraints as to what may be accessed like within the stack. The Heap is just like the heap of smooth laundry on our mattress that we have now not taken the time to position away but – we will grasp what we want quick. The Stack is like the stack of shoe boxes in the closet in which we ought to take off the pinnacle one to get to the only below it.
Q7. Given Only Two Xor Gates One Must Function As Buffer And Another As Inverter?
Tie one in all xor gates input to at least one it'll act as inverter.
Tie one in every of xor gates input to zero it will act as buffer.
Q8. Compare And Contrast Synchronous And Asynchronous Reset?
Synchronous reset common sense will synthesize to smaller flip-flops, specifically if the reset is gated with the common sense producing the d-input. But in such a case, the combinational common sense gate be counted grows, so the general gate count number savings might not be that enormous. The clock works as a filter for small reset glitches; but, if these glitches arise close to the active clock facet, the Flip-flop ought to pass metastable. In some designs, the reset have to be generated by way of a set of internal conditions. A synchronous reset is suggested for those styles of designs because it will filter out the good judgment equation glitches among clock.
Problem with synchronous resets is that the synthesis device cannot without problems distinguish the reset sign from every other information sign. Synchronous resets can also need a pulse stretcher to assure a reset pulse width wide enough to make sure reset is gift for the duration of an energetic fringe of the clock, if you have a gated clock to store electricity, the clock can be disabled coincident with the declaration of reset. Only an asynchronous reset will paintings in this case, because the reset might be removed prior to the resumption of the clock. Designs which can be pushing the limit for information direction timing, can not manage to pay for to have added gates and additional internet delays inside the statistics path because of good judgment inserted to deal with synchronous resets.
Asynchronous reset: The main trouble with asynchronous resets is the reset launch, additionally known as reset elimination. Using an asynchronous reset, the dressmaker is guaranteed no longer to have the reset introduced to the statistics path. Another benefit favoring asynchronous resets is that the circuit may be reset with or without a clock gift. Ensure that the release of the reset can occur within one clock length else if the discharge of the reset came about on or close to a clock part then turn-flops may go into metastable country.
Q9. What Is A Johnson Counter?
Johnson counter connects the supplement of the output of the final shift register to its enter and circulates a move of ones accompanied by means of zeros across the ring. For example, in a 4-sign up counter, the repeating sample is: 0000, one thousand, 1100, 1110, 1111, 0111, 0011, 0001, so on.
Q10. What Is Lut?
LUT - Look-Up Table. An n-bit appearance-up table can be applied with a multiplexer whose pick strains are the inputs of the LUT and whose inputs are constants. An n-bit LUT can encode any n-input Boolean feature via modeling such features as reality tables. This is a good way of encoding Boolean common sense features, and LUTs with 4-6 bits of enter are in truth the key thing of cutting-edge FPGAs.
Q11. What Is The Significance Of Fpgas In Modern Day Electronics? (applications Of Fpga.)
ASIC prototyping: Due to high value of ASIC chips, the common sense of the application is first established by dumping HDL code in a FPGA. This enables for quicker and less expensive testing. Once the common sense is established then they're made into ASICs.
Very useful in packages which can employ the huge parallelism offered by their architecture. Example: code breaking, particularly brute-pressure assault, of cryptographic algorithms.
FPGAs are sued for computational kernels consisting of FFT or Convolution in place of a microprocessor.
Applications consist of virtual signal processing, software program-defined radio, aerospace and protection structures, scientific imaging, computer imaginative and prescient, speech popularity, cryptography, bio-informatics, computer hardware emulation and a growing variety of other areas.
Q12. What Are Pla And Pal? Give The Differences Between Them?
Programmable Logic Array is a programmable tool used to implement combinational good judgment circuits. The PLA has a hard and fast of programmable AND planes, which hyperlink to a hard and fast of programmable OR planes, which can then be conditionally complemented to produce an output.
PAL is programmable array good judgment, like PLA, it also has a extensive, programmable AND plane. Unlike a PLA, the OR aircraft is fixed, limiting the range of terms that may be ORed collectively.
Due to constant OR plane PAL lets in greater area, which is used for different fundamental good judgment devices, including multiplexers, distinct-ORs, and latches. Most importantly, clocked factors, normally flip-flops, could be protected in PALs. PALs are also extraordinarily fast.
Q13. What Is Skew, What Are Problems Associated With It And How To Minimize It?
In circuit design, clock skew is a phenomenon in synchronous circuits wherein the clock sign (despatched from the clock circuit) arrives at different additives at special instances.
This is generally because of causes. The first is a material flaw, which reasons a sign to journey quicker or slower than predicted. The second is distance: if the signal has to journey the complete length of a circuit, it will possibly (relying at the circuit’s size) arrive at exclusive elements of the circuit at unique times. Clock skew can reason harm in methods. Suppose that a common sense path travels thru combinational good judgment from a source flipflop to a destination flipflop. If the vacation spot flipflop gets the clock tick later than the source flipflop, and if the logic route put off is brief enough, then the statistics sign would possibly arrive on the destination flipflop before the clock tick, destroying there the preceding facts that should have been clocked via. This is known as a maintain violation due to the fact the previous statistics isn't always held long enough on the destination flipflop to be nicely clocked thru. If the vacation spot flipflop receives the clock tick earlier than the source flipflop, then the statistics sign has that a great deal less time to reach the vacation spot flipflop earlier than the following clock tick. If it fails to achieve this, a setup violation happens, socalled due to the fact the brand new information changed into now not installation and stable earlier than the next clock tick arrived. A preserve violation is greater serious than a setup violation as it can't be fixed by increasing the clock period.
Clock skew, if accomplished proper, can also benefit a circuit. It can be intentionally introduced to lower the clock period at which the circuit will perform efficaciously, and/or to boom the setup or hold protection margins. The top of the line set of clock delays is decided by way of a linear program, in which a setup and a preserve constraint appears for each good judgment route. In this linear application, zero clock skew is simply a feasible point.
Clock skew may be minimized through right routing of clock signal (clock distribution tree) or setting variable postpone buffer so that every one clock inputs arrive on the same time.
Q14. What Is Difference Between Latch And Flipflop?
The major difference between latch and FF is that latches are degree sensitive even as FF are aspect sensitive. They each require the use of clock sign and are used in sequential logic. For a latch, the output tracks the input when the clock signal is excessive, so as long as the clock is logic 1, the output can exchange if the enter additionally changes. FF alternatively, will shop the enter simplest while there is a growing/falling fringe of the clock.
Q15. What Is The Difference Between Mealy And Moore Fsm?
Mealy FSM makes use of simplest enter moves, i.E. Output depends on enter and nation. The use of a Mealy FSM leads frequently to a reduction of the wide variety of states.
Moore FSM makes use of most effective entry moves, i.E. Output depends only at the state. The benefit of the Moore version is a simplification of the conduct.
Q16. Define Clock Skew , Negative Clock Skew, Positive Clock Skew?
Clock skew is a phenomenon in synchronous circuits in which the clock signal (sent from the clock circuit) arrives at special components at specific times. This can be caused by many various things, which includes wire-interconnect period, temperature versions, variant in intermediate devices, capacitive coupling, cloth imperfections, and differences in enter capacitance at the clock inputs of devices using the clock.
There are two types of clock skew: negative skew and positive skew. Positive skew occurs when the clock reaches the receiving register later than it reaches the register sending records to the receiving check in. Negative skew is the opposite: the receiving sign up gets the clock in advance than the sending sign in.
Q17. How To Achieve a hundred and eighty Degree Exact Phase Shift?
Never inform the use of inverter
a) dcm’s an in-built useful resource in most of fpga can be configured to get one hundred eighty diploma section shift.
B) Bufgds that is differential signaling buffers which might be also inbuilt useful resource of maximum of FPGA can be used.
Q18. What Are Various Types Of State Encoding Techniques? Explain Them?
One-Hot encoding: Each nation is represented by a bit flip-flop). If there are 4 states then it requires 4 bits (four flip-flops) to symbolize the cutting-edge country. The legitimate nation values are a thousand, 0100, 0010, and 00@If the value is 0100, then it me second country is the contemporary nation.
One-Cold encoding: Same as one-warm encoding besides that 'zero' is the valid cost. If there are 4 states then it calls for four bits (4 turn-flops) to symbolize the modern-day kingdom. The valid state values are 0111, 1011, 1101, and 1110.
Binary encoding: Each state is represented with the aid of a binary code. A FSM having '2 energy N' states requires most effective N flip-flops.
Gray encoding: Each nation is represented by way of a Gray code. A FSM having '2 strength N' states requires handiest N flip-flops.
Q19. What Is Significance Of Ras And Cas In Sdram?
SDRAM gets its deal with command in two address words.
It uses a multiplex scheme to shop enter pins. The first cope with word is latched into the DRAM chip with the row cope with strobe (RAS).
Following the RAS command is the column deal with strobe (CAS) for latching the second deal with word.
Shortly after the RAS and CAS strobes, the saved data is legitimate for analyzing.
Q20. Tell Some Of Applications Of Buffer?
They are used to introduce small delays
They are used to do away with pass speak induced due to inter electrode capacitance due to close routing.
They are used to help high fanout,eg:bufg
Q21. Implement An And Gate Using Mux?
This is the primary query that many interviewers ask. For and gate, provide one enter as choose line,incase if u r giving b as pick line, connect one input to logic ‘0’ and other enter to a.
Q22. Difference Between Mealy And Moore State Machine?
Mealy and Moore models are the basic models of nation machines. A state device which makes use of best Entry Actions, so that its output relies upon at the country, is called a Moore version. A nation device which uses only Input Actions, so that the output depends at the country and additionally on inputs, is known as a Mealy version. The models decided on will influence a design however there aren't any standard warning signs as to which version is better. Choice of a model relies upon at the application, execution me (for example, hardware structures are commonly best realized as Moore fashions) and private alternatives of a designer or programmer
Mealy gadget has outputs that rely upon the country and input (consequently, the FSM has the output written on edges) Moore device has outputs that rely upon country only (for this reason, the FSM has the output written in the state itself.
Adv and Disadv
In Mealy because the output variable is a function both input and country, modifications of state of the kingdom variables will be not on time with respect to adjustments of signal level within the input variables, there are opportunities of system defects acting in the output variables. Moore overcomes system defects as output dependent on most effective states and no longer the input sign degree.
All of the concepts may be implemented to Mooremodel kingdom machines due to the fact any Moore country device may be implemented as a Mealy country machine, although the converse isn't true.
Moore system: the outputs are houses of states themselves…
which me that you get the output after the gadget reaches a specific country, or to get some output your machine has to be taken to a state which gives you the output.The outputs are held until you visit a few other nation Mealy machine:
Mealy machines give you outputs instantly, this is right away upon receiving input, however the output is not held after that clock cycle.
Q23. What Is Slack?
‘Slack’ is the amount of time you have got this is measured from while an occasion ‘honestly occurs’ and when it ‘must occur’.. The time period ‘truly occurs’ also can be taken as being a anticipated time for whilst the occasion will ‘actually occur’.
When something ‘need to happen’ also can be called a ‘deadline’ so every other definition of slack would be the time from when something ‘virtually happens’ (name this Tact) till the deadline (name this Tdead).
Slack = Tdead – Tact.
Negative slack means that the ‘surely happen’ time is later than the ‘cut-off date’ time…in different phrases it’s too late and a timing violation….You've got a timing problem that needs a few interest.
Q24. Expand The Following: Pla, Pal, Cpld, Fpga?
PLA - Programmable Logic Array
PAL - Programmable Array Logic
CPLD - Complex Programmable Logic Device
FPGA - Field-Programmable Gate Array
Q25. Arrange The Following In The Increasing Order Of Their Complexity: Fpga,pla,cpld,buddy?
Increasing order of complexity: PLA, PAL, CPLD, FPGA.
Q26. Define Metastability?
If there are setup and maintain time violations in any sequential circuit, it enters a kingdom wherein its output is unpredictable, this country is referred to as metastable kingdom or quasi solid state, on the cease of metastable nation, the turn-flop settles all the way down to either good judgment excessive or good judgment low. This whole procedure is called metastability.
Q27. What Will Happen If Contents Of Register Are Shifter Left, Right?
It is widely known that in left shift all bits might be shifted left and LSB may be appended with 0 and in proper shift all bits may be shifted proper and MSB might be appended with 0 that is a honest wer What is predicted is in a left shift cost gets Multiplied through 2 eg:take into account 0000_1110=14 a left shift will make it 0001_110=28, it the equal style proper shift will Divide the price through 2.
Q28. Difference Between Onehot And Binary Encoding?
Common classifications used to explain the state encoding of an FSM are Binary (or incredibly encoded) and One hot.
A binaryencoded FSM design only requires as many flipflops as are needed to uniquely encode the range of states inside the state machine. The real variety of flipflops required is same to the ceiling of the logbase2 of the variety of states inside the FSM.
A onehot FSM layout requires a flipflop for every state within the layout and simplest one flipflop (the flipflop representing the contemporary or “warm” country) is set at a time in a one hot FSM design. For a state device with 916 states, a binary FSM simplest calls for four flipflops at the same time as a onehot FSM requires a flipflop for every state inside the layout FPGA carriers frequently suggest the usage of a onehot country encoding fashion because flipflops are considerable in an FPGA and the combinational good judgment required to implement a onehot FSM design is commonly smaller than maximum binary encoding patterns. Since FPGA performance is commonly associated with the combinational logic length of the FPGA design, onehot FSMs normally run quicker than a binary encoded FSM with large combinational logic blocks
