4 Behavioural descriptions and combinational logic Flashcards

1
Q

What is Behavioural description?

A

Behavioural description: circuit design method that specifies the behaviour of the circuit rather than the architecture of the circuit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a structural description?

A

Structural description: explicit definition of how a circuit is constructed using multiple instantiation of modules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Example of structural description for multiplexer?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Example of behavioral description? MUX?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

System verilog blocks to deal with behavioral descriptions?

A

SystemVerilog has three specialised blocks for Verilog descriptions: always_comb, always_latch and always_ff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

always_comb?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Example of use of always_comb blocks?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Use of always_comb in System Verilog with graphing?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

For loops in system verilog?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Uses of For loops?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Loop syntax?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Counter using a loop?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The need for if-else?

A

An if-else conditional statement provides a way to make conditional signal assignments based on Boolean conditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The use of an if statement?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

multiple statements used with if?

A

If multiple statements are to be executed, then the statement uses begin-end keywords.

The if statement is similar to the ? : conditional operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Example if-else statement

A
17
Q

Example elseif structure?

A
18
Q

The case statement?

A
  • A case statement is another technique for modelling based on Boolean conditions. This method is similar to the switch-case statement in programming languages such as C.
  • Only one case executes depending on which value matches the condition.
  • The case statement can be based on multiple input signal names by concatenating the signals within the parenthesis.
  • The keyword default can be used to provide the desired signal assignment for any input codes not explicitly listed
19
Q

Case statement with one input signal

A
20
Q

Case statement with multiple input signals

A
21
Q

System Verilog casez statement?

A
  • SystemVerilog provides the casez statement to handle Z values as don’t cares in the input conditions.
  • The symbol ? can be used instead of Z.
  • It is important to include the default value to prevent latches being synthesised.
22
Q

Example of casez coding?

A
23
Q

What are parameters in System Verilog?

A

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.
24
Q

Example of delay parameters?

A
25
Q

Use of parameters to develop generic descriptions that are scalable and reusable.

A