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/] [ss_allocator.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:  ss_allocator.v
**      File:  ss_allocator.v
**      Date:2016-06-19
**      Date:2016-06-19
**
**
Line 45... Line 45...
                flit_in_wr_all,
                flit_in_wr_all,
        flit_in_all,
        flit_in_all,
        any_ovc_granted_in_outport_all ,
        any_ovc_granted_in_outport_all ,
        any_ivc_sw_request_granted_all ,
        any_ivc_sw_request_granted_all ,
        ovc_avalable_all,
        ovc_avalable_all,
        assigned_ovc_not_full_all,
       // assigned_ovc_not_full_all,
        ivc_request_all,
       // dest_port_encoded_all,
        dest_port_encoded_all,
       // assigned_ovc_num_all,
        assigned_ovc_num_all,
       // ovc_is_assigned_all,
        ovc_is_assigned_all,
        ivc_info,
 
 
        ssa_ctrl_o
        ssa_ctrl_o
   );
   );
 
 
 
 
    localparam  PV          =   V   *   P,
    localparam  PV          =   V   *   P,
Line 83... Line 82...
    input   [PFw-1          :   0]  flit_in_all;
    input   [PFw-1          :   0]  flit_in_all;
    input   [P-1            :   0]  flit_in_wr_all;
    input   [P-1            :   0]  flit_in_wr_all;
    input   [P-1            :   0]  any_ovc_granted_in_outport_all;
    input   [P-1            :   0]  any_ovc_granted_in_outport_all;
    input   [P-1            :   0]  any_ivc_sw_request_granted_all;
    input   [P-1            :   0]  any_ivc_sw_request_granted_all;
    input   [PV-1           :   0]  ovc_avalable_all;
    input   [PV-1           :   0]  ovc_avalable_all;
    input   [PV-1           :   0]  assigned_ovc_not_full_all;
 
    input   [PV-1           :   0]  ivc_request_all;
 
    input   [PVDSTPw-1      :   0]  dest_port_encoded_all;
 
    input   [PVV-1          :   0]  assigned_ovc_num_all;
 
    input   [PV-1           :   0]  ovc_is_assigned_all;
 
    input   reset,clk;
    input   reset,clk;
 
    input   ivc_info_t   ivc_info   [P-1 : 0][V-1 : 0];
    output  ssa_ctrl_t   ssa_ctrl_o [P-1 : 0];
    output  ssa_ctrl_t   ssa_ctrl_o [P-1 : 0];
 
 
 
 
    wire   [PV-1      :   0] ovc_allocated_all;
    wire   [PV-1      :   0] ovc_allocated_all;
    wire   [PV-1      :   0] ovc_released_all;
    wire   [PV-1      :   0] ovc_released_all;
