usb_hostio.v 3.02 KB
//**************************************************************************************
//
//	Model Name	: usb_hostio.v
//	Revision	: $Revision: 1.2 $
//	Date		: $Date: 2002/12/24 02:01:58 $
//	Author		: Bill Saperstein
//	Description	: USB bus filter to remove x's on bus
//
//**************************************************************************************


//**************************************************************************************
// Module Definition
//**************************************************************************************
`timescale 1ps / 1ps 
module usb_hostio
		(
	// Inputs
		oe ,		// output enable to transceiver
	// Bi-directionals
		t_p ,		// d+ on transceiver side
		t_m ,		// d- on transceiver side
		w_p ,		// d+ on wire side
		w_m 		// d- on wire side
		) ;


//**************************************************************************************
// Define Parameters (optional)
//**************************************************************************************

// Not Applicable

//**************************************************************************************
// Port Declarations
//**************************************************************************************

	input
		oe ;
	inout
		t_p, t_m, w_p, w_m ;


//**************************************************************************************
// Net Assignments and Declarations
//**************************************************************************************

// Not Applicable	

//**************************************************************************************
// Pre-Defined Module Instantiations
//**************************************************************************************

// Not Applicable

//**************************************************************************************
// Gate and Structural Declarations
//**************************************************************************************

	// define filter which removes x's on usb bus when host controller
	// is master

	assign
		w_p = oe ? (t_p === 1'bx) | (t_p === 1'bZ) | (t_p === 1'bz) ? 1'b0 :t_p : 'bz,
        	w_m = oe ? (t_m === 1'bx) | (t_m === 1'bZ) | (t_m === 1'bz) ? 1'b0 :t_m : 'bz,
 
        	t_p = oe ? 'bz : (w_p === 1'bx ) | (w_p === 1'bz) | (w_p === 1'bZ) ? 0 : w_p,
        	t_m = oe ? 'bz : (w_m === 1'bx ) | (w_m === 1'bz) | (w_m === 1'bZ) ? 0 : w_m;  

//**************************************************************************************
// Procedural Assignments
//**************************************************************************************

// Not Applicable

//**************************************************************************************
// Task and Function Definitions
//**************************************************************************************

// Not Applicable

//**************************************************************************************
// End of Model
//**************************************************************************************
endmodule // usb_hostio