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

Show entire file | Details | Blame | View Log

Rev 54 Rev 56
Line 31... Line 31...
`define router_id(x,y)                         ((y * NX) +    x)
`define router_id(x,y)                         ((y * NX) +    x)
`define endp_id(x,y,l)                         ((y * NX) +    x) * NL + l
`define endp_id(x,y,l)                         ((y * NX) +    x) * NL + l
 
 
 
 
 
 
module mesh_torus_noc_top
module mesh_torus_noc_top #(
                import pronoc_pkg::*;
        parameter NOC_ID=0
        (
) (
 
 
    reset,
    reset,
    clk,
    clk,
    chan_in_all,
    chan_in_all,
    chan_out_all,
    chan_out_all,
    router_event
    router_event
);
);
 
 
 
    `NOC_CONF
 
 
        input   clk,reset;
        input   clk,reset;
        //Endpoints ports
        //Endpoints ports
        input   smartflit_chanel_t chan_in_all  [NE-1 : 0];
        input   smartflit_chanel_t chan_in_all  [NE-1 : 0];
        output  smartflit_chanel_t chan_out_all [NE-1 : 0];
        output  smartflit_chanel_t chan_out_all [NE-1 : 0];
Line 58... Line 57...
        smartflit_chanel_t    router_chan_in   [NR-1 :0][MAX_P-1 : 0];
        smartflit_chanel_t    router_chan_in   [NR-1 :0][MAX_P-1 : 0];
        smartflit_chanel_t    router_chan_out  [NR-1 :0][MAX_P-1 : 0];
        smartflit_chanel_t    router_chan_out  [NR-1 :0][MAX_P-1 : 0];
 
 
        wire [RAw-1 : 0] current_r_addr [NR-1 : 0];
        wire [RAw-1 : 0] current_r_addr [NR-1 : 0];
 
 
        // mesh torus
 
        localparam
 
                EAST   =       3'd1,
 
                NORTH  =       3'd2,
 
                WEST   =       3'd3,
 
                SOUTH  =       3'd4;
 
        //ring line
 
        localparam
 
                FORWARD =  2'd1,
 
                BACKWARD=  2'd2;
 
 
 
 
 
        genvar x,y,l;
        genvar x,y,l;
        generate
        generate
        /* verilator lint_off WIDTH */
        /* verilator lint_off WIDTH */
                if( TOPOLOGY == "RING" || TOPOLOGY == "LINE") begin : ring_line
                if( TOPOLOGY == "RING" || TOPOLOGY == "LINE") begin : ring_line
                        /* verilator lint_on WIDTH */
                        /* verilator lint_on WIDTH */
Line 81... Line 68...
 
 
 
 
                                assign current_r_addr [x] = x[RAw-1: 0];
                                assign current_r_addr [x] = x[RAw-1: 0];
 
 
                                router_top #(
                                router_top #(
 
                                        .NOC_ID(NOC_ID),
                                        .P               (MAX_P          )
                                        .P               (MAX_P          )
                                        ) the_router (
                                        ) the_router (
                                        .current_r_id    (x),
                                        .current_r_id    (x),
                                        .current_r_addr  (current_r_addr [x]),
                                        .current_r_addr  (current_r_addr [x]),
                                        .chan_in         (router_chan_in [x]),
                                        .chan_in         (router_chan_in [x]),
Line 133... Line 121...
                                localparam R_ADDR = (y<
                                localparam R_ADDR = (y<
                                localparam RID = (y * NX) +    x;
                                localparam RID = (y * NX) +    x;
                                assign current_r_addr [RID] = R_ADDR[RAw-1 :0];
                                assign current_r_addr [RID] = R_ADDR[RAw-1 :0];
 
 
                                        router_top #(
                                        router_top #(
 
                                                .NOC_ID(NOC_ID),
                                                .P               (MAX_P          )
                                                .P               (MAX_P          )
                                        ) the_router (
                                        ) the_router (
                                                .current_r_id    (RID),
                                                .current_r_id    (RID),
                                                .current_r_addr  (current_r_addr [RID]),
                                                .current_r_addr  (current_r_addr [RID]),
                                                .chan_in         (router_chan_in [RID]),
                                                .chan_in         (router_chan_in [RID]),

powered by: WebSVN 2.1.0

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