Funvizeo logo
  • Contents
      • Back
      • Verilog
      • SystemVerilog
      • UVM
      • Digital Basics
      • Verification
Most Popular
Verification
  Testbench Evolution
  Constraint Random Verification
  Verification Techniques
  Verification Plan
  Code Coverage

Verilog
  Data Types
  Basic Constructs
  Behavioral Modeling
  Gate Modeling
  Simulation Basics
  Design Examples
  Interview Questions

SystemVerilog
  Data Types
  Class
  Interface
  Constraints and more!
  Testbench Examples
  Interview Questions

UVM
  Sequences
  Testbench Components
  TLM Tutorial
  Register Model Tutorial
  Testbench Examples
  Interview Questions

Digital Fundamentals
  Binary Arithmetic
  Boolean Logic
  Karnaugh Maps
  Combinational Logic
  Sequential Logic

SystemVerilog Interview Questions Set 6

  1. Write a small function to push 10 unique values from 0 to 50 into a queue.

Write a small function to push 10 unique values from 0 to 50 into a queue.


function random();
	bit [7:0] array[$];
	
	for (int i = 0; i  10; i++) begin
		int num;
		std::randomize(num) with { num inside {[0:50]};
									!(num inside {array}; 
								};
		array.push_back(num);								
	end
endfunction

Read more: SystemVerilog Interview Questions Set 6

Verilog Conditional Statements

In Verilog, conditional statements are used to control the flow of execution based on certain conditions. There are several types of conditional statements in Verilog listed below.

Conditional Operator


<variable> = <condition> ? <expression_1> : <expression_2>;

The conditional operator allows you to assign a value to a variable based on a condition. If the condition is true, expression_1 is assigned to the variable. Otherwise, expression_2 is assigned.

Read more: Verilog Conditional Statements

SystemVerilog Cast Static

Static cast is a SystemVerilog feature that allows converting an expression from one data type to another at compile time.

Syntax

'(value or variable or expression)

Properties

Here are some of the properties of static cast in SystemVerilog:

Read more: SystemVerilog Cast Static

SystemVerilog DPI

SystemVerilog DPI (Direct Programming Interface) is a feature that allows users to interface between SystemVerilog and foreign programming languages such as C, C++, and SystemC.

DPI enables users to integrate their SystemVerilog designs with external components written in other languages, creating a more powerful and flexible design environment. It also provides an easy and efficient way to connect existing code, usually written in C/C++ without the knowledge and the overhead of PLI/VPI.

Read more: SystemVerilog DPI

SystemVerilog Interview Questions Set 5

  1. What is a SystemVerilog interface ?

What is a SystemVerilog interface ?

SystemVerilog interfaces are a way to create structured hierarchical connections between modules and blocks in a design. They provide a way to bundle signals and functionality into reusable components, which can be easily instantiated and connected in a design.

  1. Modular design: Interfaces provide a modular approach to design, making it easier to create and reuse building blocks in a system.
  2. Encapsulation: They help in encapsulating the functionality and signals inside a module or block, making it easier to understand and maintain.
  3. Configurability: Interfaces can be parameterized, allowing for easy configurability and scalability.

Read more on SystemVerilog Interface.

Read more: SystemVerilog Interview Questions Set 5

  1. SystemVerilog Interview Questions Set 4
  2. SystemVerilog Interview Questions Set 3
  3. SystemVerilog Interview Questions Set 2
  4. SystemVerilog Interview Questions Set 1
  5. Verilog Net Types

Page 8 of 68

  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
Interview Questions
  Verilog Interview Set 1
  Verilog Interview Set 2
  Verilog Interview Set 3
  Verilog Interview Set 4
  Verilog Interview Set 5

  SystemVerilog Interview Set 1
  SystemVerilog Interview Set 2
  SystemVerilog Interview Set 3
  SystemVerilog Interview Set 4
  SystemVerilog Interview Set 5

  UVM Interview Set 1
  UVM Interview Set 2
  UVM Interview Set 3
  UVM Interview Set 4
Related Topics
  Digital Fundamentals
  Verilog Tutorial

  Verification
  SystemVerilog Tutorial
  UVM Tutorial
Latest in Verilog
  • Verilog $random
  • Verilog VCD Dump
  • Verilog VCD
  • Verilog Namespace
  • Verilog $stop $finish
Latest in SystemVerilog
  • SystemVerilog `define Macro
  • SystemVerilog Callback
  • SystemVerilog Interview Questions Set 10
  • SystemVerilog Interview Questions Set 9
  • SystemVerilog Interview Questions Set 8
Latest in UVM
  • UVM Callback
  • UVM Singleton Object
  • UVM Component [uvm_component]
  • UVM Object [uvm_object]
  • UVM Root [uvm_root]
© 2025 Funvizeo
Terms and Conditions