data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:52: Unsupported: Ignoring delay on this delayed statement.\n    forever #100 clk_en=~clk_en;\n            ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:57: Unsupported: Ignoring delay on this delayed statement.\n   #300 reset_n=1;     \n   ^\n%Warning-STMTDLY: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:62: Unsupported: Ignoring delay on this delayed statement.\n    #400 conv_en=1;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:63: Unsupported: Ignoring delay on this delayed statement.\n    #700 conv_en=0;\n    ^\n%Error: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:65: Cannot find file containing module: \'conv_top\'\nconv_top #(\n^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb,data/full_repos/permissive/514467334/conv_top\n             data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb,data/full_repos/permissive/514467334/conv_top.v\n             data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb,data/full_repos/permissive/514467334/conv_top.sv\n             conv_top\n             conv_top.v\n             conv_top.sv\n             obj_dir/conv_top\n             obj_dir/conv_top.v\n             obj_dir/conv_top.sv\n%Error: data/full_repos/permissive/514467334/project/ConvKing/source/Accelerator/Conv/tb/conv_top_tb.v:90: Cannot find file containing module: \'GTP_GRS\'\nGTP_GRS   GRS_INST( .GRS_N(1\'b1) );\n^~~~~~~\n%Error: Exiting due to 2 error(s), 4 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module conv_top_tb();
    parameter weight_width = 2;
    parameter weight_height = 2;

    parameter img_width = 4;
    parameter img_height = 4;
    
    parameter padding_enable = 0;
    parameter padding = 0;
    parameter stride = 1;
    parameter bitwidth = 3;
    parameter result_width = (img_width-weight_width+2*padding)/stride+1;
    parameter result_height = (img_height-weight_height+2*padding)/stride+1;
    parameter expand = 1;

reg clk_en;
reg reset_n;
reg conv_en;

reg [img_width*img_height*bitwidth-1:0] img;
reg [weight_width*weight_height*bitwidth-1:0] weight;
reg [bitwidth-1:0]       bias;

wire [2*expand*result_width*result_height*bitwidth-1:0] result;
wire conv_fin;

initial begin
    img=48'b010_100_110_101_010_001_111_110_010_110_000_010_001_100_010_011;
    weight = 12'b001_000_000_001;

    bias = 3'b101;
end


initial begin
    clk_en=0;
    forever #100 clk_en=~clk_en;
end

initial begin
   reset_n=0;
   #300 reset_n=1;     
end

initial begin
    conv_en=0;
    #400 conv_en=1;
    #700 conv_en=0;
end
conv_top #(
    weight_width,
    weight_height,
    img_width,
    img_height,
    padding_enable,
    padding,
    stride,
    bitwidth,
    result_width,
    result_height,
    expand
) 
inst(
    .clk_en     (clk_en),
    .rst_n      (reset_n),
    .conv_en    (conv_en),

    .img          (img),
    .weight       (weight),
    .bias         (bias),
    
    .result       (result),
    .conv_fin     (conv_fin)
);
GTP_GRS   GRS_INST( .GRS_N(1'b1) );
endmodule
module conv_top_tb();

    parameter weight_width = 2;
    parameter weight_height = 2;

    parameter img_width = 4;
    parameter img_height = 4;
    
    parameter padding_enable = 0;
    parameter padding = 0;
    parameter stride = 1;
    parameter bitwidth = 3;
    parameter result_width = (img_width-weight_width+2*padding)/stride+1;
    parameter result_height = (img_height-weight_height+2*padding)/stride+1;
    parameter expand = 1;

reg clk_en;
reg reset_n;
reg conv_en;

reg [img_width*img_height*bitwidth-1:0] img;
reg [weight_width*weight_height*bitwidth-1:0] weight;
reg [bitwidth-1:0]       bias;

wire [2*expand*result_width*result_height*bitwidth-1:0] result;
wire conv_fin;

initial begin
    img=48'b010_100_110_101_010_001_111_110_010_110_000_010_001_100_010_011;
    weight = 12'b001_000_000_001;

    bias = 3'b101;
end


initial begin
    clk_en=0;
    forever #100 clk_en=~clk_en;
end

initial begin
   reset_n=0;
   #300 reset_n=1;     
end

initial begin
    conv_en=0;
    #400 conv_en=1;
    #700 conv_en=0;
end
conv_top #(
    weight_width,
    weight_height,
    img_width,
    img_height,
    padding_enable,
    padding,
    stride,
    bitwidth,
    result_width,
    result_height,
    expand
) 
inst(
    .clk_en     (clk_en),
    .rst_n      (reset_n),
    .conv_en    (conv_en),

    .img          (img),
    .weight       (weight),
    .bias         (bias),
    
    .result       (result),
    .conv_fin     (conv_fin)
);
GTP_GRS   GRS_INST( .GRS_N(1'b1) );
endmodule