All Exams Test series for 1 year @ ₹349 only
Question

In the procedural statement, reset action occurs if ____________ 

always @ (negedge clock) begin

if (! Reset) D=0; else Q=D 

end

The correct answer is
reset is 0 at negative edge of clock

Understanding Verilog Procedural Statements and Reset Logic

This solution explains how a reset action occurs within a specific Verilog procedural statement, focusing on the conditions defined by the code and the clock signal.

Verilog Code Breakdown

Let's analyze the provided Verilog code snippet:

$always @(negedge clock)
begin
  if (!Reset)
    D = 0;
  else
    Q = D;
end$
  • $always @(negedge clock)$: This defines a block of code that executes only when a falling (negative) edge of the signal named $clock$ occurs. This is typical for synchronous digital circuit design.
  • $begin...end$: These keywords enclose the procedural block that is sensitive to the $negedge clock$ event.
  • $if (!Reset)$: This is a conditional statement. The expression $!Reset$ evaluates to true if the signal $Reset$ is logically false (i.e., $0$).
  • $D = 0;$: This is the action taken if the condition $!Reset$ is true. In this case, the signal $D$ is assigned the value $0$. This is often the reset action in such blocks.
  • $else Q = D;$: If the condition $!Reset$ is false (meaning $Reset$ is $1$), then the signal $Q$ is assigned the current value of signal $D$. This represents the normal operation (non-reset) of the sequential logic.

Analyzing the Reset Condition

The question asks when the reset action occurs. Based on the code:

  • The entire block is sensitive to the $negedge clock$.
  • The specific reset action is $D = 0$.
  • This action is executed only when the condition $if (!Reset)$ is met.
  • The condition $!Reset$ is true when the $Reset$ signal is $0$.

Therefore, the reset action ($D = 0$) occurs specifically when the $Reset$ signal is $0$ *at the time* the negative edge of the $clock$ signal happens.

Evaluating the Options

Let's examine the given options in light of our analysis:

  • Option 1: $D$ is 1 at negative edge of clock: The code assigns $D=0$ during reset, not 1. So, this is incorrect.
  • Option 2: $D$ is 0 at negative edge of clock: While $D$ becomes 0 during reset, this option describes the *result* rather than the *condition* that triggers the reset. The condition is based on the $Reset$ signal itself.
  • Option 3: $reset$ is 0 at negative edge of clock: This accurately describes the condition $!Reset$ being true when the $negedge clock$ occurs.
  • Option 4: $reset$ is 1 at negative edge of clock: If $Reset$ were 1, the condition $!Reset$ would be false, and the `else` part ($Q = D$) would execute, not the reset action. So, this is incorrect.

The procedural statement executes a reset action (assigning $D = 0$) when the condition $!Reset$ is true, which means $Reset$ must be $0$, and this check happens specifically at the $negedge clock$.

Was this answer helpful?

Important Questions from Sequential Circuits

  1. The design of synchronous circuit involves following steps 

    A. From the specifications, derive a state diagram of a circuit 

    B. Derive the simplified flip-flops input and output equations. 

    C. Reduce the number of state, if necessary 

    D. Choose the type of flip-flops to be used 

    E. Assign binary values to the states and obtain binary coded table 

    Choose the correct answer from the options given below:

  2. Find the time periods ($T_{ON}$ and $T_{OFF}$) of an astable multivibrators that oscillates at 50 kHz and 60% duty cycle.
  3. Read the following statements :

    i. Gate is a combinational logic.
    ii. JK Flip-flop in toggle mode is not combinational logic.
    iii. MSJK FF suffers from race-around.
    iv. Counters are sequential circuits.

    Which is correct ?

  4. Which flip-flop can be used as latch ?

  5. The truth table of D flip-flop is given below:

    C  DQn+1
    OXQn (Last State)
    $\uparrow$00
    $\uparrow$11

    Choose exact characteristic equation based on above Truth Table

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App