0% found this document useful (0 votes)
30 views

Signal Simulation: DR DC Hendry

1) The document discusses signal simulation and modeling delays in VHDL code. 2) It explains how concurrent assignment statements are executed whenever signals on the right-hand side change value and can be used to model timing delays. 3) An example simulation traces the behavior of signals over time as modeled by concurrent assignments with timing delays.

Uploaded by

litoduter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Signal Simulation: DR DC Hendry

1) The document discusses signal simulation and modeling delays in VHDL code. 2) It explains how concurrent assignment statements are executed whenever signals on the right-hand side change value and can be used to model timing delays. 3) An example simulation traces the behavior of signals over time as modeled by concurrent assignments with timing delays.

Uploaded by

litoduter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Signal

Simulation

Dr DC Hendry

Signals

Delta Delays

Transport and Signal Simulation


Inertial Delays

Waveforms in
an Assignment

Selected Dr DC Hendry
Assignment
Statement

January 2006
Signal
Simulation

Dr DC Hendry

1 Signals
Signals

Delta Delays

Transport and 2 Delta Delays


Inertial Delays

Waveforms in
an Assignment
3 Transport and Inertial Delays
Selected
Assignment
Statement
4 Waveforms in an Assignment

5 Selected Assignment Statement


Signals

Signal
Simulation

Dr DC Hendry 1 Signals represent data on wires or passing through logic


Signals gates, such signals may therefore be subject to delay.
Delta Delays

Transport and
Inertial Delays

Waveforms in
an Assignment

Selected
Assignment
Statement
Signals

Signal
Simulation

Dr DC Hendry 1 Signals represent data on wires or passing through logic


Signals gates, such signals may therefore be subject to delay.
Delta Delays 2 Such delays may be explicitly included within a concurrent
Transport and
Inertial Delays
assignment statement, for example:
Waveforms in x <= a and b after 1.5 nS;
an Assignment

Selected
Assignment
Statement
Signals

Signal
Simulation

Dr DC Hendry 1 Signals represent data on wires or passing through logic


Signals gates, such signals may therefore be subject to delay.
Delta Delays 2 Such delays may be explicitly included within a concurrent
Transport and
Inertial Delays
assignment statement, for example:
Waveforms in x <= a and b after 1.5 nS;
an Assignment
3 If either of the signals a or b changes value, the statement
Selected
Assignment is executed, then x may change value 1.5 nS later.
Statement
a

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

Waveforms in Simulation time = 0.0 nS


an Assignment

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

Waveforms in Simulation time = 1.0 nS


an Assignment

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

Waveforms in Simulation time = 1.0 nS


an Assignment

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

Waveforms in Simulation time = 1.0 nS


an Assignment

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

Waveforms in Simulation time = 1.0 nS


an Assignment

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

Waveforms in Simulation time = 2.0 nS


an Assignment

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

Waveforms in Simulation time = 2.0 nS


an Assignment

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

Waveforms in Simulation time = 2.0 nS


an Assignment

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

Waveforms in Simulation time = 2.0 nS


an Assignment

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

Waveforms in Simulation time = 3.0 nS


an Assignment

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

Waveforms in Simulation time = 3.0 nS


an Assignment

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

Waveforms in Simulation time = 3.0 nS


an Assignment

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

Waveforms in Simulation time = 3.0 nS


an Assignment

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

Waveforms in Simulation time = 3.5 nS


an Assignment

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

Waveforms in Simulation time = 3.5 nS


an Assignment

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

Waveforms in Simulation time = 4.0 nS


an Assignment

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

Waveforms in Simulation time = 4.0 nS


an Assignment

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

Waveforms in Simulation time = 4.0 nS


an Assignment

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

Waveforms in Simulation time = 4.0 nS


an Assignment

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

Waveforms in Simulation time = 5.0 nS


an Assignment

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

Waveforms in Simulation time = 5.0 nS


an Assignment

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

Waveforms in Simulation time = 5.0 nS


an Assignment

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

Waveforms in Simulation time = 5.0 nS


an Assignment

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

Waveforms in Simulation time = 5.5 nS


an Assignment

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

Waveforms in Simulation time = 5.5 nS


an Assignment

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

Waveforms in Simulation time = 6.0 nS


an Assignment

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

Waveforms in Simulation time = 6.0 nS


an Assignment

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

Waveforms in Simulation time = 6.0 nS


an Assignment

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

Waveforms in Simulation time = 6.0 nS


an Assignment

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

Waveforms in Simulation time = 7.5 nS


an Assignment

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

Waveforms in Simulation time = 7.5 nS


an Assignment

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

Waveforms in Simulation time = 9 nS


an Assignment

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

Delta Delays x <= a after 2 nS;


Transport and
Inertial Delays and suppose that a has the following waveform:
Waveforms in
an Assignment

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

Delta Delays x <= a after 2 nS;


Transport and
Inertial Delays and suppose that a has the following waveform:
Waveforms in
an Assignment

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

Delta Delays x <= transport a after 2 nS;


Transport and
Inertial Delays and suppose that a has the same waveform as above:
Waveforms in
an Assignment

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

Delta Delays x <= transport a after 2 nS;


Transport and
Inertial Delays and suppose that a has the same waveform as above:
Waveforms in
an Assignment

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

Delta Delays x <= 0, 1 after 1.0 nS,


Transport and 0, after 3.0 nS,
Inertial Delays
1, after 5.0 nS,
Waveforms in
an Assignment 0, after 6.0 nS;
Selected
Assignment
Statement
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

Delta Delays x <= 0, 1 after 1.0 nS,


Transport and 0, after 3.0 nS,
Inertial Delays
1, after 5.0 nS,
Waveforms in
an Assignment 0, after 6.0 nS;
Selected
Assignment
Statement
The signal x then behaves as follows:

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

Delta Delays architecture rtl of mux4to1 is


Transport and begin
Inertial Delays
with s0 & s1 select
Waveforms in
an Assignment y <= i0 when 00,
Selected i1 when 01,
Assignment
Statement i2 when 10,
i3 when others;
end rtl;
Selected Assignment Statement

Signal
Simulation

Dr DC Hendry

Signals

Delta Delays 1 The expression s0 & s1 denotes the concatenation of the


Transport and bits s0 and s1.
Inertial Delays

Waveforms in
an Assignment

Selected
Assignment
Statement
Selected Assignment Statement

Signal
Simulation

Dr DC Hendry

Signals

Delta Delays 1 The expression s0 & s1 denotes the concatenation of the


Transport and bits s0 and s1.
Inertial Delays

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

Delta Delays 1 The expression s0 & s1 denotes the concatenation of the


Transport and bits s0 and s1.
Inertial Delays

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.

You might also like