4 Behavioural descriptions and combinational logic Flashcards
What is Behavioural description?
Behavioural description: circuit design method that specifies the behaviour of the circuit rather than the architecture of the circuit.
What is a structural description?
Structural description: explicit definition of how a circuit is constructed using multiple instantiation of modules.
Example of structural description for multiplexer?
Example of behavioral description? MUX?
System verilog blocks to deal with behavioral descriptions?
SystemVerilog has three specialised blocks for Verilog descriptions: always_comb, always_latch and always_ff
always_comb?
The always_comb statement can be used to split combinatorial logic into a flow of sequential instructions.
The sequence of commands to be executed is written between a begin and end statements.
Example of use of always_comb blocks?
Use of always_comb in System Verilog with graphing?
For loops in system verilog?
- A for loop provides the ability to create a loop that can automatically update an internal variable.
- The loop will execute as long as a Boolean condition associated with a loop variable is TRUE.
- The starting value of the loop variable is provided using an initial assignment
Uses of For loops?
- A for loop inside an always block allows easy duplication.
- A begin-end pair are used to create the looped set of statements
- An integer is declared as a loop variable.
Loop syntax?
Counter using a loop?
The need for if-else?
An if-else conditional statement provides a way to make conditional signal assignments based on Boolean conditions.
The use of an if statement?
The if portion of statement is followed by a Boolean condition that if evaluated TRUE will cause the signal assignment listed after it to be performed. If the Boolean condition is evaluated FALSE, the statements listed after the else portion are executed.
multiple statements used with if?
If multiple statements are to be executed, then the statement uses begin-end keywords.
The if statement is similar to the ? : conditional operator