data/full_repos/permissive/158077025/subunit_tb.v
 line:81: before: "#"
1: b'%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:66: Unsupported: Ignoring delay on this delayed statement.\n forever # 20 clk = ~ clk;\n         ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:71: Unsupported: Ignoring delay on this delayed statement.\n # 10 reset = 1\'b1;\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:72: Unsupported: Ignoring delay on this delayed statement.\n # 10 reset = 1\'b0;\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:81: Unsupported: Ignoring delay on this delayed statement.\n # 60  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:80: Unsupported: Ignoring delay on this delayed statement.\n # 1\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:84: Unsupported: Ignoring delay on this delayed statement.\n # 40  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:87: Unsupported: Ignoring delay on this delayed statement.\n # 40  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:90: Unsupported: Ignoring delay on this delayed statement.\n # 40  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:93: Unsupported: Ignoring delay on this delayed statement.\n # 40  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:96: Unsupported: Ignoring delay on this delayed statement.\n # 40  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:100: Unsupported: Ignoring delay on this delayed statement.\n # 40\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:102: Unsupported: Ignoring delay on this delayed statement.\n # 40\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:105: Unsupported: Ignoring delay on this delayed statement.\n # 360\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:108: Unsupported: Ignoring delay on this delayed statement.\n # 360\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:111: Unsupported: Ignoring delay on this delayed statement.\n # 360  \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:114: Unsupported: Ignoring delay on this delayed statement.\n # 40\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:117: Unsupported: Ignoring delay on this delayed statement.\n # 120\n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:120: Unsupported: Ignoring delay on this delayed statement.\n # 3200   \n ^\n%Warning-STMTDLY: data/full_repos/permissive/158077025/subunit_tb.v:123: Unsupported: Ignoring delay on this delayed statement.\n # 80  \n ^\n%Error: data/full_repos/permissive/158077025/subunit_tb.v:40: Cannot find file containing module: \'computation_subunit\'\ncomputation_subunit subunit_0(\n^~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/computation_subunit\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/computation_subunit.v\n             data/full_repos/permissive/158077025,data/full_repos/permissive/158077025/computation_subunit.sv\n             computation_subunit\n             computation_subunit.v\n             computation_subunit.sv\n             obj_dir/computation_subunit\n             obj_dir/computation_subunit.v\n             obj_dir/computation_subunit.sv\n%Error: Exiting due to 1 error(s), 19 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module subunit_tb();


parameter INPUT_BIT_WIDTH   = 8;
parameter OUTPUT_BIT_WIDTH  = 16+6;
parameter NO_FUNCTION                    = 0;
parameter FETCH_FILTER_WIDTH             = 1;
parameter FETCH_FILTER_SIZE              = 2;
parameter FETCH_PICTURE_WIDTH            = 3;
parameter FETCH_PICTURE_HEIGHT           = 4;
parameter FETCH_NUM_OF_FILTERS           = 5;
parameter FETCH_FILTER_WEIGHT            = 6;
parameter CACHE_LOADING                  = 7;
parameter NEURON_FETCH                   = 8; 
parameter NEURON_FETCH_AND_OPERAND_FETCH = 9;
parameter OPERAND_FETCH                  = 10;

reg                           clk;
reg                           reset;
reg                           layer_reset;
reg  [INPUT_BIT_WIDTH-1:0]    data_input;
reg  [3:0]                    function_sel;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_0;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_1;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_2;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_3;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_4;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_5;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_6;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_7;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_8;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_9;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_10;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_11;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_12;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_13;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_14;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_15;

computation_subunit subunit_0(
	.clk(clk),
	.reset(reset),
	.layer_reset(layer_reset),
	.data_input(data_input),
	.function_sel(function_sel),
	.accumulator_0(accumulator_0),
	.accumulator_1(accumulator_1),
	.accumulator_2(accumulator_2),
	.accumulator_3(accumulator_3),
	.accumulator_4(accumulator_4),
	.accumulator_5(accumulator_5),
	.accumulator_6(accumulator_6),
	.accumulator_7(accumulator_7),
	.accumulator_8(accumulator_8),
	.accumulator_9(accumulator_9),
	.accumulator_10(accumulator_10),
	.accumulator_11(accumulator_11),
	.accumulator_12(accumulator_12),
	.accumulator_13(accumulator_13),
	.accumulator_14(accumulator_14),
	.accumulator_15(accumulator_15)
	);

initial begin
	clk = 1'b0;
	forever # 20 clk = ~ clk;
end

initial begin
	reset = 1'b0;
	# 10 reset = 1'b1;
	# 10 reset = 1'b0;
end

