data/full_repos/permissive/455657973/load_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:34: Unsupported: Ignoring delay on this delayed statement.\n#10 clk <= ~clk;\n^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:39: Unsupported: Ignoring delay on this delayed statement.\nDefault   : #40 Present_state = T0;\n            ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:40: Unsupported: Ignoring delay on this delayed statement.\nT0     : #40 Present_state = T1;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:41: Unsupported: Ignoring delay on this delayed statement.\nT1     : #40 Present_state = T2;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:42: Unsupported: Ignoring delay on this delayed statement.\nT2     : #20 Present_state = T3;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:43: Unsupported: Ignoring delay on this delayed statement.\nT3     : #40 Present_state = T4;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:44: Unsupported: Ignoring delay on this delayed statement.\nT4     : #40 Present_state = T5;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:45: Unsupported: Ignoring delay on this delayed statement.\nT5     : #40 Present_state = T6;\n         ^\n%Warning-STMTDLY: data/full_repos/permissive/455657973/load_tb.v:51: Unsupported: Ignoring delay on this delayed statement.\n#10;\n^\n%Error: data/full_repos/permissive/455657973/load_tb.v:56: Can\'t find definition of variable: \'InPort_enable\'\n                                                         : ... Suggested alternative: \'OutPort_enable\'\nInPort_enable<=0; OutPort_enable<=0;\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:65: Can\'t find definition of variable: \'Rout\'\n                                                         : ... Suggested alternative: \'Cout\'\nRout<=0;R_enable<=0;MDR_read<=0;\n^~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:65: Can\'t find definition of variable: \'R_enable\'\n                                                         : ... Suggested alternative: \'IR_enable\'\nRout<=0;R_enable<=0;MDR_read<=0;\n        ^~~~~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:69: Can\'t find definition of variable: \'PCOut\'\n                                                         : ... Suggested alternative: \'PCout\'\nPCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;  \n^~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:69: Can\'t find definition of variable: \'MARin\'\nPCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;  \n           ^~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:69: Can\'t find definition of variable: \'INSERT\'\nPCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;  \n                                ^~~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:69: Can\'t find definition of variable: \'mdatain\'\n                                                         : ... Suggested alternative: \'Mdatain\'\nPCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;  \n                      ^~~~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:74: Can\'t find definition of variable: \'PCin\'\n                                                         : ... Suggested alternative: \'Cin\'\nLOout =1; PCin = 1; Read = 1; MDRin = 1;  \n          ^~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:74: Can\'t find definition of variable: \'Read\'\nLOout =1; PCin = 1; Read = 1; MDRin = 1;  \n                    ^~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:74: Can\'t find definition of variable: \'MDRin\'\n                                                         : ... Suggested alternative: \'MARin\'\nLOout =1; PCin = 1; Read = 1; MDRin = 1;  \n                              ^~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:79: Can\'t find definition of variable: \'IRin\'\n MDRout = 1; IRin = 1;  \n             ^~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:83: Can\'t find definition of variable: \'Yin\'\n                                                         : ... Suggested alternative: \'Cin\'\nGrb = 1; BAout = 1; Yin = 1;  \n                    ^~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:91: Can\'t find definition of variable: \'LOOut\'\n                                                         : ... Suggested alternative: \'LOout\'\n    LOOut = 1; Gra = 1; Rin = 1;\n    ^~~~~\n%Error: data/full_repos/permissive/455657973/load_tb.v:91: Can\'t find definition of variable: \'Rin\'\n                                                         : ... Suggested alternative: \'Cin\'\n    LOOut = 1; Gra = 1; Rin = 1;\n                        ^~~\n%Error: Exiting due to 14 error(s), 9 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module branch;
reg clk, clr;
reg IncPC, CON_enable;
reg [31:0] Mdatain;
reg [4:0] opCode;
reg RAM_write, MDR_enable, MDRout, MAR_enable, IR_enable, MDR_read;
reg Gra, Grb, Grc;
reg HI_enable, LO_enable, ZHighIn, ZLowIn, Y_enable, PC_enable, OutPort_enable;
reg InPortout, PCout, Yout, ZLowout, ZHighout, LOout, HIout, BAout, Cout;
wire [31:0] OutPort_output;
reg [31:0] InPort_input;
reg R_in, R_out, Cin, branch_flag;

parameter Default = 4'b0000, Reg_load1a = 4'b0001, Reg_load1b = 4'b0010, Reg_load2a = 4'b0011, Reg_load2b = 4'b0100, Reg_load3a = 4'b0101, Reg_load3b = 4'b0110, T0 = 4'b0111, T1 = 4'b1000, T2 = 4'b1001, T3 = 4'b1010, T4 = 4'b1011, T5 = 4'b1100, T6 = 4'b1101;
reg [3:0] Present_state = Default;

datapath DUT(
        OutPort_output, clk, clr, IncPC, CONin, Mdatain,
        opCode, RAM_write, MDR_enable, MDR_enable, MAR_enable,  IR_enable, MDR_read,
        Gra, Grb, Grc, HI_enable, LO_enable, ZHighIn, ZLowIn, Y_enable, PC_enable, OutPort_enable,
        InPortout, PCout, Yout, ZLowout, ZHighout, LOout, HIout, BAout, Cout, InPort_input,
        R_in, R_out, Cin, branch_flag
);

