S
Sand Glass
Guest
test.v
module test(
a,b
);
parameter AA = 1;
input a;
output b;
assign b = AA==1'b1 ? a : 0;
endmodule
tb.v
module tb();
parameter PAR_A = 0;
//int width;
//scanf(width);
//if(width == 10)PAR_A=0;
//else if(width == 20)PAR_A=1;
test #(.AA(PAR_A)) (
.a(1'b1),
.b()
);
endmodule
I want to sometimes PAR_A = 1, sometimes PAR_A=0, sometimes PAR_A = other value.
How can I do it ?
The environment support systemveilog, but tb.v cannot be changed to tb.sv.
module test(
a,b
);
parameter AA = 1;
input a;
output b;
assign b = AA==1'b1 ? a : 0;
endmodule
tb.v
module tb();
parameter PAR_A = 0;
//int width;
//scanf(width);
//if(width == 10)PAR_A=0;
//else if(width == 20)PAR_A=1;
test #(.AA(PAR_A)) (
.a(1'b1),
.b()
);
endmodule
I want to sometimes PAR_A = 1, sometimes PAR_A=0, sometimes PAR_A = other value.
How can I do it ?
The environment support systemveilog, but tb.v cannot be changed to tb.sv.