A
Andrew FPGA
Guest
Hi Newsgroup,
I am implementing a transaction based testbench and I'm trying to find
an effective way of encapsulating the client calls into my test
harness.
I have a "Test Harness" that is a single VHDL file and contains Bus
Functional Models(BFMs) for all the DUT interfaces. This test harness
also instantiates the DUT and generates the clk/reset for the DUT.
These BFM's can be thought of as servers - they provide a high level
transaction based interface.
Following Janick Bergeron's advice(Writing Testbenches - Functional
Verification of HDL Models, Kluwer Academic Publishers) I have created
a Test Harness Package in a separate file. This contains the BFM
transaction interface definition. Each BFM has a signal record(global)
for sending transactions to the BFM and another signal record(global)
for receiving transactions back from the BFM.
I then have a "Test Case" module(its another file) that acts as a
client to the Server BFM's. The client-server protocol is based around
transactions(no shit). The server BFM implements the server end of the
protocol obviously. Now, where does the client end of the protocol get
implemented? Bergeron suggests encapsulating the client end of the
protocol using procedures located in the test harness package(pg 243).
The problem is that the client server protocol is transaction based -
the server waits on a transaction( wait on ToServer'transaction) and
the client waits on an acknowledge/complete transaction from the
server. To quote the LRM "Attributes of an actual are never passed into
a subprogram". So I can't use the wait on FromServer'transaction
contruct inside my client procedure. Is there an elegent solution to
this? Why is Bergeron suggesting something that is not possible (or is
my understanding wrong somewhere)?
One solution is to use events rather than transactions. i.e. toggle a
signal rather than simply assign to it. But I find the wait on
blah'transaction much more elegant.
Regards
Andrew
I am implementing a transaction based testbench and I'm trying to find
an effective way of encapsulating the client calls into my test
harness.
I have a "Test Harness" that is a single VHDL file and contains Bus
Functional Models(BFMs) for all the DUT interfaces. This test harness
also instantiates the DUT and generates the clk/reset for the DUT.
These BFM's can be thought of as servers - they provide a high level
transaction based interface.
Following Janick Bergeron's advice(Writing Testbenches - Functional
Verification of HDL Models, Kluwer Academic Publishers) I have created
a Test Harness Package in a separate file. This contains the BFM
transaction interface definition. Each BFM has a signal record(global)
for sending transactions to the BFM and another signal record(global)
for receiving transactions back from the BFM.
I then have a "Test Case" module(its another file) that acts as a
client to the Server BFM's. The client-server protocol is based around
transactions(no shit). The server BFM implements the server end of the
protocol obviously. Now, where does the client end of the protocol get
implemented? Bergeron suggests encapsulating the client end of the
protocol using procedures located in the test harness package(pg 243).
The problem is that the client server protocol is transaction based -
the server waits on a transaction( wait on ToServer'transaction) and
the client waits on an acknowledge/complete transaction from the
server. To quote the LRM "Attributes of an actual are never passed into
a subprogram". So I can't use the wait on FromServer'transaction
contruct inside my client procedure. Is there an elegent solution to
this? Why is Bergeron suggesting something that is not possible (or is
my understanding wrong somewhere)?
One solution is to use events rather than transactions. i.e. toggle a
signal rather than simply assign to it. But I find the wait on
blah'transaction much more elegant.
Regards
Andrew