initial
        begin
clk = 0;
clr = 0;
end

        always
#10 clk <= ~clk;

always @(posedge clk)
begin
case (Present_state)
Default			:	#40 Present_state = T0;
T0					:	#40 Present_state = T1;
T1					:	#40 Present_state = T2;
T2					:	#20 Present_state = T3;
T3					:	#40 Present_state = T4;
T4					:	#40 Present_state = T5;
T5					:	#40 Present_state = T6;
endcase
        end

always @(Present_state)
begin
#10;
case (Present_state)
Default: begin
PCout <= 0; ZLowout <= 0; MDRout <= 0;
MAR_enable <= 0; ZHighIn <= 0; ZLowIn <= 0; CON_enable<=0;
InPort_enable<=0; OutPort_enable<=0;
InPort_input<=32'd0;
PC_enable <=0; MDR_enable <= 0; IR_enable <= 0;
Y_enable <= 0;
IncPC <= 0; RAM_write<=0;
Mdatain <= 32'h00000000; Gra<=0; Grb<=0; Grc<=0;
BAout<=0; Cout<=0;
InPortout<=0; ZHighout<=0; LOout<=0; HIout<=0;
HI_enable<=0; LO_enable<=0;
Rout<=0;R_enable<=0;MDR_read<=0;
end

T0: begin
PCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;

end

T1:begin
LOout =1; PCin = 1; Read = 1; MDRin = 1;

end

T2:begin
 MDRout = 1; IRin = 1;
end

T3:begin
Grb = 1; BAout = 1; Yin = 1;
end

T4: begin
Cout = 1; Mdatain = 4'b0001; ZLowIn = 1;
end

T5:begin
    LOOut = 1; Gra = 1; Rin = 1;
end


endcase
end
endmodule
module branch;

reg clk, clr;
reg IncPC, CON_enable;
reg [31:0] Mdatain;
reg [4:0] opCode;
reg RAM_write, MDR_enable, MDRout, MAR_enable, IR_enable, MDR_read;
reg Gra, Grb, Grc;
reg HI_enable, LO_enable, ZHighIn, ZLowIn, Y_enable, PC_enable, OutPort_enable;
reg InPortout, PCout, Yout, ZLowout, ZHighout, LOout, HIout, BAout, Cout;
wire [31:0] OutPort_output;
reg [31:0] InPort_input;
reg R_in, R_out, Cin, branch_flag;

parameter Default = 4'b0000, Reg_load1a = 4'b0001, Reg_load1b = 4'b0010, Reg_load2a = 4'b0011, Reg_load2b = 4'b0100, Reg_load3a = 4'b0101, Reg_load3b = 4'b0110, T0 = 4'b0111, T1 = 4'b1000, T2 = 4'b1001, T3 = 4'b1010, T4 = 4'b1011, T5 = 4'b1100, T6 = 4'b1101;
reg [3:0] Present_state = Default;

datapath DUT(
        OutPort_output, clk, clr, IncPC, CONin, Mdatain,
        opCode, RAM_write, MDR_enable, MDR_enable, MAR_enable,  IR_enable, MDR_read,
        Gra, Grb, Grc, HI_enable, LO_enable, ZHighIn, ZLowIn, Y_enable, PC_enable, OutPort_enable,
        InPortout, PCout, Yout, ZLowout, ZHighout, LOout, HIout, BAout, Cout, InPort_input,
        R_in, R_out, Cin, branch_flag
);

initial
        begin
clk = 0;
clr = 0;
end

        always
#10 clk <= ~clk;

always @(posedge clk)
begin
case (Present_state)
Default			:	#40 Present_state = T0;
T0					:	#40 Present_state = T1;
T1					:	#40 Present_state = T2;
T2					:	#20 Present_state = T3;
T3					:	#40 Present_state = T4;
T4					:	#40 Present_state = T5;
T5					:	#40 Present_state = T6;
endcase
        end

always @(Present_state)
begin
#10;
case (Present_state)
Default: begin
PCout <= 0; ZLowout <= 0; MDRout <= 0;
MAR_enable <= 0; ZHighIn <= 0; ZLowIn <= 0; CON_enable<=0;
InPort_enable<=0; OutPort_enable<=0;
InPort_input<=32'd0;
PC_enable <=0; MDR_enable <= 0; IR_enable <= 0;
Y_enable <= 0;
IncPC <= 0; RAM_write<=0;
Mdatain <= 32'h00000000; Gra<=0; Grb<=0; Grc<=0;
BAout<=0; Cout<=0;
InPortout<=0; ZHighout<=0; LOout<=0; HIout<=0;
HI_enable<=0; LO_enable<=0;
Rout<=0;R_enable<=0;MDR_read<=0;
end

T0: begin
PCOut = 1; MARin = 1; mdatain = INSERT; ZLowIn = 1;

end

T1:begin
LOout =1; PCin = 1; Read = 1; MDRin = 1;

end

T2:begin
 MDRout = 1; IRin = 1;
end

T3:begin
Grb = 1; BAout = 1; Yin = 1;
end

T4: begin
Cout = 1; Mdatain = 4'b0001; ZLowIn = 1;
end

T5:begin
    LOOut = 1; Gra = 1; Rin = 1;
end


endcase
end
endmodule