www.bitvis.no
What is missing?
Missing:
Sequential testing
FPGA
PIF
uart
SPI
DMA
P3
Intr
ctrl
ETH
P2
Parallell operation
Corner case bugs
P1
ETH
Data
In this particular case: Bug in FSM 1
Valid
Data May only be detected if a and bData
in the same cycle:
provider a. Selection Ack
receiver
of data source - e.g.
via register interface
FSM 1 b. Acknowledge from Data Receiver
FSM 2
FSM 1: Data source changes
Jumps to relevant state
When
available:
Two data
events
may happen at the same time
Set Data & Valid
Reset Ack
Typical testbench
110001011010011110100111011011010011110011
Typical testbench
Sequential
Clock
Gen
Testcase
Sequencer
Sequential testing
No bug found
Parallel operation
Corner case bugs
FPGA
PIF
uart
SPI
DMA
P2
P3
Intr
ctrl
P1
ETH
Adding
threads
Lab
CCL ?
?
Ad hoc
"structure"
ETH
Structured
with good overview
The critically missing VHDL testbench feature
110001011010011110100111011011010011110011
p_main (test-sequencer)
BFM
enable_p_apply_data
p_apply_data
BFM
BFM
Input
stimuli
enable_p_fetch_data
DUT
(e.g. Filter)
in
out
BFM
BFM
Exp.
Output
Model
Scoreboard
p_fetch_data
The UART
110001011010011110100111011011010011110011
DUT
(UART)
Clocks
Bus
interface
Other
Ports Ext. I/O
RX + TX
So
Need to control RX, TX and PIF independently
Must be tightly controlled from a sequencer
Must allow full flexibility in data, access times, etc
Will show typical protocol interface bug in tutorial @13:30
The critically missing VHDL testbench feature
FIFO
rx/tx
p_main (test-sequencer)
BFM
p_transmit
BFM
trigger_p_receive
num_data_words
p_receive_data
baudrate severity_data_error
baudrate_margin TO_on_ack
baudrate_severity severity_TO
TO_on_receive
DUT (UART)
RX
TX
BFM
Oooops...
ack
busy
data_received
p_receive
Problem
growing for every detected need
As for the Regular
Data is
Stream:
Stumbling
intotoproblems
as
we develop
our tests....
-control
Need
set number
of data
words
Need
Need to
separate
threads
for of
Sequencer
and
interfaces
severity
receiving
wrong
data to TX & RX
Occasionally
p_receive
doesn't
detect
the trigger
"pulse"
-toNeed
tothat
see
actual
data
received
in the
sequencer
Can't
wait
forever
forthe
the
acknowledge
Need
send
to
p_receive
for
checking
data
received
Sequencer
must sometimes
wait untilto
p_receive
is free
Need
acknowledge
from
p_receive
sequencer
Need timeout,
with
error
handling
and
reporting
Receiving
data to
may
take
forever
- e.g.
if bug
in TB or DUT
Need
set
baudrate
Need -busy-indication
from p_receive (or 'completed')
Need -time
for margins
data reception
Needout
to set
for baudrate, and severity
(May need severity for time out for data reception)
- etc, etc .....
10
11
110001011010011110100111011011010011110011
transmit(x"C1")
BFM
DUT (UART)
RX
TX
TLM
p_transmit
BFM
TLM
BFM
receive(x"2A")
receive(UART,
x"2A", WARNING,
1 ms, FAILURE)
p_receive
Problem
Need BFM-like
specification
solution
BFMs:
-- Signals
Procedural
being set
added,
removed
modified
Valid
minimum
of values
and or
signals
-- Protocol
Signals
between
being modified
Sequencer
or extended
and p_receive / p_transmit
Valid
and hidden
protocol
-- Knowledge
No physical
of
signals,
valid signals
but used
andtoprotocols
control transactions
Hidden
complexity
- Cumbersome
to write
this
code over and over again
Increased
readability
compact
Transaction
leveland
models/commands
Basically
allmodifications
the same problems
BFMs
Allows
painless
of signals,resulting
protocol, in
features
12
1 hour
p_main (test-sequencer)
receive(UART, x"2A")
DUT (UART)
RX
TX
receive(x"2A")
13
TLM
transmit(x"C1")
BFM
TLM
p_transmit
receive_uart(x"2A")
receive(UART,
x"2A", WARNING,
1 ms, FAILURE)
p_receive
VVC
for receive()
DUT
(UART)
Clocks
UART
VVC
Test
Seq.
PIF
VVC
Bus interface
Baudrate
Checker
Other
Ports
Ext. I/O
TX/RX
handling
await_completion(UART);
check(PIF, C_ADDR_RX, xC1", "Uart RX");
check(PIF, C_ADDR_RX, xC2", "Uart RX");
await_completion(PIF);
BFMs
report_simulation_summary;
14
DUT
Clock
Generation
(UART)
Clocks
report_simulation_summary;
UART_
VVC
Test
Seq.
Bus interface
Baudrate
Checker
Other
Ports
TX/RX
handling
Ext. I/O
15
PIF_
VVC
BFMs
Clock
Generation
(UART)
Clocks
uart_transmit (UART_VVC,1,TX,
pif_check (PIF_VVC,1,
UART_
VVC
PIF_
VVC
Bus interface
<num_bytes>);
BUFFER, C_TX_BUFFER, <num_bytes>);
Test
Seq.
Baudrate
Checker
Other
Ports
TX/RX
handling
C_ADDR_RX, <num_bytes>)
BUFFER, C_TX_BUFFER, <num_bytes>)
Ext. I/O
16
BFMs
17
18
19
will be on
freeware
Ballpark UVVM
numbers
benefits
110001011010011110100111011011010011110011
20
110001011010011110100111011011010011110011
Thank you