data/full_repos/permissive/166661632/p5/p5/AT.v
1: b'%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:2: Cannot find include file: head.v\n`include "head.v" \n         ^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/166661632/p5/p5,data/full_repos/permissive/166661632/head.v\n             data/full_repos/permissive/166661632/p5/p5,data/full_repos/permissive/166661632/head.v.v\n             data/full_repos/permissive/166661632/p5/p5,data/full_repos/permissive/166661632/head.v.sv\n             head.v\n             head.v.v\n             head.v.sv\n             obj_dir/head.v\n             obj_dir/head.v.v\n             obj_dir/head.v.sv\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`special\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: syntax error, unexpected &&, expecting TYPE-IDENTIFIER\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                 ^~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`addu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`subu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`ori\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                                                                 ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`lw\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                                                                           ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:19: Define or directive not defined: \'`sw\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)\n                                                                                    ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:21: Define or directive not defined: \'`special\'\n  else if(op==`special&&funct==`jr_funct || op==`beq)\n              ^~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:21: Define or directive not defined: \'`jr_funct\'\n  else if(op==`special&&funct==`jr_funct || op==`beq)\n                               ^~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:21: Define or directive not defined: \'`beq\'\n  else if(op==`special&&funct==`jr_funct || op==`beq)\n                                                ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:26: Define or directive not defined: \'`special\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct))\n         ^~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:26: syntax error, unexpected &&, expecting TYPE-IDENTIFIER\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct))\n                 ^~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:26: Define or directive not defined: \'`addu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct))\n                           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:26: Define or directive not defined: \'`subu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct))\n                                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:28: Define or directive not defined: \'`beq\'\n  else if(op==`beq)\n              ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:30: Define or directive not defined: \'`sw\'\n  else if(op==`sw)\n              ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:35: Define or directive not defined: \'`special\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)\n         ^~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:35: syntax error, unexpected &&, expecting TYPE-IDENTIFIER\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)\n                 ^~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:35: Define or directive not defined: \'`addu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)\n                           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:35: Define or directive not defined: \'`subu_funct\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)\n                                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:35: Define or directive not defined: \'`ori\'\n  if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)\n                                                                 ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:36: Define or directive not defined: \'`alu\'\n   res_d<=`alu;\n          ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:37: Define or directive not defined: \'`jal\'\n  else if(op==`jal)\n              ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:38: Define or directive not defined: \'`pc\'\n   res_d<=`pc;\n          ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:39: Define or directive not defined: \'`lw\'\n  else if(op==`lw)\n              ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:40: Define or directive not defined: \'`dm\'\n   res_d<=`dm;\n          ^~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:41: Define or directive not defined: \'`lui\'\n  else if(op==`lui)\n              ^~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:42: Define or directive not defined: \'`other\'\n   res_d<=`other;\n          ^~~~~~\n%Error: data/full_repos/permissive/166661632/p5/p5/AT.v:44: Define or directive not defined: \'`nw\'\n   res_d<=`nw;\n          ^~~\n%Error: Exiting due to 30 error(s)\n'
module AT(instr_d,tuse_rs,tuse_rt,res_d);
input [31:0] instr_d;
output reg[1:0] tuse_rs,tuse_rt;
output reg [2:0] res_d;

initial begin
tuse_rs=0; tuse_rt=0; res_d=0;
end

wire [5:0] op,funct;
assign op=instr_d[31:26];
assign funct=instr_d[5:0];


always@(*)
	begin
		if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)
			tuse_rs<=1;
		else if(op==`special&&funct==`jr_funct || op==`beq)
			tuse_rs<=0;
		else
		   tuse_rs<=3;

		if(op==`special&&(funct==`addu_funct||funct==`subu_funct))
			tuse_rt<=1;
		else if(op==`beq)
			tuse_rt<=0;
		else if(op==`sw)
			tuse_rt<=2;
		else
			tuse_rt<=3;

		if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)
			res_d<=`alu;
		else if(op==`jal)
			res_d<=`pc;
		else if(op==`lw)
			res_d<=`dm;
		else if(op==`lui)
			res_d<=`other;
		else
			res_d<=`nw;
	end




endmodule
module AT(instr_d,tuse_rs,tuse_rt,res_d);

input [31:0] instr_d;
output reg[1:0] tuse_rs,tuse_rt;
output reg [2:0] res_d;

initial begin
tuse_rs=0; tuse_rt=0; res_d=0;
end

wire [5:0] op,funct;
assign op=instr_d[31:26];
assign funct=instr_d[5:0];


always@(*)
	begin
		if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori||op==`lw||op==`sw)
			tuse_rs<=1;
		else if(op==`special&&funct==`jr_funct || op==`beq)
			tuse_rs<=0;
		else
		   tuse_rs<=3;

		if(op==`special&&(funct==`addu_funct||funct==`subu_funct))
			tuse_rt<=1;
		else if(op==`beq)
			tuse_rt<=0;
		else if(op==`sw)
			tuse_rt<=2;
		else
			tuse_rt<=3;

		if(op==`special&&(funct==`addu_funct||funct==`subu_funct)||op==`ori)
			res_d<=`alu;
		else if(op==`jal)
			res_d<=`pc;
		else if(op==`lw)
			res_d<=`dm;
		else if(op==`lui)
			res_d<=`other;
		else
			res_d<=`nw;
	end




endmodule