OpenCores
URL https://opencores.org/ocsvn/openhmc/openhmc/trunk

Subversion Repositories openhmc

[/] [openhmc/] [trunk/] [openHMC/] [rtl/] [hmc_controller/] [rx/] [rx_lane_logic.v] - Diff between revs 11 and 15

Show entire file | Details | Blame | View Log

Rev 11 Rev 15
Line 59... Line 59...
    //----CONNECT
    //----CONNECT
    //----------------------------------
    //----------------------------------
    input   wire [LANE_DWIDTH-1:0]      scrambled_data_in,
    input   wire [LANE_DWIDTH-1:0]      scrambled_data_in,
    input   wire                        bit_slip,   //bit slip per lane
    input   wire                        bit_slip,   //bit slip per lane
    input   wire                        lane_polarity,
    input   wire                        lane_polarity,
 
    input   wire                        can_lock,
    output  wire [LANE_DWIDTH-1:0]      descrambled_data_out,
    output  wire [LANE_DWIDTH-1:0]      descrambled_data_out,
    output  wire                        descrambler_locked,
    output  wire                        descrambler_locked,
    input   wire                        descrambler_disable
    input   wire                        descrambler_disable
 
 
);
);
 
 
wire    [LANE_DWIDTH-1:0]       descrambled_data_out_tmp;
wire    [LANE_DWIDTH-1:0]       descrambled_data_out_tmp;
wire    [LANE_DWIDTH-1:0]       data_2_descrambler;
wire    [LANE_DWIDTH-1:0]       data_2_descrambler;
wire                            descrambler_locked_tmp;
wire                            descrambler_locked_tmp;
assign descrambler_locked       = descrambler_disable ? 1'b1 : descrambler_locked_tmp;
assign descrambler_locked       = descrambler_disable ? can_lock : descrambler_locked_tmp;
 
 
 
 
 
 
//=====================================================================================================
//=====================================================================================================
//-----------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------
Line 86... Line 87...
 
 
        `ifdef ASYNC_RES
        `ifdef ASYNC_RES
        always @(posedge clk or negedge res_n)  begin `else
        always @(posedge clk or negedge res_n)  begin `else
            always @(posedge clk)  begin `endif
            always @(posedge clk)  begin `endif
 
 
 
            `ifdef RESET_ALL
            if(!res_n) begin
            if(!res_n) begin
                scrambled_data_in_reg   <=  {LANE_DWIDTH{1'b0}};
                scrambled_data_in_reg   <=  {LANE_DWIDTH{1'b0}};
            end
            end else
            else begin
            `endif
 
            begin
                scrambled_data_in_reg   <= scrambled_data_in^{LANE_DWIDTH{lane_polarity}};
                scrambled_data_in_reg   <= scrambled_data_in^{LANE_DWIDTH{lane_polarity}};
            end
            end
        end
        end
 
 
        assign data_2_descrambler   = scrambled_data_in_reg;
        assign data_2_descrambler   = scrambled_data_in_reg;
Line 118... Line 121...
        .DWIDTH(LANE_DWIDTH),
        .DWIDTH(LANE_DWIDTH),
        .BITSLIP_SHIFT_RIGHT(BITSLIP_SHIFT_RIGHT)
        .BITSLIP_SHIFT_RIGHT(BITSLIP_SHIFT_RIGHT)
    ) descrambler_I (
    ) descrambler_I (
        .clk(clk),
        .clk(clk),
        .res_n(res_n),
        .res_n(res_n),
 
        .can_lock(can_lock),
        .bit_slip(bit_slip),
        .bit_slip(bit_slip),
        .locked(descrambler_locked_tmp),
        .locked(descrambler_locked_tmp),
        .data_in(data_2_descrambler),
        .data_in(data_2_descrambler),
        .data_out(descrambled_data_out_tmp)
        .data_out(descrambled_data_out_tmp)
    );
    );

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.