data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v
1: b'%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:1: Cannot find include file: CNN_defines.vh\n`include "CNN_defines.vh" \n         ^~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/464160784/atom_systolic,data/full_repos/permissive/464160784/CNN_defines.vh\n             data/full_repos/permissive/464160784/atom_systolic,data/full_repos/permissive/464160784/CNN_defines.vh.v\n             data/full_repos/permissive/464160784/atom_systolic,data/full_repos/permissive/464160784/CNN_defines.vh.sv\n             CNN_defines.vh\n             CNN_defines.vh.v\n             CNN_defines.vh.sv\n             obj_dir/CNN_defines.vh\n             obj_dir/CNN_defines.vh.v\n             obj_dir/CNN_defines.vh.sv\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:8: Define or directive not defined: \'`MAX_DW_Ratio\'\n    input [`MAX_DW_Ratio-1:0]Tin_factor, \n           ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:10: Define or directive not defined: \'`MAX_WT_DW\'\n    input [`MAX_WT_DW-1:0]wt,\n           ^~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:11: Define or directive not defined: \'`MAX_DAT_DW\'\n    input [`MAX_DAT_DW-1:0]left_dat_in,\n           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:12: Define or directive not defined: \'`base_log2Tin\'\n    input [`base_log2Tin+`MAX_DW2-1:0]up_dat_in,\n           ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:12: Define or directive not defined: \'`MAX_DW2\'\n    input [`base_log2Tin+`MAX_DW2-1:0]up_dat_in,\n                         ^~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:14: Define or directive not defined: \'`MAX_DAT_DW\'\n    output reg[`MAX_DAT_DW-1:0]right_dat_out,\n               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:15: Define or directive not defined: \'`base_log2Tin\'\n    output reg [`base_log2Tin+`MAX_DW2-1:0]down_dat_out\n                ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/464160784/atom_systolic/Atom_Systolic_PE.v:15: Define or directive not defined: \'`MAX_DW2\'\n    output reg [`base_log2Tin+`MAX_DW2-1:0]down_dat_out\n                              ^~~~~~~~\n%Error: Exiting due to 9 error(s)\n'
module Atom_Systolic_PE
(
    input clk,
    input rst_n,
    input [`MAX_DW_Ratio-1:0]Tin_factor,
    
    input [`MAX_WT_DW-1:0]wt,
    input [`MAX_DAT_DW-1:0]left_dat_in,
    input [`base_log2Tin+`MAX_DW2-1:0]up_dat_in,
    
    output reg[`MAX_DAT_DW-1:0]right_dat_out,
    output reg [`base_log2Tin+`MAX_DW2-1:0]down_dat_out

);

always@(posedge clk or negedge rst_n)
if(~rst_n)
    begin
        right_dat_out<='d0;
        down_dat_out<='d0;
    end
else
    begin
        right_dat_out<=left_dat_in;
        down_dat_out<=$signed(wt)*$signed(left_dat_in)+$signed(up_dat_in);
    end

endmodule
module Atom_Systolic_PE
(
    input clk,
    input rst_n,
    input [`MAX_DW_Ratio-1:0]Tin_factor,
    
    input [`MAX_WT_DW-1:0]wt,
    input [`MAX_DAT_DW-1:0]left_dat_in,
    input [`base_log2Tin+`MAX_DW2-1:0]up_dat_in,
    
    output reg[`MAX_DAT_DW-1:0]right_dat_out,
    output reg [`base_log2Tin+`MAX_DW2-1:0]down_dat_out

);


always@(posedge clk or negedge rst_n)
if(~rst_n)
    begin
        right_dat_out<='d0;
        down_dat_out<='d0;
    end
else
    begin
        right_dat_out<=left_dat_in;
        down_dat_out<=$signed(wt)*$signed(left_dat_in)+$signed(up_dat_in);
    end

endmodule