Example questions Flashcards
What does HDL stand for?
Hardware description language
What is a Field Programmable Gate Array?
This is an array of logic gates that can be manipulated to run a logical program.
What does FPGA stand for?
Field Programmable Gate Array.
The core component of an FPGA?
Configurable logic block.
The four main components within the CLB?
and multiplexer
What is the meaning of the term primitives in system Verilog?
All logic libraries have or can easily implement basic logic functions.
SystemVerilog implements a predefined set of logic functions, called primitives, that can be used instead of the library cells:
and(), nand(), or(), nor(), xor(), xnor(), not()
The output is always the first wire in the list
There can be as many inputs as required
Example: and U1(outputSignal, inputSignal1, inputSignal2); This makes designs more “portable” between technologies.
What is the meaning of instantiation in SystemVerilog?
The are two types of instantiation commonly used:
Instantiation with positional port mapping:
Signals are connected to the instanciated lower level module in the same order as they were defined in the low-level module
FullAdder bit1(A1,B1,C1,S1,C2)
]Not good as it is easy for this to be incorrect
Instantiation with positional port mapping
The names of the ports of the lower-level subsystem are provided with the signals
they are being connected to.
FullAdder bit1 (.A(A1),.B(B1),.C(C1),.Sum(S1),.Carry(C2)); The port connections can be listed in any order
What is the meaning of hierarchy in system verilog?
SystemVerilog allows us to include lower-level subsystems within a higher-level module to achieve the desired functionality.
This design approach, called hierarchy, is a good design practice that enables design partitioning.
Implement the circuit
What are the four values that the logic data type can take?
1,0,X,Z
Suppose you have the following vectors in system Verilog?
input logic [5:0]A;
output logic [5:0]B;
//supose A = 010101
Set output B with the value of A shifted to the left by three positions.
assign B << 3
Implement the digital system shown in the schetamtic below
assign F = (sel == 1) ? (B&C) : (A&C);
Explain the function of the operator ‘≫’, using and example in SystemVerilog
This operator is used for shiting.
Give and example
a << 3
shifts a three to the left
Give an example of continuous assignment using ‘assign’ in SystemVerilog
assign A = B+C;
What are the benefits of ‘enum’ and ‘struct’ data types, and give an example of each data type using SystemVerilog code.
Struct can have different data types while enum, have to be all the same length and data type.
Explain the use and benefit of parameter in the description and instantiation of a module?
Parameters can be used to scale a design
- The list #(parameter name=value …) is added into the module definition before the ports.
- The named parameters are used in for-loops etc. to scale the design.
- The default parameter value can be over-ridden in the instantiation.
Explain the use of blocking (=) and non-blocking (<=) assignments using always_comb and always_ff blocks in SystemVerilog.
Blocking executes code in sequence, as the code is blocked together.
Non-blocking means that the code is executed in parrallel at the same time.
always_comb
Describe the following diagram using two different approaches:
a. ‘if-else’ and a combinatorial block
b. ‘case’ and a combinatorial block
if sel = 1
out = in1
else
out = in0
always_comb
begin
case(Sel)
1: Out=in1;
2: Out=in0;
default
endcase
end