data/full_repos/permissive/439087417/cordi_arch.v
1: b"%Error: data/full_repos/permissive/439087417/cordi_arch.v:34: Cannot find file containing module: 'mux_sel1'\nmux_sel1 #(.dw(16)) MUX_X (.IN_1(16'h26dd), .IN_0(Xi_add), .sel(init), .OUT(Xi_reg));\n^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/439087417,data/full_repos/permissive/439087417/mux_sel1\n             data/full_repos/permissive/439087417,data/full_repos/permissive/439087417/mux_sel1.v\n             data/full_repos/permissive/439087417,data/full_repos/permissive/439087417/mux_sel1.sv\n             mux_sel1\n             mux_sel1.v\n             mux_sel1.sv\n             obj_dir/mux_sel1\n             obj_dir/mux_sel1.v\n             obj_dir/mux_sel1.sv\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:35: Cannot find file containing module: 'mux_sel1'\nmux_sel1 #(.dw(16)) MUX_Y (.IN_1(0), .IN_0(Yi_add), .sel(init), .OUT(Yi_reg));\n^~~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:36: Cannot find file containing module: 'mux_sel1'\nmux_sel1 #(.dw(16)) MUX_Z (.IN_1(theta), .IN_0(Zi_add), .sel(init), .OUT(Zi_reg));\n^~~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:38: Cannot find file containing module: 'rgst'\nrgst #(.dw(16)) rgst_X (.d(Xi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Xi));\n^~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:39: Cannot find file containing module: 'rgst'\nrgst #(.dw(16)) rgst_Y (.d(Yi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Yi));\n^~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:40: Cannot find file containing module: 'rgst'\nrgst #(.dw(16)) rgst_Z (.d(Zi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Zi));\n^~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:42: Cannot find file containing module: 'cntr'\ncntr #(.rndw(4)) cntr_ (.clk(clk), .clr(init), .c_up(~init & ld), .q(iter));\n^~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:44: Cannot find file containing module: 'cordicctrl'\ncordicctrl #(.rndw(4)) ctrl_ (.clk(clk), .init(init), .ld(ld), .fin(fin), .bgn(bgn), .itr(iter));\n^~~~~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:46: Cannot find file containing module: 'ROM_Mem'\nROM_Mem #(.aw(4), .dw(16)) rom (.clk(~clk), .rst_b(1'b1), .addr(iter), .data(arctan_const));\n^~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:48: Cannot find file containing module: 'arith_rsh'\narith_rsh #(.dw(16), .shw(4)) arshX (.i(Xi), .p(iter), .o(Xi_sh));\n^~~~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:49: Cannot find file containing module: 'arith_rsh'\narith_rsh #(.dw(16), .shw(4)) arshY (.i(Yi), .p(iter), .o(Yi_sh));\n^~~~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:51: Cannot find file containing module: 'Add_Sub'\nAdd_Sub #(.dw(16)) AddSub_X (.a(Xi), .b(Yi_sh), .c(Xi_add), .add(Zi[15]));\n^~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:52: Cannot find file containing module: 'Add_Sub'\nAdd_Sub #(.dw(16)) AddSub_Y (.a(Yi), .b(Xi_sh), .c(Yi_add), .add(~Zi[15]));\n^~~~~~~\n%Error: data/full_repos/permissive/439087417/cordi_arch.v:53: Cannot find file containing module: 'Add_Sub'\nAdd_Sub #(.dw(16)) AddSub_Z (.a(Zi), .b(arctan_const), .c(Zi_add), .add(Zi[15]));\n^~~~~~~\n%Error: Exiting due to 14 error(s)\n"
module cordi_arch
(
	input [15:0] theta, 
	input bgn,
	input clk,
	output [15:0] cos,
	output fin
);
wire[15:0] Xi, Xi_add, Xi_reg, Xi_sh, Yi, Yi_add, Yi_reg, Yi_sh, Zi, Zi_add, Zi_reg, arctan_const;
wire init, ld;
wire[3:0] iter;


