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/] [comb_nonspec.sv] - Diff between revs 54 and 56

Show entire file | Details | Blame | View Log

Rev 54 Rev 56
Line 27... Line 27...
**      the beginning of switch allocation (comb-nonspec).
**      the beginning of switch allocation (comb-nonspec).
**
**
***********************************************************************/
***********************************************************************/
 
 
 
 
module comb_nonspec_allocator
module comb_nonspec_allocator # (
   import pronoc_pkg::*;
    parameter NOC_ID = 0,
#(
 
    parameter P = 5 //port number
    parameter P = 5 //port number
)
)(
(
 
    //VC allocator
    //VC allocator
    //input
    //input
    dest_port_all,         // from input port
    dest_port_all,         // from input port
    masked_ovc_request_all,
    masked_ovc_request_all,
    pck_is_single_flit_all,
    pck_is_single_flit_all,
Line 64... Line 62...
    clk,
    clk,
    reset
    reset
 
 
);
);
 
 
 
        `NOC_CONF
 
 
    localparam
    localparam
        P_1 = (SELF_LOOP_EN == "NO")? P-1 : P,
        P_1 = (SELF_LOOP_EN == "NO")? P-1 : P,
        PV = V * P,
        PV = V * P,
        VV = V * V,
        VV = V * V,
        VP_1 = V * P_1,
        VP_1 = V * P_1,
Line 90... Line 90...
    output [PP_1-1 : 0] granted_dest_port_all;
    output [PP_1-1 : 0] granted_dest_port_all;
    output [PV-1 : 0] ivc_num_getting_sw_grant;
    output [PV-1 : 0] ivc_num_getting_sw_grant;
    output [P-1 : 0] any_ivc_sw_request_granted_all;
    output [P-1 : 0] any_ivc_sw_request_granted_all;
    output [P-1 : 0] any_ovc_granted_in_outport_all;
    output [P-1 : 0] any_ovc_granted_in_outport_all;
    output [PV-1 : 0] nonspec_first_arbiter_granted_ivc_all;
    output [PV-1 : 0] nonspec_first_arbiter_granted_ivc_all;
  //  input  [PVP_1-1 : 0] lk_destination_all;
 
    input  clk,reset;
    input  clk,reset;
    input  [PV-1 : 0] vc_weight_is_consumed_all;
    input  [PV-1 : 0] vc_weight_is_consumed_all;
    input  [P-1 : 0] iport_weight_is_consumed_all;
    input  [P-1 : 0] iport_weight_is_consumed_all;
    output   [P-1 : 0] granted_dst_is_from_a_single_flit_pck;
    output   [P-1 : 0] granted_dst_is_from_a_single_flit_pck;
 
 
Line 103... Line 103...
    //internal wires switch allocator
    //internal wires switch allocator
    wire   [PV-1 : 0] first_arbiter_granted_ivc_all;
    wire   [PV-1 : 0] first_arbiter_granted_ivc_all;
    wire   [PV-1 : 0] ivc_request_masked_all;
    wire   [PV-1 : 0] ivc_request_masked_all;
    wire   [P-1 : 0] any_cand_ovc_exsit;
    wire   [P-1 : 0] any_cand_ovc_exsit;
 
 
 
 
    wire  [PV-1 : 0] ivc_request_all;
    wire  [PV-1 : 0] ivc_request_all;
    wire  [PV-1 : 0] ovc_is_assigned_all;
    wire  [PV-1 : 0] ovc_is_assigned_all;
    wire  [PV-1 : 0] assigned_ovc_not_full_all;
    wire  [PV-1 : 0] assigned_ovc_not_full_all;
 
 
 
 
    assign nonspec_first_arbiter_granted_ivc_all = first_arbiter_granted_ivc_all;
    assign nonspec_first_arbiter_granted_ivc_all = first_arbiter_granted_ivc_all;
 
 
 
 
    //nonspeculative switch allocator
    //nonspeculative switch allocator
    nonspec_sw_alloc #(
    nonspec_sw_alloc #(
        .V(V),
        .V(V),
        .P(P),
        .P(P),
        .FIRST_ARBITER_EXT_P_EN(FIRST_ARBITER_EXT_P_EN),
        .FIRST_ARBITER_EXT_P_EN(FIRST_ARBITER_EXT_P_EN),
Line 137... Line 134...
        .any_ovc_granted_all (any_ovc_granted_in_outport_all),
        .any_ovc_granted_all (any_ovc_granted_in_outport_all),
        .vc_weight_is_consumed_all(vc_weight_is_consumed_all),
        .vc_weight_is_consumed_all(vc_weight_is_consumed_all),
        .iport_weight_is_consumed_all(iport_weight_is_consumed_all),
        .iport_weight_is_consumed_all(iport_weight_is_consumed_all),
        .clk (clk),
        .clk (clk),
        .reset (reset)
        .reset (reset)
 
 
    );
    );
 
 
 
 
 
 
    wire   [PVV-1 : 0] masked_ovc_request_all;
    wire   [PVV-1 : 0] masked_ovc_request_all;
    wire   [V-1 : 0] masked_non_assigned_request    [PV-1 : 0] ;
    wire   [V-1 : 0] masked_non_assigned_request    [PV-1 : 0] ;
    wire   [PV-1 : 0] masked_assigned_request;
    wire   [PV-1 : 0] masked_assigned_request;
    wire   [PV-1 : 0] assigned_ovc_request_all ;
    wire   [PV-1 : 0] assigned_ovc_request_all ;
    wire   [VV-1 : 0] masked_candidate_ovc_per_port    [P-1 : 0] ;
    wire   [VV-1 : 0] masked_candidate_ovc_per_port    [P-1 : 0] ;
Line 161... Line 155...
    wire   [V-1 : 0]  vc_pririty [PV-1 : 0] ;
    wire   [V-1 : 0]  vc_pririty [PV-1 : 0] ;
 
 
    assign assigned_ovc_request_all      =   ivc_request_all &   ovc_is_assigned_all;
    assign assigned_ovc_request_all      =   ivc_request_all &   ovc_is_assigned_all;
 
 
    genvar i,j;
    genvar i,j;
 
 
 
 
    generate
    generate
    // IVC loop
    // IVC loop
    for(i=0;i< PV;i=i+1) begin :total_vc_loop
    for(i=0;i< PV;i=i+1) begin :total_vc_loop
 
 
 
 
 
 
        // mask unavailable ovc from requests
        // mask unavailable ovc from requests
        assign masked_non_assigned_request    [i]  =    masked_ovc_request_all [(i+1)*V-1 : i*V ];
        assign masked_non_assigned_request    [i]  =    masked_ovc_request_all [(i+1)*V-1 : i*V ];
        assign masked_assigned_request        [i]  =    assigned_ovc_not_full_all [i] & assigned_ovc_request_all [i];
        assign masked_assigned_request        [i]  =    assigned_ovc_not_full_all [i] & assigned_ovc_request_all [i];
 
 
        // summing assigned and non-assigned VC requests
        // summing assigned and non-assigned VC requests
        assign summ_in[i] ={masked_non_assigned_request    [i],masked_assigned_request        [i]};
        assign summ_in[i] ={masked_non_assigned_request    [i],masked_assigned_request        [i]};
        assign ivc_request_masked_all[i] = | summ_in[i];
        assign ivc_request_masked_all[i] = | summ_in[i];
 
 
 
 
        //first level arbiter to candidate only one OVC
        //first level arbiter to candidate only one OVC
      //  if(VC_ARBITER_TYPE=="RRA")begin :round_robin
      //  if(VC_ARBITER_TYPE=="RRA")begin :round_robin
 
 
            arbiter #(
            arbiter #(
                .ARBITER_WIDTH(V)
                .ARBITER_WIDTH(V)

powered by: WebSVN 2.1.0

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