dbaram
January 11, 2018, 10:11am
1
Hello,
in the following code why “my_interface.svh” and “my_data.svh” are included outside the package my_uvc_pkg?
//my_uvc_pkg.sv
`include "my_interface.svh"
//Include the sequence_items (transactions)
`include "my_data.svh"
package my_uvc_pkg;
//Include the agent config object
`include "my_config.svh"
//Include the API sequences
`include "my_sequence.svh"
//Include the components
`include "my_driver.svh"
`include "my_monitor.svh"
`include "my_coverage.svh"
`include "my_agent.svh"
endpackage
thanks in advance,
chr_sue
January 11, 2018, 11:16am
2
In reply to dbaram :
The SV interface is a so-called static construct. It has to be available at Elaboration time. If it is compiled it can be used anywhere.
If data_sv.svh contains your seq_item then it is the question why didn’t you pass this into your package.
dbaram
January 11, 2018, 1:07pm
3
In reply to chr_sue :
in fact, it was an example in the verification academy you can see it below:
https://verificationacademy.com/cookbook/uvc/uvmverificationcomponent
In reply to dbaram :
You can definitely include the file my_data.svh into the package. But you have to hold the file my_interface.svh with the SV interface seperately.