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 48 and 54

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 48 Rev 54
Line 1... Line 1...
`timescale 1ns / 1ps
`include "pronoc_def.v"
 
 
/**********************************************************************
/**********************************************************************
**  File:  header_flit.sv
**  File:  header_flit.sv
**  Date:2017-07-11
**  Date:2017-07-11
**
**
**  Copyright (C) 2014-2017  Alireza Monemi
**  Copyright (C) 2014-2017  Alireza Monemi
Line 76... Line 75...
 
 
 
 
 
 
    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    [EAw-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;
    input    [WEIGHTw-1 :   0] weight_in;
    input    [WEIGHTw-1 :   0] weight_in;
    input    [DSTPw-1   :   0] destport_in;
    input    [DSTPw-1   :   0] destport_in;
    input    [BEw-1 : 0] be_in;
    input    [BEw-1 : 0] be_in;
Line 190... Line 189...
 
 
    input [Fw-1 : 0] flit_in;
    input [Fw-1 : 0] flit_in;
    input flit_in_wr;
    input flit_in_wr;
 
 
    output [EAw-1 : 0] src_e_addr_o;
    output [EAw-1 : 0] src_e_addr_o;
    output [EAw-1 : 0] dest_e_addr_o;
    output [DAw-1 : 0] dest_e_addr_o;
    output [DSTPw-1 : 0] destport_o;
    output [DSTPw-1 : 0] destport_o;
    output [Cw-1 : 0] class_o;
    output [Cw-1 : 0] class_o;
    output [W-1  : 0] weight_o;
    output [W-1  : 0] weight_o;
    output tail_flg_o;
    output tail_flg_o;
    output hdr_flg_o;
    output hdr_flg_o;
Line 289... Line 288...
    localparam
    localparam
        VDSTPw = V * DSTPw,
        VDSTPw = V * DSTPw,
        VV = V * V;
        VV = V * V;
 
 
 
 
     localparam
 
        E_SRC_LSB =0,                   E_SRC_MSB = E_SRC_LSB + EAw-1,
 
        E_DST_LSB = E_SRC_MSB +1,       E_DST_MSB = E_DST_LSB + EAw-1,
 
        DST_P_LSB = E_DST_MSB + 1,      DST_P_MSB = DST_P_LSB + DSTPw-1;
 
 
 
 
 
    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;
Line 306... Line 301...
    input [V-1 : 0]  sel;
    input [V-1 : 0]  sel;
    input                    any_ivc_sw_request_granted;
    input                    any_ivc_sw_request_granted;
    input [DSTPw-1 : 0]  lk_dest_not_registered;
    input [DSTPw-1 : 0]  lk_dest_not_registered;
 
 
    wire hdr_flag;
    wire hdr_flag;
    reg [V-1 : 0]  vc_num_delayed;
    logic [V-1 : 0]  vc_num_delayed;
    wire [V-1 : 0]  ovc_num;
    wire [V-1 : 0]  ovc_num;
    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));
 
 
 
 
 
 
 
 
`ifdef SYNC_RESET_MODE
 
    always @ (posedge clk )begin
 
`else
 
    always @ (posedge clk or posedge reset)begin
 
`endif
 
        if(reset) begin
 
            vc_num_delayed                  <= {V{1'b0}};
 
            //assigned_ovc_num_delayed  <=  {VV{1'b0}};
 
        end else begin
 
            vc_num_delayed<= vc_num_in;
 
            //assigned_ovc_num_delayed  <=assigned_ovc_num;
 
        end
 
    end
 
    /* 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 344... Line 330...
 
 
    generate
    generate
    /* verilator lint_off WIDTH */
    /* verilator lint_off WIDTH */
    if( SSA_EN == "YES" ) begin : predict // bypass the lk fifo when no ivc is granted
    if( SSA_EN == "YES" ) begin : predict // bypass the lk fifo when no ivc is granted
    /* verilator lint_on WIDTH */
    /* verilator lint_on WIDTH */
        reg ivc_any_delayed;
        logic ivc_any_delayed;
 
 
`ifdef SYNC_RESET_MODE
        pronoc_register #(.W(1)) reg2 (.in(any_ivc_sw_request_granted ), .out(ivc_any_delayed), .reset(reset), .clk(clk));
        always @ (posedge clk )begin
 
`else
 
        always @ (posedge clk or posedge reset)begin
 
`endif
 
            if(reset) begin
 
                ivc_any_delayed <= 1'b0;
 
            end else begin
 
                ivc_any_delayed <= any_ivc_sw_request_granted;
 
            end
 
        end
 
 
 
        assign lk_dest = (ivc_any_delayed == 1'b0)? lk_dest_not_registered : lk_mux_out;
        assign lk_dest = (ivc_any_delayed == 1'b0)? lk_dest_not_registered : lk_mux_out;
 
 
    end else begin : no_predict
    end else begin : no_predict
        assign lk_dest =lk_mux_out;
        assign lk_dest =lk_mux_out;

powered by: WebSVN 2.1.0

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