data/full_repos/permissive/122271920/hdl/Nu6509.v
1: b'%Warning-WIDTH: data/full_repos/permissive/122271920/hdl/Nu6509.v:76: Operator COND expects 32 bits on the Conditional True, but Conditional True\'s VARREF \'_so\' generates 1 bits.\n                                                                    : ... In instance Nu6509\nassign mx =                               ((ctr == 7) & !flag_816 ? _so : \'bz);\n                                                                  ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/122271920/hdl/Nu6509.v:76: Operator ASSIGNW expects 1 bits on the Assign RHS, but Assign RHS\'s COND generates 32 bits.\n                                                                    : ... In instance Nu6509\nassign mx =                               ((ctr == 7) & !flag_816 ? _so : \'bz);\n          ^\n%Warning-WIDTH: data/full_repos/permissive/122271920/hdl/Nu6509.v:77: Operator COND expects 32 bits on the Conditional True, but Conditional True\'s VARREF \'_so\' generates 1 bits.\n                                                                    : ... In instance Nu6509\nassign _abort =                           ((ctr == 7) & flag_816 ? _so : \'bz);\n                                                                 ^\n%Warning-WIDTH: data/full_repos/permissive/122271920/hdl/Nu6509.v:77: Operator ASSIGNW expects 1 bits on the Assign RHS, but Assign RHS\'s COND generates 32 bits.\n                                                                    : ... In instance Nu6509\nassign _abort =                           ((ctr == 7) & flag_816 ? _so : \'bz);\n              ^\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:84: Cannot find file containing module: \'register\'\nregister #(.WIDTH(8), .RESET(4\'b1111))    reg_0000(phi2_6509, !_reset, we_bank & !address_6502[0], data_6502, data_0000);\n^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/122271920/hdl,data/full_repos/permissive/122271920/register\n             data/full_repos/permissive/122271920/hdl,data/full_repos/permissive/122271920/register.v\n             data/full_repos/permissive/122271920/hdl,data/full_repos/permissive/122271920/register.sv\n             register\n             register.v\n             register.sv\n             obj_dir/register\n             obj_dir/register.v\n             obj_dir/register.sv\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:86: Cannot find file containing module: \'register\'\nregister #(.WIDTH(8), .RESET(4\'b1111))    reg_0001(phi2_6509, !_reset, we_bank & address_6502[0], data_6502, data_0001);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:88: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_opcode(phi2_6509, !_reset, _rdy, sync & data_6502[7] & !data_6502[6] & (data_6502[4:0] == 5\'b10001), flag_opcode);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:89: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_clock1(phi2_6509, !_reset, _rdy, address_6502[0], data_cycle1);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:91: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_clock2(phi2_6509, !_reset, _rdy, flag_opcode & (data_cycle1 ^ address_6502[0]), data_cycle2);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:93: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_clock3(phi2_6509, !_reset, _rdy, data_cycle2, data_cycle3);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:95: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_clock4(phi2_6509, !_reset, _rdy, data_cycle3, data_cycle4);\n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:97: Cannot find file containing module: \'register\'\nregister #(.WIDTH(1))                     reg_clock5(phi2_6509, !_reset, _rdy, data_cycle4, data_cycle5); \n^~~~~~~~\n%Error: data/full_repos/permissive/122271920/hdl/Nu6509.v:100: Cannot find file containing module: \'register\'\nregister #(.WIDTH(8))                     reg_bank(!phi2_6509, !_reset, 1, data_6502, data_baddr);\n^~~~~~~~\n%Error: Exiting due to 9 error(s), 4 warning(s)\n'
module fsm_flag(
                input clock, 
                input reset, 
                input [7:0]data, 
                output reg flag
               );

reg [1:0]state;

always @(negedge clock, posedge reset)
begin
  if(reset)
		state <= 0;
  else 
		case(state)
         0:
				if(data == 8'h55)
					state <= 1;
			1:
				if(data == 8'haa)
					state <= 2;
				else
					state <= 0;
         2:
				if(data == 8'h00)
					state <= 3;
				else
					state <= 0;
			3:
            begin
               flag <= data[0];
               state <= 0;
            end
			default:
               state <= 0;
		endcase
end
endmodule
module fsm_flag(
                input clock, 
                input reset, 
                input [7:0]data, 
                output reg flag
               );


reg [1:0]state;

always @(negedge clock, posedge reset)
begin
  if(reset)
		state <= 0;
  else 
		case(state)
         0:
				if(data == 8'h55)
					state <= 1;
			1:
				if(data == 8'haa)
					state <= 2;
				else
					state <= 0;
         2:
				if(data == 8'h00)
					state <= 3;
				else
					state <= 0;
			3:
            begin
               flag <= data[0];
               state <= 0;
            end
			default:
               state <= 0;
		endcase
end
endmodule