data/full_repos/permissive/407433468/PRJ0_FINAL/rtl/SC_posCOUNTER.v
data/verilator_xmls/126f95f9-23f3-4106-af12-b570b01f16c6.xml
module SC_posCOUNTER(

	SC_posCOUNTER_data_OutBUS,

	SC_posCOUNTER_CLOCK_50,
	SC_posCOUNTER_RESET_InHigh,
	SC_posCOUNTER_upcount_InLow
);



localparam posCOUNTER_DATAWIDTH = 3;



output		[posCOUNTER_DATAWIDTH-1:0]	SC_posCOUNTER_data_OutBUS;
input		SC_posCOUNTER_CLOCK_50;
input		SC_posCOUNTER_RESET_InHigh;
input		SC_posCOUNTER_upcount_InLow;




reg [posCOUNTER_DATAWIDTH-1:0] posCOUNTER_Register;
reg [posCOUNTER_DATAWIDTH-1:0] posCOUNTER_Signal;




always @(*)
begin
	if (SC_posCOUNTER_upcount_InLow == 1'b0)
		posCOUNTER_Signal = posCOUNTER_Register + 1'b1;
	else
		posCOUNTER_Signal = posCOUNTER_Register;
	end	

always @(posedge SC_posCOUNTER_CLOCK_50, posedge SC_posCOUNTER_RESET_InHigh)
begin
	if (SC_posCOUNTER_RESET_InHigh  == 1'b1)
		posCOUNTER_Register <= 0;
	else
		posCOUNTER_Register <= posCOUNTER_Signal;
end




assign SC_posCOUNTER_data_OutBUS = posCOUNTER_Register;

endmodule
module SC_posCOUNTER(

	SC_posCOUNTER_data_OutBUS,

	SC_posCOUNTER_CLOCK_50,
	SC_posCOUNTER_RESET_InHigh,
	SC_posCOUNTER_upcount_InLow
);




localparam posCOUNTER_DATAWIDTH = 3;



output		[posCOUNTER_DATAWIDTH-1:0]	SC_posCOUNTER_data_OutBUS;
input		SC_posCOUNTER_CLOCK_50;
input		SC_posCOUNTER_RESET_InHigh;
input		SC_posCOUNTER_upcount_InLow;




reg [posCOUNTER_DATAWIDTH-1:0] posCOUNTER_Register;
reg [posCOUNTER_DATAWIDTH-1:0] posCOUNTER_Signal;




always @(*)
begin
	if (SC_posCOUNTER_upcount_InLow == 1'b0)
		posCOUNTER_Signal = posCOUNTER_Register + 1'b1;
	else
		posCOUNTER_Signal = posCOUNTER_Register;
	end	

always @(posedge SC_posCOUNTER_CLOCK_50, posedge SC_posCOUNTER_RESET_InHigh)
begin
	if (SC_posCOUNTER_RESET_InHigh  == 1'b1)
		posCOUNTER_Register <= 0;
	else
		posCOUNTER_Register <= posCOUNTER_Signal;
end




assign SC_posCOUNTER_data_OutBUS = posCOUNTER_Register;

endmodule