data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/lib/rfnoc/blocks/rfnoc_block_window/rfnoc_window_core.v
1: b'%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/lib/rfnoc/blocks/rfnoc_block_window/rfnoc_window_core.v:50: Cannot find include file: rfnoc_block_window_regs.vh\n  `include "rfnoc_block_window_regs.vh" \n           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/lib/rfnoc/blocks/rfnoc_block_window,data/full_repos/permissive/214858095/rfnoc_block_window_regs.vh\n             data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/lib/rfnoc/blocks/rfnoc_block_window,data/full_repos/permissive/214858095/rfnoc_block_window_regs.vh.v\n             data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/lib/rfnoc/blocks/rfnoc_block_window,data/full_repos/permissive/214858095/rfnoc_block_window_regs.vh.sv\n             rfnoc_block_window_regs.vh\n             rfnoc_block_window_regs.vh.v\n             rfnoc_block_window_regs.vh.sv\n             obj_dir/rfnoc_block_window_regs.vh\n             obj_dir/rfnoc_block_window_regs.vh.v\n             obj_dir/rfnoc_block_window_regs.vh.sv\n%Error: Exiting due to 1 error(s)\n'
module rfnoc_window_core #(
  parameter MAX_WINDOW_SIZE = 4096,
  parameter COEFF_WIDTH     = 16
) (
  input wire clk,
  input wire rst,


  input  wire        s_ctrlport_req_wr,
  input  wire        s_ctrlport_req_rd,
  input  wire [19:0] s_ctrlport_req_addr,
  input  wire [31:0] s_ctrlport_req_data,
  output reg         s_ctrlport_resp_ack,
  output reg  [31:0] s_ctrlport_resp_data,


  input  wire [31:0] s_tdata,
  input  wire        s_tlast,
  input  wire        s_tvalid,
  output wire        s_tready,


  output wire [31:0] m_tdata,
  output wire        m_tlast,
  output wire        m_tvalid,
  input  wire        m_tready
);

  `include "rfnoc_block_window_regs.vh"


  localparam WINDOW_SIZE = $clog2(MAX_WINDOW_SIZE);


  localparam WINDOW_SIZE_W = $clog2(MAX_WINDOW_SIZE+1);






  reg [WINDOW_SIZE_W-1:0] window_size;
  reg [  COEFF_WIDTH-1:0] m_axis_coeff_tdata;
  reg                     m_axis_coeff_tlast;
  reg                     m_axis_coeff_tvalid;

  always @(posedge clk) begin
    if (rst) begin
      window_size         <= 'bX;
      m_axis_coeff_tdata  <= 'bX;
      m_axis_coeff_tlast  <= 0;
      m_axis_coeff_tvalid <= 0;
    end else begin

      s_ctrlport_resp_ack  <= 0;
      s_ctrlport_resp_data <= 0;
      m_axis_coeff_tlast   <= 0;
      m_axis_coeff_tvalid  <= 0;


      if (s_ctrlport_req_wr) begin
        s_ctrlport_resp_ack <= 1;
        case (s_ctrlport_req_addr)
          REG_WINDOW_SIZE :
            window_size <= s_ctrlport_req_data[WINDOW_SIZE_W-1:0];
          REG_LOAD_COEFF : begin
            m_axis_coeff_tdata  <= s_ctrlport_req_data[COEFF_WIDTH-1:0];
            m_axis_coeff_tlast  <= 0;
            m_axis_coeff_tvalid <= 1;
          end
          REG_LOAD_COEFF_LAST : begin
            m_axis_coeff_tdata  <= s_ctrlport_req_data[COEFF_WIDTH-1:0];
            m_axis_coeff_tlast  <= 1;
            m_axis_coeff_tvalid <= 1;
          end
        endcase
      end


      if (s_ctrlport_req_rd) begin
        s_ctrlport_resp_ack <= 1;
        case (s_ctrlport_req_addr)
          REG_WINDOW_SIZE :
            s_ctrlport_resp_data[WINDOW_SIZE_W-1:0] <= window_size;
          REG_WINDOW_MAX_SIZE :
            s_ctrlport_resp_data[WINDOW_SIZE_W-1:0] <= MAX_WINDOW_SIZE;
        endcase
      end
    end
  end





  window #(
    .WINDOW_SIZE (WINDOW_SIZE),
    .COEFF_WIDTH (COEFF_WIDTH)
  ) window_i (
    .clk                 (clk),
    .rst                 (rst),
    .window_size         (window_size),
    .m_axis_coeff_tdata  (m_axis_coeff_tdata),
    .m_axis_coeff_tlast  (m_axis_coeff_tlast),
    .m_axis_coeff_tvalid (m_axis_coeff_tvalid),
    .m_axis_coeff_tready (),
    .i_tdata             (s_tdata),
    .i_tlast             (s_tlast),
    .i_tvalid            (s_tvalid),
    .i_tready            (s_tready),
    .o_tdata             (m_tdata),
    .o_tlast             (m_tlast),
    .o_tvalid            (m_tvalid),
    .o_tready            (m_tready)
  );

endmodule
module rfnoc_window_core #(
  parameter MAX_WINDOW_SIZE = 4096,
  parameter COEFF_WIDTH     = 16
) (
  input wire clk,
  input wire rst,


  input  wire        s_ctrlport_req_wr,
  input  wire        s_ctrlport_req_rd,
  input  wire [19:0] s_ctrlport_req_addr,
  input  wire [31:0] s_ctrlport_req_data,
  output reg         s_ctrlport_resp_ack,
  output reg  [31:0] s_ctrlport_resp_data,


  input  wire [31:0] s_tdata,
  input  wire        s_tlast,
  input  wire        s_tvalid,
  output wire        s_tready,


  output wire [31:0] m_tdata,
  output wire        m_tlast,
  output wire        m_tvalid,
  input  wire        m_tready
);


  `include "rfnoc_block_window_regs.vh"


  localparam WINDOW_SIZE = $clog2(MAX_WINDOW_SIZE);


  localparam WINDOW_SIZE_W = $clog2(MAX_WINDOW_SIZE+1);






  reg [WINDOW_SIZE_W-1:0] window_size;
  reg [  COEFF_WIDTH-1:0] m_axis_coeff_tdata;
  reg                     m_axis_coeff_tlast;
  reg                     m_axis_coeff_tvalid;

  always @(posedge clk) begin
    if (rst) begin
      window_size         <= 'bX;
      m_axis_coeff_tdata  <= 'bX;
      m_axis_coeff_tlast  <= 0;
      m_axis_coeff_tvalid <= 0;
    end else begin

      s_ctrlport_resp_ack  <= 0;
      s_ctrlport_resp_data <= 0;
      m_axis_coeff_tlast   <= 0;
      m_axis_coeff_tvalid  <= 0;


      if (s_ctrlport_req_wr) begin
        s_ctrlport_resp_ack <= 1;
        case (s_ctrlport_req_addr)
          REG_WINDOW_SIZE :
            window_size <= s_ctrlport_req_data[WINDOW_SIZE_W-1:0];
          REG_LOAD_COEFF : begin
            m_axis_coeff_tdata  <= s_ctrlport_req_data[COEFF_WIDTH-1:0];
            m_axis_coeff_tlast  <= 0;
            m_axis_coeff_tvalid <= 1;
          end
          REG_LOAD_COEFF_LAST : begin
            m_axis_coeff_tdata  <= s_ctrlport_req_data[COEFF_WIDTH-1:0];
            m_axis_coeff_tlast  <= 1;
            m_axis_coeff_tvalid <= 1;
          end
        endcase
      end


      if (s_ctrlport_req_rd) begin
        s_ctrlport_resp_ack <= 1;
        case (s_ctrlport_req_addr)
          REG_WINDOW_SIZE :
            s_ctrlport_resp_data[WINDOW_SIZE_W-1:0] <= window_size;
          REG_WINDOW_MAX_SIZE :
            s_ctrlport_resp_data[WINDOW_SIZE_W-1:0] <= MAX_WINDOW_SIZE;
        endcase
      end
    end
  end





  window #(
    .WINDOW_SIZE (WINDOW_SIZE),
    .COEFF_WIDTH (COEFF_WIDTH)
  ) window_i (
    .clk                 (clk),
    .rst                 (rst),
    .window_size         (window_size),
    .m_axis_coeff_tdata  (m_axis_coeff_tdata),
    .m_axis_coeff_tlast  (m_axis_coeff_tlast),
    .m_axis_coeff_tvalid (m_axis_coeff_tvalid),
    .m_axis_coeff_tready (),
    .i_tdata             (s_tdata),
    .i_tlast             (s_tlast),
    .i_tvalid            (s_tvalid),
    .i_tready            (s_tready),
    .o_tdata             (m_tdata),
    .o_tlast             (m_tlast),
    .o_tvalid            (m_tvalid),
    .o_tready            (m_tready)
  );

endmodule