In reply to dave_59:
Thank you for your answer.
Periodically (predefined period of time), the dut acquires the external adc, gets adc_data, re-formats it into a CAN_frame and sends it through Tx output.
What I have to check:
-adc_data = data sent on the can_frame
-periodicity of the emission
For the adc:
If I choose to put timings checks and serialization into an adc_interface,
how can I connect the transactions to that interface ?
here what I did:
I created the following classes:
--adc_transaction : random 12 bits data inside (data coming from the adc)
in the adc_driver class, I do the following :
in task run(): wait for a negedge(adc_interface.cs_n) then I launch task drive(); (cs_n negedge triggers the dut request for a new acquisition)
In task drive(): push the extracted data from the current transaction into (adc_interface.data_in)
what do you think ? is what I did ok ?
Do you have any suggestions?
Thank you so much for your help.