I have been trying to get this to work for quite sometime and I dont
know why I cant simulate. It says error with port 'Aout'. Below is each
of my modules that I have created. Please let me know. Thank you very
much
1
// ALU TestBench
2
`timescale1ns/1ps
3
moduleALU_tb();
4
reg[3:0]A,B,OPCODE;
5
wire[3:0]ALU_out;
6
wireCout,OF;
7
regCin;
8
ALUA1(A,B,Cin,OPCODE,ALU_out,Cout,OF);
9
initialbegin
10
//OPCODE 0000 and 0001, A=0101, B=0010;
11
A=4'b0101;B=4'b0010;Cin='b0;OPCODE=4'b0000;#5;
12
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
13
14
OPCODE=4'b0001;#5;
15
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
16
17
//OPCODE 0000, 0001, and 0010, A=0011, B=0001;
18
A=4'b0011;B=4'b0001;Cin='b0;OPCODE=4'b0000;#5;
19
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
20
21
OPCODE=4'b0001;#5;
22
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
23
24
OPCODE=4'b0010;#5;
25
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
26
27
//OPCODE 0000 and 0001, A=0100, B=0011;
28
A=4'b0100;B=4'b0011;Cin='b0;OPCODE=4'b0000;#5;
29
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
30
31
OPCODE=4'b0001;#5;
32
$display("OPCODE = %b, A = %b, B = %b, ALU_out = %b, Cout = %b, OF = %b",OPCODE,A,B,ALU_out,Cout,OF);
Michael wrote:> It says error with port 'Aout'.
What error?
I don't see any definition of Aout...
BTW: why don't you read and follow that few lines of "manual" above each
edit box here?