I am writing a test bench for a module that takes an array of inputs that represents a number using the following code:
module ComparatorTest;
wire [3:0] a;
wire [3:0] b;
output aHigher, bHigher, equal;
Comparator c (a, b, aHigher, bHigher, equal);
initial begin
$dumpfile("test.vcd");
$dumpvars(0, ComparatorTest);
# 0 a[3:0]=1111, b[3:0]=0000;
# 20 a[3:0]=1111, b[3:0]=1111;
# 40 a[3:0]=0000, b[3:0]=1111;
# 60 $stop;
end
endmodule
I want to be able to set the arrays a and b either in base 10 or in binary like I would a number. How do I go about doing this? The code that I have gives me a syntax error (ComparatorTest.v:12: Syntax in assignment statement l-value.)