data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v
1: b'%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:49: Operator COND expects 8 bits on the Conditional True, but Conditional True\'s REPLICATE generates 2 bits.\n                                                                                          : ... In instance CORDIC\n    assign sinI = (WIO>WLI) ? {{(WIO-WLI){sineI[WLI-1]}},sineI[WLI-1:0]} : (WIO==WLI) ? sineI[WLI-1:0] : (WIO<WLI) ? {sineI[WLI-1], sineI[WIO-2:0]} : sineI[WLI-1:0];\n                            ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:49: Operator COND expects 8 bits on the Conditional True, but Conditional True\'s REPLICATE generates 2 bits.\n                                                                                          : ... In instance CORDIC\n    assign sinI = (WIO>WLI) ? {{(WIO-WLI){sineI[WLI-1]}},sineI[WLI-1:0]} : (WIO==WLI) ? sineI[WLI-1:0] : (WIO<WLI) ? {sineI[WLI-1], sineI[WIO-2:0]} : sineI[WLI-1:0];\n                                                                                                                   ^\n%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:49: Operator ASSIGNW expects 2 bits on the Assign RHS, but Assign RHS\'s COND generates 8 bits.\n                                                                                          : ... In instance CORDIC\n    assign sinI = (WIO>WLI) ? {{(WIO-WLI){sineI[WLI-1]}},sineI[WLI-1:0]} : (WIO==WLI) ? sineI[WLI-1:0] : (WIO<WLI) ? {sineI[WLI-1], sineI[WIO-2:0]} : sineI[WLI-1:0];\n                ^\n%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:60: Operator COND expects 8 bits on the Conditional True, but Conditional True\'s REPLICATE generates 2 bits.\n                                                                                          : ... In instance CORDIC\n    assign cosI = (WIO>WLI) ? {{(WIO-WLI){cosineI[WLI-1]}},cosineI[WLI-1:0]} : (WIO==WLI) ? cosineI[WLI-1:0] : (WIO<WLI) ? {cosineI[WLI-1], cosineI[WIO-2:0]} : cosineI[WLI-1:0];\n                            ^\n%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:60: Operator COND expects 8 bits on the Conditional True, but Conditional True\'s REPLICATE generates 2 bits.\n                                                                                          : ... In instance CORDIC\n    assign cosI = (WIO>WLI) ? {{(WIO-WLI){cosineI[WLI-1]}},cosineI[WLI-1:0]} : (WIO==WLI) ? cosineI[WLI-1:0] : (WIO<WLI) ? {cosineI[WLI-1], cosineI[WIO-2:0]} : cosineI[WLI-1:0];\n                                                                                                                         ^\n%Warning-WIDTH: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:60: Operator ASSIGNW expects 2 bits on the Assign RHS, but Assign RHS\'s COND generates 8 bits.\n                                                                                          : ... In instance CORDIC\n    assign cosI = (WIO>WLI) ? {{(WIO-WLI){cosineI[WLI-1]}},cosineI[WLI-1:0]} : (WIO==WLI) ? cosineI[WLI-1:0] : (WIO<WLI) ? {cosineI[WLI-1], cosineI[WIO-2:0]} : cosineI[WLI-1:0];\n                ^\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:82: Cannot find file containing module: \'LookUpTable\'\n    LookUpTable #(.WII(WII), .WFI(WFI)) LUT (.iterationIndex(i), .gamma(gamma));\n    ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new,data/full_repos/permissive/482974019/LookUpTable\n             data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new,data/full_repos/permissive/482974019/LookUpTable.v\n             data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new,data/full_repos/permissive/482974019/LookUpTable.sv\n             LookUpTable\n             LookUpTable.v\n             LookUpTable.sv\n             obj_dir/LookUpTable\n             obj_dir/LookUpTable.v\n             obj_dir/LookUpTable.sv\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:83: Cannot find file containing module: \'DFlipFlop\'\n    DFlipFlop #(.WL(WLI2+WLF2)) ZFlipFlop (.CLK(CLK), .RST(RST), .D(Zin), .Q(Zout));\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:84: Cannot find file containing module: \'DFlipFlop\'\n    DFlipFlop #(.WL(WLI+WLF)) YFlipFlop (.CLK(CLK), .RST(RST), .D(Yin), .Q(sine));\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:85: Cannot find file containing module: \'XFlipFlop\'\n    XFlipFlop #(.WL(WLI+WLF)) XFF (.CLK(CLK), .RST(RST), .X(Xin), .Q(cosine));\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:86: Cannot find file containing module: \'SetDI\'\n    SetDI #(.WLI(WLI2), .WLF(WLF2)) DI (.in1(angle), .in2(Zout), .di(di));\n    ^~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:87: Cannot find file containing module: \'CalculateX\'\n    CalculateX #(.WLI(WLI), .WLF(WLF)) addSubX (.in1(cosine), .in2(sine), .di(di), .i(i), .out(Xin));\n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:88: Cannot find file containing module: \'CalculateY\'\n    CalculateY #(.WLI(WLI), .WLF(WLF)) addSubY (.in1(sine), .in2(cosine), .di(di), .i(i), .out(Yin));\n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/482974019/CORDIC.srcs/sources_1/new/CORDIC.v:89: Cannot find file containing module: \'CalculateZ\'\n    CalculateZ #(.WLI(WLI2), .WLF(WLF2)) addSubZ (.in1(Zout), .in2(gamma), .di(di), .i(i), .out(Zin));\n    ^~~~~~~~~~\n%Error: Exiting due to 8 error(s), 6 warning(s)\n'
module CORDIC #(parameter WLI = 8, WLF = 8, WLI2 = 8, WLF2 = 8, WIO = 2, WFO = 8)
            (input CLK, RST,
             input [3:0] i,
             input signed [(WLI2+WLF2)-1:0] angle,
             output [(WIO+WFO)-1:0] sin, cos);
    
    localparam WII = 9;
    localparam WFI = 9;
    wire [(WLI+WLF)-1:0] Xin;

    wire [(WLI+WLF)-1:0] Yin;

    wire [(WLI2+WLF2)-1:0] Zin;
    wire [(WLI2+WLF2)-1:0] Zout;
    wire [(WII+WFI)-1:0] gamma;
    wire signed [1:0] di;
    wire [(WLI+WLF)-1:0] sine, cosine;
      



    wire [WLI-1:0] sineI; 
    wire [WLF-1:0] sineF;
    wire [WIO-1:0] sinI; 
    wire [WFO-1:0] sinF;
    assign {sineI, sineF} = sine;
    
    assign sinI = (WIO>WLI) ? {{(WIO-WLI){sineI[WLI-1]}},sineI[WLI-1:0]} : (WIO==WLI) ? sineI[WLI-1:0] : (WIO<WLI) ? {sineI[WLI-1], sineI[WIO-2:0]} : sineI[WLI-1:0];
    assign sinF = (WFO>WLF) ? {sineF[WLF-1:0],{(WFO-WLF){1'b0}}} : (WFO==WLF) ? sineF[WLF-1:0] : (WFO<WLF) ? sineF[WLF-1:WLF-WFO] : sineF[WLF-1:0];
    assign sin = {sinI, sinF};

    
    wire [WLI-1:0] cosineI; 
    wire [WLF-1:0] cosineF;
    wire [WIO-1:0] cosI; 
    wire [WFO-1:0] cosF;
    assign {cosineI, cosineF} = cosine;
    
    assign cosI = (WIO>WLI) ? {{(WIO-WLI){cosineI[WLI-1]}},cosineI[WLI-1:0]} : (WIO==WLI) ? cosineI[WLI-1:0] : (WIO<WLI) ? {cosineI[WLI-1], cosineI[WIO-2:0]} : cosineI[WLI-1:0];
    assign cosF = (WFO>WLF) ? {cosineF[WLF-1:0],{(WFO-WLF){1'b0}}} : (WFO==WLF) ? cosineF[WLF-1:0] : (WFO<WLF) ? cosineF[WLF-1:WLF-WFO] : cosineF[WLF-1:0];
    assign cos = {cosI, cosF};
   

   













   
   
    
    LookUpTable #(.WII(WII), .WFI(WFI)) LUT (.iterationIndex(i), .gamma(gamma));
    DFlipFlop #(.WL(WLI2+WLF2)) ZFlipFlop (.CLK(CLK), .RST(RST), .D(Zin), .Q(Zout));
    DFlipFlop #(.WL(WLI+WLF)) YFlipFlop (.CLK(CLK), .RST(RST), .D(Yin), .Q(sine));
    XFlipFlop #(.WL(WLI+WLF)) XFF (.CLK(CLK), .RST(RST), .X(Xin), .Q(cosine));
    SetDI #(.WLI(WLI2), .WLF(WLF2)) DI (.in1(angle), .in2(Zout), .di(di));
    CalculateX #(.WLI(WLI), .WLF(WLF)) addSubX (.in1(cosine), .in2(sine), .di(di), .i(i), .out(Xin));
    CalculateY #(.WLI(WLI), .WLF(WLF)) addSubY (.in1(sine), .in2(cosine), .di(di), .i(i), .out(Yin));
    CalculateZ #(.WLI(WLI2), .WLF(WLF2)) addSubZ (.in1(Zout), .in2(gamma), .di(di), .i(i), .out(Zin));
    
    
    
endmodule
module CORDIC #(parameter WLI = 8, WLF = 8, WLI2 = 8, WLF2 = 8, WIO = 2, WFO = 8)
            (input CLK, RST,
             input [3:0] i,
             input signed [(WLI2+WLF2)-1:0] angle,
             output [(WIO+WFO)-1:0] sin, cos);

    
    localparam WII = 9;
    localparam WFI = 9;
    wire [(WLI+WLF)-1:0] Xin;

    wire [(WLI+WLF)-1:0] Yin;

    wire [(WLI2+WLF2)-1:0] Zin;
    wire [(WLI2+WLF2)-1:0] Zout;
    wire [(WII+WFI)-1:0] gamma;
    wire signed [1:0] di;
    wire [(WLI+WLF)-1:0] sine, cosine;
      



    wire [WLI-1:0] sineI; 
    wire [WLF-1:0] sineF;
    wire [WIO-1:0] sinI; 
    wire [WFO-1:0] sinF;
    assign {sineI, sineF} = sine;
    
    assign sinI = (WIO>WLI) ? {{(WIO-WLI){sineI[WLI-1]}},sineI[WLI-1:0]} : (WIO==WLI) ? sineI[WLI-1:0] : (WIO<WLI) ? {sineI[WLI-1], sineI[WIO-2:0]} : sineI[WLI-1:0];
    assign sinF = (WFO>WLF) ? {sineF[WLF-1:0],{(WFO-WLF){1'b0}}} : (WFO==WLF) ? sineF[WLF-1:0] : (WFO<WLF) ? sineF[WLF-1:WLF-WFO] : sineF[WLF-1:0];
    assign sin = {sinI, sinF};

    
    wire [WLI-1:0] cosineI; 
    wire [WLF-1:0] cosineF;
    wire [WIO-1:0] cosI; 
    wire [WFO-1:0] cosF;
    assign {cosineI, cosineF} = cosine;
    
    assign cosI = (WIO>WLI) ? {{(WIO-WLI){cosineI[WLI-1]}},cosineI[WLI-1:0]} : (WIO==WLI) ? cosineI[WLI-1:0] : (WIO<WLI) ? {cosineI[WLI-1], cosineI[WIO-2:0]} : cosineI[WLI-1:0];
    assign cosF = (WFO>WLF) ? {cosineF[WLF-1:0],{(WFO-WLF){1'b0}}} : (WFO==WLF) ? cosineF[WLF-1:0] : (WFO<WLF) ? cosineF[WLF-1:WLF-WFO] : cosineF[WLF-1:0];
    assign cos = {cosI, cosF};
   

   













   
   
    
    LookUpTable #(.WII(WII), .WFI(WFI)) LUT (.iterationIndex(i), .gamma(gamma));
    DFlipFlop #(.WL(WLI2+WLF2)) ZFlipFlop (.CLK(CLK), .RST(RST), .D(Zin), .Q(Zout));
    DFlipFlop #(.WL(WLI+WLF)) YFlipFlop (.CLK(CLK), .RST(RST), .D(Yin), .Q(sine));
    XFlipFlop #(.WL(WLI+WLF)) XFF (.CLK(CLK), .RST(RST), .X(Xin), .Q(cosine));
    SetDI #(.WLI(WLI2), .WLF(WLF2)) DI (.in1(angle), .in2(Zout), .di(di));
    CalculateX #(.WLI(WLI), .WLF(WLF)) addSubX (.in1(cosine), .in2(sine), .di(di), .i(i), .out(Xin));
    CalculateY #(.WLI(WLI), .WLF(WLF)) addSubY (.in1(sine), .in2(cosine), .di(di), .i(i), .out(Yin));
    CalculateZ #(.WLI(WLI2), .WLF(WLF2)) addSubZ (.in1(Zout), .in2(gamma), .di(di), .i(i), .out(Zin));
    
    
    
endmodule