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

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

Rev 48 Rev 54
Line 1... Line 1...
// synthesis translate_off
`include "pronoc_def.v"
`timescale 1ns / 1ps
 
// synthesis translate_on
 
 
 
/**********************************************************************
/**********************************************************************
**    File:  mesh_torus_noc.v
**    File:  mesh_torus_noc.v
**
**
**    Copyright (C) 2014-2017  Alireza Monemi
**    Copyright (C) 2014-2017  Alireza Monemi
Line 40... Line 38...
        (
        (
 
 
    reset,
    reset,
    clk,
    clk,
    chan_in_all,
    chan_in_all,
    chan_out_all
    chan_out_all,
 
    router_event
);
);
 
 
 
 
 
 
        input   clk,reset;
        input   clk,reset;
        //local 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];
 
 
 
        //Events
 
        output  router_event_t  router_event [NR-1 : 0][MAX_P-1 : 0];
 
 
        //all routers port
        //all routers port
        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];
Line 80... Line 83...
                                assign current_r_addr [x] = x[RAw-1: 0];
                                assign current_r_addr [x] = x[RAw-1: 0];
 
 
                                router_top #(
                                router_top #(
                                        .P               (MAX_P          )
                                        .P               (MAX_P          )
                                        ) the_router (
                                        ) the_router (
 
                                        .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]),
                                        .chan_out        (router_chan_out[x]),
                                        .chan_out        (router_chan_out[x]),
 
                                        .router_event    (router_event[x]),
                                        .clk             (clk            ),
                                        .clk             (clk            ),
                                        .reset           (reset          ));
                                        .reset           (reset          ));
 
 
                                if(x    <   NX-1) begin: not_last_node
                                if(x    <   NX-1) begin: not_last_node
                                        assign  router_chan_in[x][FORWARD] = router_chan_out [(x+1)][BACKWARD];
                                        assign  router_chan_in[x][FORWARD] = router_chan_out [(x+1)][BACKWARD];
Line 124... Line 129...
 
 
                end else begin :mesh_torus
                end else begin :mesh_torus
                        for (y=0;    y
                        for (y=0;    y
                                for (x=0;    x
                                for (x=0;    x
                                localparam R_ADDR = (y<
                                localparam R_ADDR = (y<
                                localparam ROUTER_NUM = (y * NX) +    x;
                                localparam RID = (y * NX) +    x;
                                assign current_r_addr [ROUTER_NUM] = R_ADDR[RAw-1 :0];
                                assign current_r_addr [RID] = R_ADDR[RAw-1 :0];
 
 
                                        router_top #(
                                        router_top #(
                                                .P               (MAX_P          )
                                                .P               (MAX_P          )
                                        ) the_router (
                                        ) the_router (
                                                .current_r_addr  (current_r_addr [ROUTER_NUM]),
                                                .current_r_id    (RID),
                                                .chan_in         (router_chan_in [ROUTER_NUM]),
                                                .current_r_addr  (current_r_addr [RID]),
                                                .chan_out        (router_chan_out[ROUTER_NUM]),
                                                .chan_in         (router_chan_in [RID]),
 
                                                .chan_out        (router_chan_out[RID]),
 
                                                .router_event    (router_event[RID]),
                                                .clk             (clk            ),
                                                .clk             (clk            ),
                                                .reset           (reset          ));
                                                .reset           (reset          ));
 
 
 
 
                                /*
                                /*

powered by: WebSVN 2.1.0

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