Companies Related Questions, System Verilog 0 Comments

Here are few questions which are tricky to solve System Verilog Questions 1 Implement randc function using rand in system verilog ? Answer : click   2 Write A System Verilog Constraint To Generate Unique Values In Array Without Unique Keyword Answer : click  3 Fork Join Tricky Example Answer : There are few type of fork join questions

Read More

Companies Related Questions, Functional Verification, System Verilog 0 Comments

How do you implement randc function using rand in system verilog ? Program : Understand the difference between randc and rand function rand : it is random number , it can be repeated. randc : it is random number with no repetition for a cycle. it may repeat once it complete one cycle.   Lets

Read More

Companies Related Questions, Programming Questions, System Verilog 0 Comments

module unique_array; class data; rand bit [7:0] data[]; constraint data_values { foreach(data[i]) foreach(data[j]) if(i != j) data[i] != data [j] ;} endclass data cl_ob; initial begin cl_ob = new(); cl_ob.data = new[5]; assert(cl_ob.randomize()); foreach(cl_ob.data[i]) $display(“%d”,cl_ob.data[i]); end endmodule

Companies Related Questions, System Verilog 0 Comments

Yes , Answer to this question is take help of assign keyword and assign the one module signal to another module signal based on condition passed through config files Lets see how can you do it assign x.y_signal= sknobs::get_string(“+a.b.c.d.e.config=rtl”,”rtl”) == “rtl” ? ‘h0 : a.b.c.d.signal_dest;  

Companies Related Questions, System Verilog 0 Comments

Example 1 // Code your testbench here // or browse Examples module poly_case1; class BaseC; virtual function void func1; $display (“func1 in BaseC”); endfunction endclass: BaseC class DerivedC extends BaseC; function void func1; $display (“func1 in DerivedC”); endfunction endclass : DerivedC BaseC P1 ; DerivedC P2 = new; initial begin P1 = P2; P1.func1; end

Read More

Companies Related Questions, System Verilog 0 Comments

Differences 1. The most obvious one : Initial blocks get executed at the beginning of the simulation, final block gets executed  at the end of simulation 2. Final block has to be executed in zero time, which implies it can’t have any delay, wait, or non-blocking assignments. Initial block doesn’t have any such restrictions of

Read More

Companies Related Questions, System Verilog 0 Comments

With inheritance we are able to force a subclass to offer the same properties like their superclasses. Consequently, objects of a subclass behave like objects of their superclasses. Sometimes it make sense to only describe the properties of a set of objects without knowing the actual behaviour beforehand Abstract classes are those which can be

Read More

Companies Related Questions, System Verilog 0 Comments

An interface encapsulate a group of inter-related wires, along with their directions (via modports) and synchronization details (via clocking block). The major usage of interface is to simplify the connection between modules. But Interface can’t be instantiated inside program block, class (or similar non-module entity in SystemVerilog). But they needed to be driven from verification

Read More

Companies Related Questions, System Verilog 0 Comments

Unlike procedural programming, here in the OOP programming model programs are organized around objects and data rather than actions and logic. Objects represent some concepts or things and like any other objects in the real Objects in programming language have certain behavior, properties, type, and identity. In OOP based language the principal aim is to

Read More