Signal Simulation: DR DC Hendry
Signal Simulation: DR DC Hendry
Simulation
Dr DC Hendry
Signals
Delta Delays
Waveforms in
an Assignment
Selected Dr DC Hendry
Assignment
Statement
January 2006
Signal
Simulation
Dr DC Hendry
1 Signals
Signals
Delta Delays
Waveforms in
an Assignment
3 Transport and Inertial Delays
Selected
Assignment
Statement
4 Waveforms in an Assignment
Signal
Simulation
Transport and
Inertial Delays
Waveforms in
an Assignment
Selected
Assignment
Statement
Signals
Signal
Simulation
Selected
Assignment
Statement
Signals
Signal
Simulation
1.5 nS
Concurrent Statements
Signal
Simulation
Dr DC Hendry
1 The statements within an architecture body are concurrent
Signals
statements, and they execute in parallel.
Delta Delays
Transport and
Inertial Delays
Waveforms in
an Assignment
Selected
Assignment
Statement
Concurrent Statements
Signal
Simulation
Dr DC Hendry
1 The statements within an architecture body are concurrent
Signals
statements, and they execute in parallel.
Delta Delays
Transport and
2 A VHDL concurrent assignment statement is executed
Inertial Delays whenever any of the input signals on the right hand side
Waveforms in
an Assignment
of the statement changes value.
Selected
Assignment
Statement
Concurrent Statements
Signal
Simulation
Dr DC Hendry
1 The statements within an architecture body are concurrent
Signals
statements, and they execute in parallel.
Delta Delays
Transport and
2 A VHDL concurrent assignment statement is executed
Inertial Delays whenever any of the input signals on the right hand side
Waveforms in
an Assignment
of the statement changes value.
Selected 3 The next statement is often used to generate a clock
Assignment
Statement waveform:
clk <= not clk after 5 nS;
Concurrent Statements
Signal
Simulation
Dr DC Hendry
1 The statements within an architecture body are concurrent
Signals
statements, and they execute in parallel.
Delta Delays
Transport and
2 A VHDL concurrent assignment statement is executed
Inertial Delays whenever any of the input signals on the right hand side
Waveforms in
an Assignment
of the statement changes value.
Selected 3 The next statement is often used to generate a clock
Assignment
Statement waveform:
clk <= not clk after 5 nS;
4 The order of statements within an architecture body is
immaterial. We say that the statements are sensitive to
the signals appearing on the right hand side.
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 2.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 2.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to fall at 4.0 nS
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to fall at 4.0 nS
Delta Delays
y is scheduled to rise at 3.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to fall at 4.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to fall at 4.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 6.0 nS
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 6.0 nS
Delta Delays
y is scheduled to fall at 5.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 6.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals x is scheduled to rise at 6.0 nS
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 7.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
y is scheduled to rise at 7.5 nS
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Example Simulation:
Signal
Simulation y <= x after 1.5 nS;
Dr DC Hendry
x <= (a or b) after 1.0 nS;
Signals
Delta Delays
Transport and
Inertial Delays
Selected
Assignment a
Statement
y
Delta Delays
Signal
Simulation
Dr DC Hendry
Take the two statements:
Signals
x <= y;
Delta Delays
Transport and
w <= x;
Inertial Delays
Waveforms in
an Assignment
Selected
Assignment
Statement
Delta Delays
Signal
Simulation
Dr DC Hendry
Take the two statements:
Signals
x <= y;
Delta Delays
Transport and
w <= x;
Inertial Delays
Waveforms in
an Assignment
1 When is x scheduled to change if y changes value at time
Selected 10 nS? The answer is not 10 nS, but 10 nS +.
Assignment
Statement
Delta Delays
Signal
Simulation
Dr DC Hendry
Take the two statements:
Signals
x <= y;
Delta Delays
Transport and
w <= x;
Inertial Delays
Waveforms in
an Assignment
1 When is x scheduled to change if y changes value at time
Selected 10 nS? The answer is not 10 nS, but 10 nS +.
Assignment
Statement 2 Similarly w is scheduled to change at time 10 nS + 2.
Delta Delays
Signal
Simulation
Dr DC Hendry
Take the two statements:
Signals
x <= y;
Delta Delays
Transport and
w <= x;
Inertial Delays
Waveforms in
an Assignment
1 When is x scheduled to change if y changes value at time
Selected 10 nS? The answer is not 10 nS, but 10 nS +.
Assignment
Statement 2 Similarly w is scheduled to change at time 10 nS + 2.
3 The value of is assumed to be so small that no matter
how many delays we sum, that delay is always smaller
than any real delay.
Inertial Delay
Signal
Simulation
Dr DC Hendry
Take the concurrent assignment statement:
Signals
Selected
Assignment
0 1 2 3 4 5 6 7 8 9 nS
Statement
a
x
Inertial Delay
Signal
Simulation
Dr DC Hendry
Take the concurrent assignment statement:
Signals
Selected
Assignment
0 1 2 3 4 5 6 7 8 9 nS
Statement
a
x
This behaviour is referred to as inertial delay.
Inertial Delay
Signal
Simulation
Dr DC Hendry
Signals
1 A rising edge followed by a falling edge in a time less than
Delta Delays
Transport and
the delay in the assignment, cancels the rising edge.
Inertial Delays
Waveforms in
an Assignment
Selected
Assignment
Statement
Inertial Delay
Signal
Simulation
Dr DC Hendry
Signals
1 A rising edge followed by a falling edge in a time less than
Delta Delays
Transport and
the delay in the assignment, cancels the rising edge.
Inertial Delays 2 Similarly for a falling edge followed by a rising edge.
Waveforms in
an Assignment
Selected
Assignment
Statement
Inertial Delay
Signal
Simulation
Dr DC Hendry
Signals
1 A rising edge followed by a falling edge in a time less than
Delta Delays
Transport and
the delay in the assignment, cancels the rising edge.
Inertial Delays 2 Similarly for a falling edge followed by a rising edge.
Waveforms in
an Assignment 3 This behaviour is intended to model the behaviour of RC
Selected
Assignment
like circuits.
Statement
Inertial Delay
Signal
Simulation
Dr DC Hendry
Signals
1 A rising edge followed by a falling edge in a time less than
Delta Delays
Transport and
the delay in the assignment, cancels the rising edge.
Inertial Delays 2 Similarly for a falling edge followed by a rising edge.
Waveforms in
an Assignment 3 This behaviour is intended to model the behaviour of RC
Selected
Assignment
like circuits.
Statement
4 This is the default behaviour in a concurrent assignment
statement. Inertial delay may be explicitly specified by:
x <= inertial a after 2 nS;
Transport Delay
Signal
Simulation
Dr DC Hendry
Now consider the alternative statement:
Signals
Selected
Assignment
0 1 2 3 4 5 6 7 8 9 nS
Statement
a
x
Transport Delay
Signal
Simulation
Dr DC Hendry
Now consider the alternative statement:
Signals
Selected
Assignment
0 1 2 3 4 5 6 7 8 9 nS
Statement
a
x
This behaviour is referred to as transport delay.
Transport Delay
Signal
Simulation
Dr DC Hendry
Signals
Delta Delays
1 Transport delay is intended to model the behaviour of
Transport and
Inertial Delays transmission lines (such as co-axial cable), where the
Waveforms in
an Assignment
signal is delayed, but not modified.
Selected
Assignment
Statement
Transport Delay
Signal
Simulation
Dr DC Hendry
Signals
Delta Delays
1 Transport delay is intended to model the behaviour of
Transport and
Inertial Delays transmission lines (such as co-axial cable), where the
Waveforms in
an Assignment
signal is delayed, but not modified.
Selected 2 Transport delay is specified by placing the keyword
Assignment
Statement transport at the start of the statement, as in:
x <= transport a after 2 nS;
Waveforms in an Assignment
Signal
Simulation
It is often useful, especially in testbenches (to be discussed
Dr DC Hendry
later) to specify a waveform to a signal, this may be done with:
Signals
Signal
Simulation
It is often useful, especially in testbenches (to be discussed
Dr DC Hendry
later) to specify a waveform to a signal, this may be done with:
Signals
0 1 2 3 4 5 6 7 8 nS
Selected Assignment Statement
Signal
Simulation The selected assignment statement allows a choice of
Dr DC Hendry
expression as the right hand side of an assignment. Which
Signals expression is used is determined by the value of an expression
Delta Delays with a WITH clause. For example:
Transport and
Inertial Delays
library ieee;
Waveforms in
an Assignment use ieee.std_logic_1164.all;
Selected
Assignment
Statement entity mux4to1 is
port(
i0, i1, i2, i3 : in std_logic;
s0, s1 : in std_logic;
y : out std_logic);
end entity mux4to1;
Selected Assignment Statement
Signal
Simulation
Dr DC Hendry
Signals
Signal
Simulation
Dr DC Hendry
Signals
Waveforms in
an Assignment
Selected
Assignment
Statement
Selected Assignment Statement
Signal
Simulation
Dr DC Hendry
Signals
Waveforms in
2 All possible values of the expression in the WITH statement
an Assignment
must be catered for.
Selected
Assignment
Statement
Selected Assignment Statement
Signal
Simulation
Dr DC Hendry
Signals
Waveforms in
2 All possible values of the expression in the WITH statement
an Assignment
must be catered for.
Selected
Assignment
Statement
3 As s0 and s1 are of type std logic they have values
other than 0 and 1, these other values are catered for
by the others clause.