mux_sel1 #(.dw(16)) MUX_X (.IN_1(16'h26dd), .IN_0(Xi_add), .sel(init), .OUT(Xi_reg));
mux_sel1 #(.dw(16)) MUX_Y (.IN_1(0), .IN_0(Yi_add), .sel(init), .OUT(Yi_reg));
mux_sel1 #(.dw(16)) MUX_Z (.IN_1(theta), .IN_0(Zi_add), .sel(init), .OUT(Zi_reg));

rgst #(.dw(16)) rgst_X (.d(Xi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Xi));
rgst #(.dw(16)) rgst_Y (.d(Yi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Yi));
rgst #(.dw(16)) rgst_Z (.d(Zi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Zi));

cntr #(.rndw(4)) cntr_ (.clk(clk), .clr(init), .c_up(~init & ld), .q(iter));

cordicctrl #(.rndw(4)) ctrl_ (.clk(clk), .init(init), .ld(ld), .fin(fin), .bgn(bgn), .itr(iter));

ROM_Mem #(.aw(4), .dw(16)) rom (.clk(~clk), .rst_b(1'b1), .addr(iter), .data(arctan_const));

arith_rsh #(.dw(16), .shw(4)) arshX (.i(Xi), .p(iter), .o(Xi_sh));
arith_rsh #(.dw(16), .shw(4)) arshY (.i(Yi), .p(iter), .o(Yi_sh));

Add_Sub #(.dw(16)) AddSub_X (.a(Xi), .b(Yi_sh), .c(Xi_add), .add(Zi[15]));
Add_Sub #(.dw(16)) AddSub_Y (.a(Yi), .b(Xi_sh), .c(Yi_add), .add(~Zi[15]));
Add_Sub #(.dw(16)) AddSub_Z (.a(Zi), .b(arctan_const), .c(Zi_add), .add(Zi[15]));

assign cos = Xi;
endmodule
module cordi_arch
(
	input [15:0] theta, 
	input bgn,
	input clk,
	output [15:0] cos,
	output fin
);

wire[15:0] Xi, Xi_add, Xi_reg, Xi_sh, Yi, Yi_add, Yi_reg, Yi_sh, Zi, Zi_add, Zi_reg, arctan_const;
wire init, ld;
wire[3:0] iter;


mux_sel1 #(.dw(16)) MUX_X (.IN_1(16'h26dd), .IN_0(Xi_add), .sel(init), .OUT(Xi_reg));
mux_sel1 #(.dw(16)) MUX_Y (.IN_1(0), .IN_0(Yi_add), .sel(init), .OUT(Yi_reg));
mux_sel1 #(.dw(16)) MUX_Z (.IN_1(theta), .IN_0(Zi_add), .sel(init), .OUT(Zi_reg));

rgst #(.dw(16)) rgst_X (.d(Xi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Xi));
rgst #(.dw(16)) rgst_Y (.d(Yi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Yi));
rgst #(.dw(16)) rgst_Z (.d(Zi_reg), .clr(1'b0), .clk(clk), .ld(ld), .q(Zi));

cntr #(.rndw(4)) cntr_ (.clk(clk), .clr(init), .c_up(~init & ld), .q(iter));

cordicctrl #(.rndw(4)) ctrl_ (.clk(clk), .init(init), .ld(ld), .fin(fin), .bgn(bgn), .itr(iter));

ROM_Mem #(.aw(4), .dw(16)) rom (.clk(~clk), .rst_b(1'b1), .addr(iter), .data(arctan_const));

arith_rsh #(.dw(16), .shw(4)) arshX (.i(Xi), .p(iter), .o(Xi_sh));
arith_rsh #(.dw(16), .shw(4)) arshY (.i(Yi), .p(iter), .o(Yi_sh));

Add_Sub #(.dw(16)) AddSub_X (.a(Xi), .b(Yi_sh), .c(Xi_add), .add(Zi[15]));
Add_Sub #(.dw(16)) AddSub_Y (.a(Yi), .b(Xi_sh), .c(Yi_add), .add(~Zi[15]));
Add_Sub #(.dw(16)) AddSub_Z (.a(Zi), .b(arctan_const), .c(Zi_add), .add(Zi[15]));

assign cos = Xi;
endmodule