vipinlal
Full Member level 6
I have a design which looks like this:
I have a testbench code too where I instantiate module test.
My question is how do I make the enum_t type available for the testbench. I tried defining it in the testbench file, but there is an error during simulation.
When I dont declare enum_t in the testbench, the error says:
** Error: D:/tb_test.sv(11): 'enum_t' is an unknown type.
Or did you omit the '()' for an instantiation?
Thanks for any inputs.
Code:
typedef enum { a,b,c d, e} enum_t;
module test
(
output enum_t test_op,
input xx,
input clk
);
I have a testbench code too where I instantiate module test.
Code:
module tb_test();
logic clk,xx;
enum_t test_op;
My question is how do I make the enum_t type available for the testbench. I tried defining it in the testbench file, but there is an error during simulation.
When I dont declare enum_t in the testbench, the error says:
** Error: D:/tb_test.sv(11): 'enum_t' is an unknown type.
Or did you omit the '()' for an instantiation?
Thanks for any inputs.