1 //**************************************************************************
\r
2 // *************************************************************************
\r
3 // * LATTICE SEMICONDUCTOR CONFIDENTIAL *
\r
4 // * PROPRIETARY NOTE *
\r
6 // * This software contains information confidential and proprietary *
\r
7 // * to Lattice Semiconductor Corporation. It shall not be reproduced *
\r
8 // * in whole or in part, or transferred to other documents, or disclosed *
\r
9 // * to third parties, or used for any purpose other than that for which *
\r
10 // * it was obtained, without the prior written consent of Lattice *
\r
11 // * Semiconductor Corporation. All rights reserved. *
\r
13 // *************************************************************************
\r
14 //**************************************************************************
\r
16 `timescale 1ns/100ps
\r
18 module rate_resolution (
\r
32 input [1:0] advertised_rate; // 00=10Mbps 01=100Mbps 10=1Gbps
\r
33 input [1:0] link_partner_rate;
\r
34 input [1:0] non_an_rate;
\r
36 output [1:0] operational_rate;
\r
37 reg [1:0] operational_rate;
\r
41 always @(gbe_mode or sgmii_mode or an_enable or advertised_rate or link_partner_rate or non_an_rate) begin
\r
43 operational_rate <= 2'b10; // 1Gbps
\r
46 if (an_enable) begin
\r
47 if (sgmii_mode) begin
\r
49 operational_rate <= advertised_rate;
\r
53 operational_rate <= link_partner_rate;
\r
57 // If auto-negotiation disabled, then this becomes active rate
\r
58 operational_rate <= non_an_rate;
\r