Line 100... Line 97...
    wire   [PV-1      :   0] ivc_num_getting_sw_grant_all;
    wire   [PV-1      :   0] ivc_num_getting_sw_grant_all;
    wire   [PV-1      :   0] ivc_num_getting_ovc_grant_all;
    wire   [PV-1      :   0] ivc_num_getting_ovc_grant_all;
    wire   [PV-1      :   0] ivc_reset_all;
    wire   [PV-1      :   0] ivc_reset_all;
    wire   [PV-1      :   0] single_flit_pck_all,ovc_single_flit_pck_all;
    wire   [PV-1      :   0] single_flit_pck_all,ovc_single_flit_pck_all;
    wire   [PV-1      :   0] decreased_credit_in_ss_ovc_all;
    wire   [PV-1      :   0] decreased_credit_in_ss_ovc_all;
    reg    [P-1       :   0] ssa_flit_wr_all;
    wire   [P-1       :   0] ssa_flit_wr_all;
 
 
 
 
    wire [PV-1   :   0] any_ovc_granted_in_ss_port;
    wire [PV-1   :   0] any_ovc_granted_in_ss_port;
    wire [PV-1   :   0] ovc_avalable_in_ss_port;
    wire [PV-1   :   0] ovc_avalable_in_ss_port;
    wire [PV-1   :   0] ovc_allocated_in_ss_port;
    wire [PV-1   :   0] ovc_allocated_in_ss_port;
    wire [PV-1   :   0] ovc_released_in_ss_port;
    wire [PV-1   :   0] ovc_released_in_ss_port;
    wire [PV-1   :   0] decreased_credit_in_ss_ovc;
    wire [PV-1   :   0] decreased_credit_in_ss_ovc;
    wire [PV-1   :   0] ivc_num_getting_sw_grantin_SS_all;
    wire [PV-1   :   0] ivc_num_getting_sw_grantin_SS_all;
 
 
 
    wire [PV-1       : 0] ivc_request_all;
 
    wire [PV-1       : 0] assigned_ovc_not_full_all;
 
    wire [PVDSTPw-1  : 0] dest_port_encoded_all;
 
    wire [PVV-1      : 0] assigned_ovc_num_all;
 
    wire [PV-1       : 0] ovc_is_assigned_all;
 
 
        genvar i;
        genvar i;
    // there is no ssa for local port in 5 and 3 port routers
    // there is no ssa for local port in 5 and 3 port routers
    generate
    generate
    for (i=0; i
    for (i=0; i
 
 
        localparam  C_PORT  = i/V;
        localparam  C_PORT  = i/V;
        localparam  SS_PORT = strieght_port (P,C_PORT);
        localparam  SS_PORT = strieght_port (P,C_PORT);
 
 
 
        assign ivc_request_all[i] = ivc_info[C_PORT][i%V].ivc_req;
 
        assign assigned_ovc_not_full_all[i] = ivc_info[C_PORT][i%V].assigned_ovc_not_full;
 
        assign dest_port_encoded_all [(i+1)*DSTPw-1 : i*DSTPw] = ivc_info[C_PORT][i%V].dest_port_encoded;
 
        assign assigned_ovc_num_all[(i+1)*V-1 : i*V] = ivc_info[C_PORT][i%V].assigned_ovc_num;
 
        assign ovc_is_assigned_all[i] = ivc_info[C_PORT][i%V].ovc_is_assigned;
 
 
 
 
 
 
        if (SS_PORT == DISABLED)begin : no_prefrable
        if (SS_PORT == DISABLED)begin : no_prefrable
 
 
 
 
            assign   ovc_allocated_all[i]= 1'b0;
            assign   ovc_allocated_all[i]= 1'b0;
            assign   ovc_released_all [i]= 1'b0;
            assign   ovc_released_all [i]= 1'b0;
Line 187... Line 196...
        end//ssa
        end//ssa
    end// vc_loop
    end// vc_loop
 
 
 
 
    for(i=0;i
    for(i=0;i
`ifdef SYNC_RESET_MODE
 
        always @ (posedge clk )begin
 
`else
        pronoc_register #(.W(1)) reg1 (
        always @ (posedge clk or posedge reset)begin
                        .in(|ivc_num_getting_sw_grantin_SS_all[(i+1)*V-1    :   i*V] ),
`endif
                        .out(ssa_flit_wr_all[i]),
            if(reset)begin
                        .reset(reset),
                    ssa_flit_wr_all[i]<=1'b0;
                        .clk(clk));
            end else begin
 
                    ssa_flit_wr_all[i]<= |ivc_num_getting_sw_grantin_SS_all[(i+1)*V-1    :   i*V];
 
            end //reset
 
        end// always
 
 
 
 
 
 
 
            assign ssa_ctrl_o[i].ovc_is_allocated =ovc_allocated_all [(i+1)*V-1  : i*V];
            assign ssa_ctrl_o[i].ovc_is_allocated =ovc_allocated_all [(i+1)*V-1  : i*V];
            assign ssa_ctrl_o[i].ovc_is_released = ovc_released_all  [(i+1)*V-1  : i*V];
            assign ssa_ctrl_o[i].ovc_is_released = ovc_released_all  [(i+1)*V-1  : i*V];

powered by: WebSVN 2.1.0

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