usb_ioblk.v 3.42 KB
//**************************************************************************************
//
//	Model Name	: usb_ioblk.v
//	Revision	: $Revision: 1.2 $
//	Date		: $Date: 2002/10/11 23:52:58 $
//	Author		: Bill Saperstein
//	Description	: USB interface block to xcvr's
//
//**************************************************************************************


//**************************************************************************************
// Module Definition
//**************************************************************************************
`timescale 1ps / 1ps 
module usb_ioblk
		(
	// Inputs
		usb_suspnd ,		// usb suspend
		usbxr_y1 ,		// usb receive data from transceiver
		usb_oe_n ,		// usb output enable from core
		usb_speed ,		// usb speed select from core
		usb_dpo ,		// positive input to differential driver	
		usb_dmo ,		// negative input to differential driver
	// Outputs
		usbxr_oen ,		// usb transceiver output enable
		usbxr_ien ,		// usb transceiver input enable
		usbxr_fl ,		// usb transceiver speed select
		usb_rcv , 		// usb qualified receive data to core
		usbxr_ose		// force SE0
		) ;


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

// Not Applicable

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

	input
		usb_suspnd, usbxr_y1, usb_oe_n, usb_speed , usb_dpo,
		usb_dmo ;

	output
		usbxr_oen, usbxr_ien, usbxr_ose, usbxr_fl, usb_rcv ;


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

// Not Applicable	

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

// Not Applicable

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

	// Define the qualification of input and output data with
	// usb_suspnd. when usb_suspnd is asserted, input data is "0"
	// and the input and output enables are deasserted

	// define assertion of SE0 when both usb_dpo and usb_dmo
	// are zero

	assign
		usb_rcv = usbxr_y1 & ~usb_suspnd ,
		usbxr_fl = ~usb_speed ,
		usbxr_oen = ~(usb_oe_n | usb_suspnd) ,
		usbxr_ien = usb_oe_n & ~usb_suspnd ,
		usbxr_ose = ~(usb_dpo | usb_dmo) ;

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

// Not Applicable

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

// Not Applicable

//**************************************************************************************
// End of Model
//**************************************************************************************
endmodule // usb_ioblk