OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [rtl/] [src_noc/] [header_flit.sv] - Diff between revs 54 and 56

Show entire file | Details | Blame | View Log

Rev 54 Rev 56
Line 27... Line 27...
 
 
/***************
/***************
*   header_flit_generator
*   header_flit_generator
***************/
***************/
 
 
module header_flit_generator
module header_flit_generator #(
import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
 
    parameter DATA_w = 9 // header flit can carry Optional data. The data will be placed after control data.  Fpay >= DATA_w + CTRL_BITS_w
    parameter DATA_w = 9 // header flit can carry Optional data. The data will be placed after control data.  Fpay >= DATA_w + CTRL_BITS_w
 
 
)(
)(
 
 
    flit_out,
    flit_out,
    src_e_addr_in,
    src_e_addr_in,
    dest_e_addr_in,
    dest_e_addr_in,
    destport_in,
    destport_in,
    class_in,
    class_in,
Line 45... Line 42...
    vc_num_in,
    vc_num_in,
    be_in,
    be_in,
    data_in
    data_in
);
);
 
 
 
        `NOC_CONF
 
 
    function integer log2;
    localparam    HDR_FLAG  =   2'b10;
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
/* verilator lint_off WIDTH */
 
    localparam
 
        Cw   =  (C>1)? log2(C): 1,
 
        HDR_FLAG  =   2'b10,
 
        BEw = (BYTE_EN)? log2(Fpay/8) : 1;
 
/* verilator lint_on WIDTH */
 
 
 
 
 
 
 
 
 
 
 
    localparam
    localparam
        Dw = (DATA_w==0)? 1 : DATA_w,
        Dw = (DATA_w==0)? 1 : DATA_w,
        DATA_LSB= MSB_BE+1,               DATA_MSB= (DATA_LSB + DATA_w)
        DATA_LSB= MSB_BE+1,               DATA_MSB= (DATA_LSB + DATA_w)
 
 
 
 
 
 
 
 
    output   [Fw-1  :   0] flit_out;
    output   [Fw-1  :   0] flit_out;
    input    [Cw-1  :   0] class_in;
    input    [Cw-1  :   0] class_in;
    input    [DAw-1 :   0] dest_e_addr_in;
    input    [DAw-1 :   0] dest_e_addr_in;
    input    [EAw-1 :   0] src_e_addr_in;
    input    [EAw-1 :   0] src_e_addr_in;
    input    [V-1   :   0] vc_num_in;
    input    [V-1   :   0] vc_num_in;
Line 129... Line 106...
        end
        end
    end
    end
    //synopsys  translate_on
    //synopsys  translate_on
    //synthesis translate_on
    //synthesis translate_on
 
 
 
 
endmodule
endmodule
 
 
 
 
 
module extract_header_flit_info # (
module extract_header_flit_info
    parameter NOC_ID=0,
                import pronoc_pkg::*;
 
#(
 
    parameter DATA_w = 0
    parameter DATA_w = 0
)(
)(
    //inputs
    //inputs
    flit_in,
    flit_in,
    flit_in_wr,
    flit_in_wr,
Line 154... Line 128...
    tail_flg_o,
    tail_flg_o,
    hdr_flg_o,
    hdr_flg_o,
    vc_num_o,
    vc_num_o,
    hdr_flit_wr_o,
    hdr_flit_wr_o,
    be_o
    be_o
 
 
);
);
 
 
 
        `NOC_CONF
 
 
    function integer log2;
 
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
    localparam
    localparam
        Cw = (C>1)? log2(C): 1,
 
        W = WEIGHTw,
        W = WEIGHTw,
        BEw = (BYTE_EN)? log2(Fpay/8) : 1;
        Dw = (DATA_w==0)? 1 : DATA_w,
 
        DATA_LSB= MSB_BE+1,               DATA_MSB= (DATA_LSB + DATA_w)
    localparam
        OFFSETw = DATA_MSB - DATA_LSB +1;
        Dw = (DATA_w==0)? 1 : DATA_w;
 
 
 
     localparam
 
 
 
        DATA_LSB= MSB_BE+1,               DATA_MSB= (DATA_LSB + DATA_w)
 
 
 
 
 
 
 
    localparam OFFSETw = DATA_MSB - DATA_LSB +1;
 
 
 
 
 
    input [Fw-1 : 0] flit_in;
    input [Fw-1 : 0] flit_in;
    input flit_in_wr;
    input flit_in_wr;
 
 
