Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Are The Following Codes Are Synthesizable ? Is There Any Difference In The Synthesis Result Of (i) And (ii)?< (i) Always @ (posedge Clk1 Or Negedge Clk2) Begin If (!clk2 && A) Dout <= 0; Else Dout<= Din; End (ii)

Answer»

ALWAYS @ (posedge Clk1 Or Negedge Rst)
Begin
If (!rst && A)
Dout <= 0;
Else
Dout<= DIN;
End

Both are not synthesizable as there is a MIXING of asynchronous and synchronous element in the if condition.

Both are not synthesizable as there is a mixing of asynchronous and synchronous element in the if condition.

2.

Is The Following Code Synthesizable? Always @ (posedge Clk1 Or Negedge Clk2) Begin If (!clk2) Dout &lt;= 0; Else Dout&lt;= Din; End

Answer»

Yes it is SYNTHESIZABLE TRY to READ clk2 as active LOW RESET.

Yes it is synthesizable try to read clk2 as active low reset.

3.

Tell The Scenarios Where Synthesis Error Occurs.?

Answer»

A synthesis error can OCCUR in the following scenarios:

  1. When there is multiple ASSIGNMENTS on the same signal in TWO different blocks, “a multiple driver found” message will come.
  2. When there is mixture of asynchronous reset with some other signal and that signal is not used in the sensitivity list; basically mixing of multiple edges and synchronous and asynchronous elements are not allowed.
  3. No element in the always BLOCK sensitivity list.
  4. Mixing of B.A and N.B.A on the same signal in two different conditional statements.
  5. If reg DATATYPES are used in assign statements, etc.

A synthesis error can occur in the following scenarios:

4.

If No Parameters In The Always Sensitivity List, How The Always Block Executes?

Answer»

It will repeat itself LIKE a FOREVER loop but the performance will degrade.

It will repeat itself like a forever loop but the performance will degrade.

5.

Is There A Latch In The Following Code? What If The “sel” Value Is “x”. What Will Be The Simulation Result? Always @ ( En ) Begin Dout = 0 Case ( Sel ) 0: Dout = In ; Default : Dout = 1; End

Answer»

No There is no latch as the default statement is present and the OUTPUT will be GOVERN by the case statement.

No There is no latch as the default statement is present and the output will be govern by the case statement.

6.

Is There A Latch In The Following Code? What If The “sel” Value Is “x”. What Will Be The Simulation Result? Always @ ( En ) Begin Dout = 0 Case ( Sel ) 0: Dout = In ; End

Answer»

No There is no Latch as dout=0 before the CASE STATEMENT will be executed. Even if the “sel” value is “X”, no latch would be formed as “dout” has been ALREADY initialized to “0”.

No There is no Latch as dout=0 before the case statement will be executed. Even if the “sel” value is “X”, no latch would be formed as “dout” has been already initialized to “0”.

7.

What Will Be The Output Of The Following Code? Always ( * ) Begin A = B + D; A = C + B; End

Answer»

This is actually a RACE CONDITION and the TOOL will TAKE the LAST assignment on “a”.

This is actually a race condition and the tool will take the last assignment on “a”.

8.

Why We Use B.a (blocking Assignments) And N.b.a (non Blocking Assignments)?

Answer»

B.A are USED to model COMBINATORIAL logic as the value is of continuous assignment and doesn’t depend on the previous value, while N.B.A are used to model sequential circuits as the previous value is NEEDED to propagate.

B.A are used to model combinatorial logic as the value is of continuous assignment and doesn’t depend on the previous value, while N.B.A are used to model sequential circuits as the previous value is needed to propagate.

9.

What Can Be Done To Break The Combinational Loop?

Answer»

By adding synchronous elements in the PATH. If it is really NEEDED and if the DESIGN PERMITS then by adding the buffers in the path.

By adding synchronous elements in the path. If it is really needed and if the design permits then by adding the buffers in the path.

10.

Where Can We Use Linting Tools ? Can We Use Them To Debug Syntax?

Answer»

LINTING TOOLS are USED to evaluate the design for the synthesizability of the design. These tools are USE to check for potential mismatches between simulation and synthesis. No they are not used to check the SYNTAX.

Linting tools are used to evaluate the design for the synthesizability of the design. These tools are use to check for potential mismatches between simulation and synthesis. No they are not used to check the syntax.

11.

If An Oscillatory Circuit Is There; What Happens During (a) Rtl Synthesis (b) Simulation?

Answer»
  • During the RTL synthesis, the synthesis tool will GIVE a WARNING during synthesis about the COMBINATORIAL feedback loop.
  • During the simulation the simulation will get STOPPED SAYING the Iteration limit reached.

12.

If There Is An Asynchronous Feedback Loop What Is The Problem?

Answer»

If there is an ASYNCHRONOUS loop in the design the circuit becomes oscillatory or it may reach a STABLE state where it might GET HUNG and it could not get out.

If there is an asynchronous loop in the design the circuit becomes oscillatory or it may reach a stable state where it might get hung and it could not get out.

13.

Does A Latch Get Inferred When There Is No Else Statement But Multiple Ifs Covering Whole Functionality?

Answer»

Conceptually no latch should be inferred but SOMETIMES the synthesis TOOLS are not intelligent enough and they might infer a latch. In order to AVOID that, the safest way is to use an “else / default” STATEMENT in “if / case” RESPECTIVELY.

Conceptually no latch should be inferred but sometimes the synthesis tools are not intelligent enough and they might infer a latch. In order to avoid that, the safest way is to use an “else / default” statement in “if / case” respectively.

14.

How A Latch Gets Inferred In Rtl Design?

Answer»

A latch gets inferred in the RTL design:-

  • When there is no “else / default” statement in the “if / case” STATEMENTS; in short if all possibilities of the conditions are not COVERED.
  • When all the outputs reg are not assigned the values in every CONDITION of the “if / case” statement and some are LEFT out, on the left out signals a latch gets inferred.

A latch gets inferred in the RTL design:-