initial begin

	layer_reset = 1'b0;
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	# 1
	# 60
	data_input = 8'h02;
	function_sel = FETCH_FILTER_WIDTH;
	# 40
	data_input = 8'h08;
	function_sel = FETCH_FILTER_SIZE;
	# 40
	data_input = 8'h04;
	function_sel = FETCH_PICTURE_WIDTH;
	# 40
	data_input = 8'h04; 
	function_sel = FETCH_PICTURE_HEIGHT;
	# 40
	data_input = 8'h02;
	function_sel = FETCH_NUM_OF_FILTERS;
	# 40
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	layer_reset = 1'b1;
	# 40
	layer_reset = 1'b0;
	# 40
	data_input = 8'h01;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h02;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h03;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	# 40
	data_input = 8'h00;
	function_sel = NEURON_FETCH;
	# 120
	data_input = 8'h00;
	function_sel = NEURON_FETCH_AND_OPERAND_FETCH;	
	# 3200
	data_input = 8'h00;
	function_sel = OPERAND_FETCH;
	# 80
	data_input = 8'h00;
	function_sel = NO_FUNCTION;	
end

endmodule
module subunit_tb();



parameter INPUT_BIT_WIDTH   = 8;
parameter OUTPUT_BIT_WIDTH  = 16+6;
parameter NO_FUNCTION                    = 0;
parameter FETCH_FILTER_WIDTH             = 1;
parameter FETCH_FILTER_SIZE              = 2;
parameter FETCH_PICTURE_WIDTH            = 3;
parameter FETCH_PICTURE_HEIGHT           = 4;
parameter FETCH_NUM_OF_FILTERS           = 5;
parameter FETCH_FILTER_WEIGHT            = 6;
parameter CACHE_LOADING                  = 7;
parameter NEURON_FETCH                   = 8; 
parameter NEURON_FETCH_AND_OPERAND_FETCH = 9;
parameter OPERAND_FETCH                  = 10;

reg                           clk;
reg                           reset;
reg                           layer_reset;
reg  [INPUT_BIT_WIDTH-1:0]    data_input;
reg  [3:0]                    function_sel;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_0;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_1;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_2;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_3;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_4;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_5;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_6;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_7;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_8;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_9;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_10;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_11;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_12;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_13;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_14;
wire [OUTPUT_BIT_WIDTH-1:0]   accumulator_15;

computation_subunit subunit_0(
	.clk(clk),
	.reset(reset),
	.layer_reset(layer_reset),
	.data_input(data_input),
	.function_sel(function_sel),
	.accumulator_0(accumulator_0),
	.accumulator_1(accumulator_1),
	.accumulator_2(accumulator_2),
	.accumulator_3(accumulator_3),
	.accumulator_4(accumulator_4),
	.accumulator_5(accumulator_5),
	.accumulator_6(accumulator_6),
	.accumulator_7(accumulator_7),
	.accumulator_8(accumulator_8),
	.accumulator_9(accumulator_9),
	.accumulator_10(accumulator_10),
	.accumulator_11(accumulator_11),
	.accumulator_12(accumulator_12),
	.accumulator_13(accumulator_13),
	.accumulator_14(accumulator_14),
	.accumulator_15(accumulator_15)
	);

initial begin
	clk = 1'b0;
	forever # 20 clk = ~ clk;
end

initial begin
	reset = 1'b0;
	# 10 reset = 1'b1;
	# 10 reset = 1'b0;
end

initial begin

	layer_reset = 1'b0;
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	# 1
	# 60
	data_input = 8'h02;
	function_sel = FETCH_FILTER_WIDTH;
	# 40
	data_input = 8'h08;
	function_sel = FETCH_FILTER_SIZE;
	# 40
	data_input = 8'h04;
	function_sel = FETCH_PICTURE_WIDTH;
	# 40
	data_input = 8'h04; 
	function_sel = FETCH_PICTURE_HEIGHT;
	# 40
	data_input = 8'h02;
	function_sel = FETCH_NUM_OF_FILTERS;
	# 40
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	layer_reset = 1'b1;
	# 40
	layer_reset = 1'b0;
	# 40
	data_input = 8'h01;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h02;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h03;
	function_sel = FETCH_FILTER_WEIGHT;
	# 360
	data_input = 8'h00;
	function_sel = NO_FUNCTION;
	# 40
	data_input = 8'h00;
	function_sel = NEURON_FETCH;
	# 120
	data_input = 8'h00;
	function_sel = NEURON_FETCH_AND_OPERAND_FETCH;	
	# 3200
	data_input = 8'h00;
	function_sel = OPERAND_FETCH;
	# 80
	data_input = 8'h00;
	function_sel = NO_FUNCTION;	
end

endmodule