data/full_repos/permissive/18921956/HardwareLab/Lab4/pingpong_counter.v
1: b"%Error: data/full_repos/permissive/18921956/HardwareLab/Lab4/pingpong_counter.v:9: Cannot find file containing module: 'dff_1bit'\n dff_1bit DFF2( dir, clk, rst_n, isUp);\n ^~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/18921956/HardwareLab/Lab4,data/full_repos/permissive/18921956/dff_1bit\n             data/full_repos/permissive/18921956/HardwareLab/Lab4,data/full_repos/permissive/18921956/dff_1bit.v\n             data/full_repos/permissive/18921956/HardwareLab/Lab4,data/full_repos/permissive/18921956/dff_1bit.sv\n             dff_1bit\n             dff_1bit.v\n             dff_1bit.sv\n             obj_dir/dff_1bit\n             obj_dir/dff_1bit.v\n             obj_dir/dff_1bit.sv\n%Error: data/full_repos/permissive/18921956/HardwareLab/Lab4/pingpong_counter.v:10: Cannot find file containing module: 'dff_4bit'\n dff_4bit DFF1( out, clk, rst_n, tmp );\n ^~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module pingpong_counter(rst_n, clk, en, dir, out);
	output [3:0]out;
	output dir;
	input clk, rst_n, en;
	wire [3:0]tmp;
	wire isUp;

	dff_1bit DFF2( dir, clk, rst_n, isUp);
	dff_4bit DFF1( out, clk, rst_n, tmp );
	assign isUp =(!en)?(dir):
					 (dir)?((out == 0)?(!dir):(dir)):
					 (out == 9)?(!dir):(dir);
					 
	assign tmp = (!en)?(out):
					 (isUp)?(out-1):(out+1);
endmodule
module pingpong_counter(rst_n, clk, en, dir, out);

	output [3:0]out;
	output dir;
	input clk, rst_n, en;
	wire [3:0]tmp;
	wire isUp;

	dff_1bit DFF2( dir, clk, rst_n, isUp);
	dff_4bit DFF1( out, clk, rst_n, tmp );
	assign isUp =(!en)?(dir):
					 (dir)?((out == 0)?(!dir):(dir)):
					 (out == 9)?(!dir):(dir);
					 
	assign tmp = (!en)?(out):
					 (isUp)?(out-1):(out+1);
endmodule