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 55 and 56

Show entire file | Details | Blame | View Log

Rev 55 Rev 56
Line 32... Line 32...
**         The ss ports for each input potrt must be different with the rest
**         The ss ports for each input potrt must be different with the rest
**         This result in one clock cycle latency
**         This result in one clock cycle latency
***************************************/
***************************************/
 
 
 
 
module  ss_allocator
module  ss_allocator #(
import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
 
    parameter P = 5
    parameter P = 5
   )
)(
   (
 
                clk,
                clk,
                reset,
                reset,
                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 ,
Line 55... Line 53...
        ovc_info,
        ovc_info,
        ssa_ctrl_o
        ssa_ctrl_o
   );
   );
 
 
 
 
 
        `NOC_CONF
 
 
    localparam  PV          =   V   *   P,
    localparam  PV          =   V   *   P,
                        VV                      =   V * V,
                        VV                      =   V * V,
                PVV         =   PV  *   V,
                PVV         =   PV  *   V,
                PVDSTPw= PV * DSTPw,
                PVDSTPw= PV * DSTPw,
                PFw         =   P   *   Fw;
                PFw         =   P   *   Fw;
 
 
    localparam    DISABLED = P;
    localparam    DISABLED = P;
 
 
    //MESH, TORUS Topology p=5
 
    localparam    EAST    =   1,
 
                  NORTH   =   2,
 
                  WEST    =   3,
 
                  SOUTH   =   4;
 
 
 
 
 
 
 
    //LINE RING Topology p=3
 
    localparam  FORWARD =  1,
 
                BACKWARD=  2;
 
 
 
 
 
 
 
 
 
    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;
Line 165... Line 151...
            assign   ovc_single_flit_pck_all [i] =  single_flit_pck_all[(SS_PORT*V)+(i%V)];
            assign   ovc_single_flit_pck_all [i] =  single_flit_pck_all[(SS_PORT*V)+(i%V)];
 
 
 
 
 
 
            ssa_per_vc #(
            ssa_per_vc #(
 
                .NOC_ID(NOC_ID),
                .SS_PORT(SS_PORT),
                .SS_PORT(SS_PORT),
                .V_GLOBAL(i),
                .V_GLOBAL(i),
                .P(P)
                .P(P)
            )
            )
            the_ssa_per_vc
            the_ssa_per_vc
Line 245... Line 232...
 
 
/*************
/*************
 *  ssa_per_vc
 *  ssa_per_vc
 * ***********/
 * ***********/
 
 
module ssa_per_vc
module ssa_per_vc #(
    import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
    parameter P=5,
    parameter SS_PORT = "WEST",
    parameter SS_PORT = "WEST",
    parameter V_GLOBAL = 1,
    parameter V_GLOBAL = 1
    parameter P=5
 
    )
    )
    (
    (
        flit_in_wr,
        flit_in_wr,
        flit_in,
        flit_in,
        any_ovc_granted_in_ss_port,
        any_ovc_granted_in_ss_port,
Line 282... Line 268...
 
 
 
 
   );
   );
 
 
 
 
 
    `NOC_CONF
 
 
 
 
    //header packet filds width
    //header packet filds width
    localparam  SW_LOC             =V_GLOBAL/V,
    localparam  SW_LOC             =V_GLOBAL/V,
                V_LOCAL            =V_GLOBAL%V;
                V_LOCAL            =V_GLOBAL%V;
 
 
    /* verilator lint_off WIDTH */
    /* verilator lint_off WIDTH */
    localparam SSA_EN = ((TOPOLOGY== "MESH" || TOPOLOGY == "TORUS") && (ROUTE_TYPE == "FULL_ADAPTIVE") && (SS_PORT==2 || SS_PORT == 4) && ((1<
    localparam SSA_EN_IN_PORT = ((TOPOLOGY== "MESH" || TOPOLOGY == "TORUS") && (ROUTE_TYPE == "FULL_ADAPTIVE") && (SS_PORT==2 || SS_PORT == 4) && ((1<
    /* verilator lint_on WIDTH */
    /* verilator lint_on WIDTH */
 
 
 
 
 
 
    input   [Fw-1          :   0]  flit_in;
    input   [Fw-1          :   0]  flit_in;
Line 349... Line 338...
 
 
    wire   condition_1_2_valid;
    wire   condition_1_2_valid;
    wire [DAw-1 : 0]  dest_e_addr_in;
    wire [DAw-1 : 0]  dest_e_addr_in;
 
 
    extract_header_flit_info #(
    extract_header_flit_info #(
 
        .NOC_ID(NOC_ID),
        .DATA_w(0)
        .DATA_w(0)
       )
    ) extractor (
       extractor
 
       (
 
        .flit_in(flit_in),
        .flit_in(flit_in),
        .flit_in_wr(flit_in_wr),
        .flit_in_wr(flit_in_wr),
        .class_o(),
        .class_o(),
        .destport_o(destport_in_encoded),
        .destport_o(destport_in_encoded),
        .src_e_addr_o( ),
        .src_e_addr_o( ),
Line 378... Line 366...
 
 
//check destination port is ss
//check destination port is ss
wire ss_port_hdr_flit, ss_port_nonhdr_flit;
wire ss_port_hdr_flit, ss_port_nonhdr_flit;
 
 
ssa_check_destport #(
ssa_check_destport #(
 
    .NOC_ID(NOC_ID),
    .SW_LOC(SW_LOC),
    .SW_LOC(SW_LOC),
    .P(P),
    .P(P),
    .SS_PORT(SS_PORT)
    .SS_PORT(SS_PORT)
)
)
 check_destport
 check_destport
Line 415... Line 404...
 
 
wire ssa_permited_by_iport;
wire ssa_permited_by_iport;
 
 
 
 
generate
generate
if (SSA_EN) begin : enable
if (SSA_EN_IN_PORT) begin : enable
    assign ssa_permited_by_iport = ss_ovc_ready & (~ivc_request) & condition_1_2_valid;
    assign ssa_permited_by_iport = ss_ovc_ready & (~ivc_request) & condition_1_2_valid;
end else begin : disabled
end else begin : disabled
    assign ssa_permited_by_iport = 1'b0;
    assign ssa_permited_by_iport = 1'b0;
end
end
 
 
Line 453... Line 442...
 
 
endmodule
endmodule
 
 
 
 
 
 
module ssa_check_destport
module ssa_check_destport #(
        import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
 
    parameter SW_LOC = 0,
    parameter SW_LOC = 0,
    parameter P=5,
    parameter P=5,
    parameter SS_PORT=0
    parameter SS_PORT=0
)(
)
 
        (
    destport_encoded, //non header flit dest port
    destport_encoded, //non header flit dest port
    destport_in_encoded, // header flit packet dest port
    destport_in_encoded, // header flit packet dest port
    ss_port_hdr_flit, // asserted if the header incomming flit goes to ss port
    ss_port_hdr_flit, // asserted if the header incomming flit goes to ss port
    ss_port_nonhdr_flit, // assert if the body or tail incomming flit goes to ss port
    ss_port_nonhdr_flit, // assert if the body or tail incomming flit goes to ss port
    dest_e_addr_in,
    dest_e_addr_in,
Line 476... Line 465...
    hdr_flg
    hdr_flg
//synopsys  translate_on
//synopsys  translate_on
//synthesis translate_on
//synthesis translate_on
);
);
 
 
 
 
 
        `NOC_CONF
 
 
 
 
 
 
 
 
//synthesis translate_off
//synthesis translate_off
//synopsys  translate_off
//synopsys  translate_off
    input clk,   ivc_num_getting_sw_grant, hdr_flg;
    input clk,   ivc_num_getting_sw_grant, hdr_flg;
//synopsys  translate_on
//synopsys  translate_on
//synthesis translate_on
//synthesis translate_on
Line 615... Line 610...
            add_ss_port
            add_ss_port
If no output is granted replace the output port with ss one
If no output is granted replace the output port with ss one
**************************/
**************************/
 
 
 
 
module add_ss_port
module add_ss_port #(
        import pronoc_pkg::*;
    parameter NOC_ID=0,
#(
    parameter SW_LOC=0,
    parameter SW_LOC=1,
 
    parameter P=5
    parameter P=5
)(
)(
    destport_in,
    destport_in,
    destport_out
    destport_out
);
);
 
 
 
 
 
        `NOC_CONF
 
 
 
 
        localparam SS_PORT = strieght_port(P,SW_LOC);
        localparam SS_PORT = strieght_port(P,SW_LOC);
        localparam DISABLED = P;
        localparam DISABLED = P;
    localparam P_1     =   ( SELF_LOOP_EN=="NO")?  P-1 : P;
    localparam P_1     =   ( SELF_LOOP_EN=="NO")?  P-1 : P;
 
 
    input  [P_1-1  :   0] destport_in;
    input  [P_1-1  :   0] destport_in;

powered by: WebSVN 2.1.0

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