data/full_repos/permissive/174323821/hdl/sound/jtframe_uprate2_fir.v
1: b'%Error: data/full_repos/permissive/174323821/hdl/sound/jtframe_uprate2_fir.v:61: Cannot find file containing module: \'jtframe_fir\'\njtframe_fir #(.KMAX(126),.COEFFS("uprate2.hex")) fir2(\n^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/174323821/hdl/sound,data/full_repos/permissive/174323821/jtframe_fir\n             data/full_repos/permissive/174323821/hdl/sound,data/full_repos/permissive/174323821/jtframe_fir.v\n             data/full_repos/permissive/174323821/hdl/sound,data/full_repos/permissive/174323821/jtframe_fir.sv\n             jtframe_fir\n             jtframe_fir.v\n             jtframe_fir.sv\n             obj_dir/jtframe_fir\n             obj_dir/jtframe_fir.v\n             obj_dir/jtframe_fir.sv\n%Error: Exiting due to 1 error(s)\n'
module jtframe_uprate2_fir(
    input         rst,
    input         clk,
    input         sample,
    output reg    upsample,
    input  signed [15:0] l_in,
    input  signed [15:0] r_in,
    output signed [15:0] l_out,
    output signed [15:0] r_out
);



localparam W=13;

reg [W-1:0] cnt, period;
reg signed [15:0] l_pad, r_pad;

always @(posedge clk, posedge rst ) begin
    if( rst ) begin
        cnt     <= {W{1'd0}};
        period  <= {W{1'd0}};
        upsample <= 0;
    end else begin
        if( cnt == (period>>1) || sample ) begin
            upsample <= 1;
            l_pad   <= sample ? l_in : 16'd0;
            r_pad   <= sample ? r_in : 16'd0;
        end else upsample <= 0;
        if( sample ) begin
            cnt    <= { {W-1{1'd0}}, 1'd1};
            period <= cnt;
        end else begin
            cnt <= cnt+1'd1;
        end
    end
end

jtframe_fir #(.KMAX(126),.COEFFS("uprate2.hex")) fir2(
    .rst    ( rst       ),
    .clk    ( clk       ),
    .sample ( upsample  ),
    .l_in   ( l_pad     ),
    .r_in   ( r_pad     ),
    .l_out  ( l_out     ),
    .r_out  ( r_out     )
);

endmodule
module jtframe_uprate2_fir(
    input         rst,
    input         clk,
    input         sample,
    output reg    upsample,
    input  signed [15:0] l_in,
    input  signed [15:0] r_in,
    output signed [15:0] l_out,
    output signed [15:0] r_out
);




localparam W=13;

reg [W-1:0] cnt, period;
reg signed [15:0] l_pad, r_pad;

always @(posedge clk, posedge rst ) begin
    if( rst ) begin
        cnt     <= {W{1'd0}};
        period  <= {W{1'd0}};
        upsample <= 0;
    end else begin
        if( cnt == (period>>1) || sample ) begin
            upsample <= 1;
            l_pad   <= sample ? l_in : 16'd0;
            r_pad   <= sample ? r_in : 16'd0;
        end else upsample <= 0;
        if( sample ) begin
            cnt    <= { {W-1{1'd0}}, 1'd1};
            period <= cnt;
        end else begin
            cnt <= cnt+1'd1;
        end
    end
end

jtframe_fir #(.KMAX(126),.COEFFS("uprate2.hex")) fir2(
    .rst    ( rst       ),
    .clk    ( clk       ),
    .sample ( upsample  ),
    .l_in   ( l_pad     ),
    .r_in   ( r_pad     ),
    .l_out  ( l_out     ),
    .r_out  ( r_out     )
);

endmodule