Line 265... Line 219...
/***********************************
/***********************************
*  flit_update
*  flit_update
*  update the header flit look ahead routing and output VC
*  update the header flit look ahead routing and output VC
**********************************/
**********************************/
 
 
module header_flit_update_lk_route_ovc
module header_flit_update_lk_route_ovc #(
                import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
 
    parameter P = 5
    parameter P = 5
)(
)
 
(
    flit_in ,
    flit_in ,
    flit_out,
    flit_out,
    vc_num_in,
    vc_num_in,
    lk_dest_all_in,
    lk_dest_all_in,
    assigned_ovc_num,
    assigned_ovc_num,
Line 282... Line 236...
    sel,
    sel,
    reset,
    reset,
    clk
    clk
);
);
 
 
 
        `NOC_CONF
 
 
    localparam
    localparam
        VDSTPw = V * DSTPw,
        VDSTPw = V * DSTPw,
        VV = V * V;
        VV = V * V;
 
 
 
 
 
 
 
 
    input [Fw-1 : 0]  flit_in;
    input [Fw-1 : 0]  flit_in;
    output reg [Fw-1 : 0]  flit_out;
    output reg [Fw-1 : 0]  flit_out;
    input [V-1 : 0]  vc_num_in;
    input [V-1 : 0]  vc_num_in;
    input [VDSTPw-1 : 0]  lk_dest_all_in;
    input [VDSTPw-1 : 0]  lk_dest_all_in;
    input                           reset,clk;
    input                           reset,clk;
Line 308... Line 260...
    wire [DSTPw-1 : 0]  lk_dest,dest_coded;
    wire [DSTPw-1 : 0]  lk_dest,dest_coded;
    wire [DSTPw-1 : 0]  lk_mux_out;
    wire [DSTPw-1 : 0]  lk_mux_out;
 
 
    pronoc_register #(.W(V)) reg1 (.in(vc_num_in), .out(vc_num_delayed), .reset(reset), .clk(clk));
    pronoc_register #(.W(V)) reg1 (.in(vc_num_in), .out(vc_num_delayed), .reset(reset), .clk(clk));
 
 
 
 
 
 
 
 
    /* verilator lint_off WIDTH */
    /* verilator lint_off WIDTH */
    assign hdr_flag = ( PCK_TYPE == "MULTI_FLIT")? flit_in[Fw-1]: 1'b1;
    assign hdr_flag = ( PCK_TYPE == "MULTI_FLIT")? flit_in[Fw-1]: 1'b1;
    /* verilator lint_on WIDTH */
    /* verilator lint_on WIDTH */
 
 
    onehot_mux_1D #(
    onehot_mux_1D #(
Line 410... Line 359...
 
 
/******************
/******************
 *  hdr_flit_weight_update
 *  hdr_flit_weight_update
 * ****************/
 * ****************/
 
 
module hdr_flit_weight_update
module hdr_flit_weight_update #(
                import pronoc_pkg::*;
    parameter NOC_ID = 0
(
) (
    new_weight,
    new_weight,
    flit_in,
    flit_in,
    flit_out
    flit_out
);
);
 
 
    function integer log2;
        `NOC_CONF
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
 
 
     localparam
 
 
 
        Cw = (C>1)? log2(C): 1;
 
 
 
 
 
    input [WEIGHTw-1 : 0] new_weight;
    input [WEIGHTw-1 : 0] new_weight;
    input [Fw-1 : 0] flit_in;
    input [Fw-1 : 0] flit_in;
    output [Fw-1 : 0] flit_out;
    output [Fw-1 : 0] flit_out;
 
 
 
 
 
 
  assign flit_out =  {flit_in[Fw-1 : WEIGHT_LSB+WEIGHTw ] ,new_weight, flit_in[WEIGHT_LSB-1 : 0] };
  assign flit_out =  {flit_in[Fw-1 : WEIGHT_LSB+WEIGHTw ] ,new_weight, flit_in[WEIGHT_LSB-1 : 0] };
 
 
 
 
endmodule
endmodule
 
 

powered by: WebSVN 2.1.0

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