AN 702: Interfacing a USB PHY to the Hard Processor System USB 2.0 OTG Controller

ID 683601
Date 9/22/2017
Public
Document Table of Contents

1.4.3. Connecting the Clock in the Top Level Design

The following example shows how to connect the FPGA clock to a Loan I/O when the USB PHY operates in input clock mode using an FPGA clock source from the SoC.

Add the following code snippets to your top-level design file, to connect the clock outputs to the loan I/O:

// top level module pin defines
// LOANIO10 = mac clock	
inout  wire       LOANIO10, 

// wire instances of the 3 loan IO buses from Platform Designer instance 
wire [66:0] loan_out;
wire [66:0] loan_oe;

// this synthesis keep directive is required in
// order to connect PLL clock outputs to the Loan IO
wire        usb_mac_clk_from_pll    /* synthesis keep */;

// make assignment of the clocks to the appropriate loan IO 
assign loan_out[10]   = usb_mac_clk_from_pll;
assign loan_oe[10]    = 1'b1;

// snippet of Qsys instantiation signal assignments
.hps_0_h2f_loan_io_in                  (),		 // hps_0_h2f_loan_io.in
.hps_0_h2f_loan_io_out                 (loan_out),	//                  .out
.hps_0_h2f_loan_io_oe                  (loan_oe),	 //                  .oe
.hps_io_0_hps_io_gpio_inst_LOANIO10    (LOANIO10),	// hps_io_gpio_inst_LOANIO10