Repository navigation
Interface Interview Questions
1.How does the clocking block handles synchronous reset?
Synchronous reset
Synchronous reset is sampled only with respect to clock event. When reset is enabled, it will be effective only after next active clock edge.
module synchronous_reset (input logic clk, rst, in1, output logic out1)
always @(posedge clk)
if(rst) out1 <= 1'b0;
else out1 <= in1;
endmodule
Here , we can see that out1 will be changed only with the posedge of clk. So the reset will be wide enough to be captured for next posedge clk.
Note: The clocking block is only designed to handle synchronous reset - it should happen only be based on clock event. Reset in clocking block should be handled elsewhere. If the clocking block outputs are variables, you can procedurally assign them outside of a clocking block on a reset.
how does the modport handle asynchronous reset?
Asynchronous Reset
In asynchronous reset sampling is done by independent of clk. When reset is enabled ,it will be effective immediately within the same the clock edges.
module asynchronous_reset (input logic clk, rst, in1, output logic out1);
always @(posedge clk or posedge rst)
if(rst) out1 <= 1'b0;
else out1 <= in1;
endmodule
In asynchronous whenever there is a posedge of clock or posedge of reset happens, then out1 will be changed.

Fig 1: Design example
Here, in this example there are three examples a,b,c. 'a' is continuous signal and it is asynchronous signal. 'b' and 'c' signals are synchronous signals. Using modport we can change the asynchronous signal 'a' to synchronous signal.
modport TB_MP(TB_CB , output a);
In asynchronous whenever there is a posedge of clock or posedge of reset happens, then out1 will be changed.
Note: In Modport, the design can handled with asynchronous reset. The asynchronous reset will be happen at any time.
-
- Calling a function with values as arguments
- Calling a function with variables as arguments
- Calling a function with values from an expression
- Calling a function with variables with positional arguments
- calling an automatic function
- calling a function with variables with reference of variables
- calling a function with a void return type
- Calling a function by passing an array
- Calling a function by passing an array from display
- Calling a function with variables that had default values
- Calling a task from function(exceptional case by using fork and join_none)
-
- Random Function System
- Random Variables
- Std Randomize
- Constraint Block
- Array Randomization
- Inside Constraint
- Inverted Inside Constraint
- Weighted Distribution
- Bidirectional Constraint
- Implication Constraint
- if-else constraint
- foreach
- Solve before constraint
- Static Constraint
- Randomization methods
- Constraint conflict
- Inline Constraint
- Soft Constraint
- Disable Constraint
- Disable Randomization
- randcase
- constraint memory examples
-
- class
- class handle
- class constructor
- object
- this keyword
- super keyword
- Scope resolution and extern keyword
- Chaining Constructs
- Constant class properties
- copying objects
- parameterized classes
- virtual methods
- static properties and methods
- Over riding class members
- Inheritance
- Polymorphism
- Encapsulation
- Abstraction