A
alb
Guest
Hi everyone,
I'm trying to implement a testbench with a client/server abstraction
[1], but I have a little problem implementing a serial protocol with bit
stuffing.
In my 'client' side I'd like to write/read to the serial link, but
/someone/ should take care about bit stuffing. Considering that on my
client I may need to do some write/read ops which are interleaved with
other types of activities (say on different interfaces), I presume the
'bit stuffing' mechanism should be entirely handled on the server side.
The way I split the code is the following: a test case file
(testcase.vhd) which instantiate the harness and issue all necessary
commands to cover the intended functions, an harness file (harness.vhd)
which contains the DUT instantiation and the server instantiation (with
signal mapping and so on) with a clock process, a server file
(server.vhd) with the translation between the 'virtual interface' used
in the test case file and the physical interface of the DUT.
In testcase.vhd I have one unique process which performs the necessary ops:
main: process
begin
init(); -- set defaults state to all DUT input signals
serial_set(..., ..., to_srv, fr_srv);
serial_get(..., ..., to_srv, fr_srv);
...
end process;
I presume that only in my server I can perform the necessary operations
*with* 'bit stuffing' and I should take care about 'bit stuffing' when
there's no transaction on the serial interface (serial_set/serial_get).
Am I too off road?
What about having a testcase where the bit stuffing is either wrong or
absent? Should I use a separate server for that?
Thanks for any suggestion/comment,
Al
[1] see 'Writing Testbenches: functional verification of HDL Models' -
2nd Edition, Janick Bergeron
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
I'm trying to implement a testbench with a client/server abstraction
[1], but I have a little problem implementing a serial protocol with bit
stuffing.
In my 'client' side I'd like to write/read to the serial link, but
/someone/ should take care about bit stuffing. Considering that on my
client I may need to do some write/read ops which are interleaved with
other types of activities (say on different interfaces), I presume the
'bit stuffing' mechanism should be entirely handled on the server side.
The way I split the code is the following: a test case file
(testcase.vhd) which instantiate the harness and issue all necessary
commands to cover the intended functions, an harness file (harness.vhd)
which contains the DUT instantiation and the server instantiation (with
signal mapping and so on) with a clock process, a server file
(server.vhd) with the translation between the 'virtual interface' used
in the test case file and the physical interface of the DUT.
In testcase.vhd I have one unique process which performs the necessary ops:
main: process
begin
init(); -- set defaults state to all DUT input signals
serial_set(..., ..., to_srv, fr_srv);
serial_get(..., ..., to_srv, fr_srv);
...
end process;
I presume that only in my server I can perform the necessary operations
*with* 'bit stuffing' and I should take care about 'bit stuffing' when
there's no transaction on the serial interface (serial_set/serial_get).
Am I too off road?
What about having a testcase where the bit stuffing is either wrong or
absent? Should I use a separate server for that?
Thanks for any suggestion/comment,
Al
[1] see 'Writing Testbenches: functional verification of HDL Models' -
2nd Edition, Janick Bergeron
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?