data/full_repos/permissive/531279620/resource/src/cc_line.v
1: b"%Error: data/full_repos/permissive/531279620/resource/src/cc_line.v:78: Cannot find file containing module: 'IBUFDS'\n IBUFDS#(\n ^~~~~~\n        ... Looked in:\n             data/full_repos/permissive/531279620/resource/src,data/full_repos/permissive/531279620/IBUFDS\n             data/full_repos/permissive/531279620/resource/src,data/full_repos/permissive/531279620/IBUFDS.v\n             data/full_repos/permissive/531279620/resource/src,data/full_repos/permissive/531279620/IBUFDS.sv\n             IBUFDS\n             IBUFDS.v\n             IBUFDS.sv\n             obj_dir/IBUFDS\n             obj_dir/IBUFDS.v\n             obj_dir/IBUFDS.sv\n%Error: data/full_repos/permissive/531279620/resource/src/cc_line.v:88: Cannot find file containing module: 'IBUFDS'\n IBUFDS#(\n ^~~~~~\n%Error: Exiting due to 2 error(s)\n"
module cc_line#(
	parameter system_khz = 200000
)(
	
	input				nrst,
	input				clock,
	
	output				cc_din,
	input				cc_dout,
	
	input				cc_check,
	input				cc_io_ctrl,
	output				cc_lock,
	

	input				phy_in_cc1_p,
	input				phy_in_cc1_n,
	input				phy_in_cc2_p,
	input				phy_in_cc2_n,
	
	output				phy_out_en,
	output				phy_out_cc1,
	output				phy_out_cc2,
	
	output				phy_debug_cc1,
	output				phy_debug_cc2
);
	
	localparam [23 : 0]	ten_ms = (system_khz / 100) - 1;
	
	reg		[1 : 0]		cc_msel;


	

	assign phy_out_cc1 = cc_msel[0] & cc_dout & cc_io_ctrl;
	assign phy_out_cc2 = cc_msel[1] & cc_dout & cc_io_ctrl;
	assign phy_out_en = !cc_io_ctrl;
	









			






	
	wire	cc1;
	wire	cc2;
	
	assign phy_debug_cc1 = cc1;
	assign phy_debug_cc2 = cc2;
	
	assign cc_din =  (cc_io_ctrl) ? 1'b1 : (cc1 | cc2);
	
	IBUFDS#(
		.DIFF_TERM		("FALSE"),
		.IBUF_LOW_PWR	("FALSE"),
		.IOSTANDARD		("LVDS_25")
	)IBUFDS_cc1_inst(
		.O		(cc1),
		.I		(phy_in_cc1_p),
		.IB		(phy_in_cc1_n)
	);
	
	IBUFDS#(
		.DIFF_TERM		("FALSE"),
		.IBUF_LOW_PWR	("FALSE"),
		.IOSTANDARD		("LVDS_25")
	)IBUFDS_cc2_inst(
		.O		(cc2),
		.I		(phy_in_cc2_p),
		.IB		(phy_in_cc2_n)
	);
	
	always@(posedge clock)begin
		if(!nrst)begin
			cc_msel <= 2'b00;
		end else if(!cc_io_ctrl & cc_check)begin
			cc_msel <= {cc2, cc1} & {2{cc2 ^ cc1}};
		end
	end
	
	reg		cc_lock_r;
	
	
	assign cc_lock = cc_lock_r;
	
	always@(posedge clock)begin
		if(!nrst)begin
			cc_lock_r <= 1'b0;
		end else begin
			cc_lock_r <= cc2 ^ cc1;
		end
	end
	
endmodule
module cc_line#(
	parameter system_khz = 200000
)(
	
	input				nrst,
	input				clock,
	
	output				cc_din,
	input				cc_dout,
	
	input				cc_check,
	input				cc_io_ctrl,
	output				cc_lock,
	

	input				phy_in_cc1_p,
	input				phy_in_cc1_n,
	input				phy_in_cc2_p,
	input				phy_in_cc2_n,
	
	output				phy_out_en,
	output				phy_out_cc1,
	output				phy_out_cc2,
	
	output				phy_debug_cc1,
	output				phy_debug_cc2
);

	
	localparam [23 : 0]	ten_ms = (system_khz / 100) - 1;
	
	reg		[1 : 0]		cc_msel;


	

	assign phy_out_cc1 = cc_msel[0] & cc_dout & cc_io_ctrl;
	assign phy_out_cc2 = cc_msel[1] & cc_dout & cc_io_ctrl;
	assign phy_out_en = !cc_io_ctrl;
	









			






	
	wire	cc1;
	wire	cc2;
	
	assign phy_debug_cc1 = cc1;
	assign phy_debug_cc2 = cc2;
	
	assign cc_din =  (cc_io_ctrl) ? 1'b1 : (cc1 | cc2);
	
	IBUFDS#(
		.DIFF_TERM		("FALSE"),
		.IBUF_LOW_PWR	("FALSE"),
		.IOSTANDARD		("LVDS_25")
	)IBUFDS_cc1_inst(
		.O		(cc1),
		.I		(phy_in_cc1_p),
		.IB		(phy_in_cc1_n)
	);
	
	IBUFDS#(
		.DIFF_TERM		("FALSE"),
		.IBUF_LOW_PWR	("FALSE"),
		.IOSTANDARD		("LVDS_25")
	)IBUFDS_cc2_inst(
		.O		(cc2),
		.I		(phy_in_cc2_p),
		.IB		(phy_in_cc2_n)
	);
	
	always@(posedge clock)begin
		if(!nrst)begin
			cc_msel <= 2'b00;
		end else if(!cc_io_ctrl & cc_check)begin
			cc_msel <= {cc2, cc1} & {2{cc2 ^ cc1}};
		end
	end
	
	reg		cc_lock_r;
	
	
	assign cc_lock = cc_lock_r;
	
	always@(posedge clock)begin
		if(!nrst)begin
			cc_lock_r <= 1'b0;
		end else begin
			cc_lock_r <= cc2 ^ cc1;
		end
	end
	
endmodule