Line 47... |
Line 47... |
// PART OF THIS FILE AT ALL TIMES.
|
// PART OF THIS FILE AT ALL TIMES.
|
//
|
//
|
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
// Project : Series-7 Integrated Block for PCI Express
|
// Project : Series-7 Integrated Block for PCI Express
|
// File : cl_a7pcie_x4_qpll_reset.v
|
// File : cl_a7pcie_x4_qpll_reset.v
|
// Version : 1.9
|
// Version : 1.10
|
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
// Filename : qpll_reset.v
|
// Filename : qpll_reset.v
|
// Description : QPLL Reset Module for 7 Series Transceiver
|
// Description : QPLL Reset Module for 7 Series Transceiver
|
// Version : 11.4
|
// Version : 11.4
|
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
Line 95... |
Line 95... |
output [ 3:0] QRST_FSM
|
output [ 3:0] QRST_FSM
|
|
|
);
|
);
|
|
|
//---------- Input Register ----------------------------
|
//---------- Input Register ----------------------------
|
reg mmcm_lock_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg mmcm_lock_reg1;
|
reg [PCIE_LANE-1:0] cplllock_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] cplllock_reg1;
|
reg [(PCIE_LANE-1)>>2:0]drp_done_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [(PCIE_LANE-1)>>2:0]drp_done_reg1;
|
reg [(PCIE_LANE-1)>>2:0]qplllock_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [(PCIE_LANE-1)>>2:0]qplllock_reg1;
|
reg [ 1:0] rate_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [ 1:0] rate_reg1;
|
reg [PCIE_LANE-1:0] qpllreset_in_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] qpllreset_in_reg1;
|
reg [PCIE_LANE-1:0] qpllpd_in_reg1;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] qpllpd_in_reg1;
|
|
|
reg mmcm_lock_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg mmcm_lock_reg2;
|
reg [PCIE_LANE-1:0] cplllock_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] cplllock_reg2;
|
reg [(PCIE_LANE-1)>>2:0]drp_done_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [(PCIE_LANE-1)>>2:0]drp_done_reg2;
|
reg [(PCIE_LANE-1)>>2:0]qplllock_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [(PCIE_LANE-1)>>2:0]qplllock_reg2;
|
reg [ 1:0] rate_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [ 1:0] rate_reg2;
|
reg [PCIE_LANE-1:0] qpllreset_in_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] qpllreset_in_reg2;
|
reg [PCIE_LANE-1:0] qpllpd_in_reg2;
|
(* ASYNC_REG = "TRUE", SHIFT_EXTRACT = "NO" *) reg [PCIE_LANE-1:0] qpllpd_in_reg2;
|
|
|
//---------- Output Register --------------------------
|
//---------- Output Register --------------------------
|
reg ovrd = 1'd0;
|
reg ovrd = 1'd0;
|
reg qpllreset = 1'd1;
|
reg qpllreset = 1'd1;
|
reg qpllpd = 1'd0;
|
reg qpllpd = 1'd0;
|
reg [ 3:0] fsm = 2;
|
reg [ 3:0] fsm = 2;
|
|
|
//---------- FSM ---------------------------------------
|
//---------- FSM ---------------------------------------
|
localparam FSM_IDLE = 0;
|
localparam FSM_IDLE = 1;
|
localparam FSM_WAIT_LOCK = 1;
|
localparam FSM_WAIT_LOCK = 2;
|
localparam FSM_MMCM_LOCK = 2;
|
localparam FSM_MMCM_LOCK = 3;
|
localparam FSM_DRP_START_NOM = 3;
|
localparam FSM_DRP_START_NOM = 4;
|
localparam FSM_DRP_DONE_NOM = 4;
|
localparam FSM_DRP_DONE_NOM = 5;
|
localparam FSM_QPLLLOCK = 5;
|
localparam FSM_QPLLLOCK = 6;
|
localparam FSM_DRP_START_OPT = 6;
|
localparam FSM_DRP_START_OPT = 7;
|
localparam FSM_DRP_DONE_OPT = 7;
|
localparam FSM_DRP_DONE_OPT = 8;
|
localparam FSM_QPLL_RESET = 8;
|
localparam FSM_QPLL_RESET = 9;
|
localparam FSM_QPLLLOCK2 = 9;
|
localparam FSM_QPLLLOCK2 = 10;
|
localparam FSM_QPLL_PDRESET = 10;
|
localparam FSM_QPLL_PDRESET = 11;
|
localparam FSM_QPLL_PD = 11;
|
localparam FSM_QPLL_PD = 12;
|
|
|
|
|
|
|
//---------- Input FF ----------------------------------------------------------
|
//---------- Input FF ----------------------------------------------------------
|
always @ (posedge QRST_CLK)
|
always @ (posedge QRST_CLK)
|