data/full_repos/permissive/43339463/sys_command.v
1: b'%Error: data/full_repos/permissive/43339463/sys_command.v:4: Define or directive not defined: \'`CMD_TYPE_DFIN\'\n   `CMD_TYPE_DFIN : begin\n   ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:4: syntax error, unexpected \':\', expecting endcase\n   `CMD_TYPE_DFIN : begin\n                  ^\n%Error: data/full_repos/permissive/43339463/sys_command.v:7: Define or directive not defined: \'`CMD_TYPE_DDIS1\'\n   `CMD_TYPE_DDIS1, `CMD_TYPE_DDIS2 : begin\n   ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:7: Define or directive not defined: \'`CMD_TYPE_DDIS2\'\n   `CMD_TYPE_DDIS1, `CMD_TYPE_DDIS2 : begin\n                    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:9: Define or directive not defined: \'`CMDARG_DIS_C\'\n     `CMDARG_DIS_C : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:15: Define or directive not defined: \'`CMDARG_DIS_B\'\n     `CMDARG_DIS_B : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:21: Define or directive not defined: \'`CMDARG_DIS_O\'\n     `CMDARG_DIS_O : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:27: Define or directive not defined: \'`CMDARG_DIS_D\'\n     `CMDARG_DIS_D : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:33: Define or directive not defined: \'`CMDARG_DIS_H\'\n     `CMDARG_DIS_H : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:39: Define or directive not defined: \'`CMDARG_DIS_U\'\n     `CMDARG_DIS_U : begin\n     ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:47: Define or directive not defined: \'`CMD_TYPE_DMPR\'\n   `CMD_TYPE_DMPR : begin\n   ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:50: Define or directive not defined: \'`ALUF_ZF\'\n    $display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);\n                                             ^~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:50: Define or directive not defined: \'`ALUF_SF\'\n    $display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);\n                                                             ^~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:50: Define or directive not defined: \'`ALUF_CF\'\n    $display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);\n                                                                             ^~~~~~~~\n%Error: data/full_repos/permissive/43339463/sys_command.v:50: Define or directive not defined: \'`ALUF_OF\'\n    $display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);\n                                                                                             ^~~~~~~~\n%Error: Cannot continue\n'
module sys_command(input [47:0] cmd, input cl_size, input [15:0] o, r0, r1, r2, r3, r4, r5, r6, r7, flag, input en);
	always @(posedge en) begin
		case (cmd[39:36])
			`CMD_TYPE_DFIN : begin
				$finish();
			end
			`CMD_TYPE_DDIS1, `CMD_TYPE_DDIS2 : begin
				case (cmd[35:32])
					`CMDARG_DIS_C : begin
						if (cl_size)
							$write("%C", o);
						else
							$write("%C", o[7:0]);
					end
					`CMDARG_DIS_B : begin
						if (cl_size)
							$write("%b", o);
						else
							$write("%b", o[7:0]);
					end
					`CMDARG_DIS_O : begin
						if (cl_size)
							$write("%o", o);
						else
							$write("%o", o[7:0]);
					end
					`CMDARG_DIS_D : begin
						if (cl_size)
							$write("%h", $signed(o));
						else
							$write("%h", $signed(o[7:0]));
					end
					`CMDARG_DIS_H : begin
						if (cl_size)
							$write("%h", o);
						else
							$write("%h", o[7:0]);
					end
					`CMDARG_DIS_U : begin
						if (cl_size)
							$write("%d", o);
						else
							$write("%d", o[7:0]);
					end
				endcase
			end
			`CMD_TYPE_DMPR : begin
				$display("[Register]");
				$display("R0:%h R1:%h R2:%h R3:%h R4:%h R5:%h R6:%h R7:%h", r0, r1, r2, r3, r4, r5, r6, r7);
				$display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);
			end
		endcase
	end
endmodule
module sys_command(input [47:0] cmd, input cl_size, input [15:0] o, r0, r1, r2, r3, r4, r5, r6, r7, flag, input en);

	always @(posedge en) begin
		case (cmd[39:36])
			`CMD_TYPE_DFIN : begin
				$finish();
			end
			`CMD_TYPE_DDIS1, `CMD_TYPE_DDIS2 : begin
				case (cmd[35:32])
					`CMDARG_DIS_C : begin
						if (cl_size)
							$write("%C", o);
						else
							$write("%C", o[7:0]);
					end
					`CMDARG_DIS_B : begin
						if (cl_size)
							$write("%b", o);
						else
							$write("%b", o[7:0]);
					end
					`CMDARG_DIS_O : begin
						if (cl_size)
							$write("%o", o);
						else
							$write("%o", o[7:0]);
					end
					`CMDARG_DIS_D : begin
						if (cl_size)
							$write("%h", $signed(o));
						else
							$write("%h", $signed(o[7:0]));
					end
					`CMDARG_DIS_H : begin
						if (cl_size)
							$write("%h", o);
						else
							$write("%h", o[7:0]);
					end
					`CMDARG_DIS_U : begin
						if (cl_size)
							$write("%d", o);
						else
							$write("%d", o[7:0]);
					end
				endcase
			end
			`CMD_TYPE_DMPR : begin
				$display("[Register]");
				$display("R0:%h R1:%h R2:%h R3:%h R4:%h R5:%h R6:%h R7:%h", r0, r1, r2, r3, r4, r5, r6, r7);
				$display("ZF:%b SF:%b CF:%b OF:%b", flag[`ALUF_ZF], flag[`ALUF_SF], flag[`ALUF_CF], flag[`ALUF_OF]);
			end
		endcase
	end
endmodule