M
mrfirmware
Guest
I'd like to have a file with an interface in it and then "import" it
into my top level testbench.sv file. Something like this:
// File: my_if.sv
interface my_if;
....
endinterface : my_if
---
// File testbench.sv
import my_if::*;
module testbench;
my_if if0;
....
endmodule : testbench
There's something very basic I'm missing here, I realize that. I just
don't understand how to "link" things like programs, interfaces, and
classes into a top level module. All I see are nasty `includes which
just inlines the text of the included files into the file. There must
be a better way?
Thank,
- Mark
into my top level testbench.sv file. Something like this:
// File: my_if.sv
interface my_if;
....
endinterface : my_if
---
// File testbench.sv
import my_if::*;
module testbench;
my_if if0;
....
endmodule : testbench
There's something very basic I'm missing here, I realize that. I just
don't understand how to "link" things like programs, interfaces, and
classes into a top level module. All I see are nasty `includes which
just inlines the text of the included files into the file. There must
be a better way?
Thank,
- Mark