URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 48 |
Rev 54 |
`timescale 1ns / 1ps
|
`include "pronoc_def.v"
|
|
|
/**************************************
|
/**************************************
|
* Module: tree
|
* Module: tree
|
* Date:2019-01-01
|
* Date:2019-01-01
|
* Author: alireza
|
* Author: alireza
|
*
|
*
|
*
|
*
|
Description:
|
Description:
|
|
|
Star
|
Star
|
|
|
***************************************/
|
***************************************/
|
|
|
|
|
module star_noc_top
|
module star_noc_top
|
import pronoc_pkg::*;
|
import pronoc_pkg::*;
|
(
|
(
|
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];
|
|
|
|
|
router_top # (
|
router_top # (
|
.P(NE)
|
.P(NE)
|
)
|
)
|
the_router
|
the_router
|
(
|
(
|
|
.current_r_id (0),
|
.current_r_addr (1'b0),
|
.current_r_addr (1'b0),
|
.chan_in (chan_in_all),
|
.chan_in (chan_in_all),
|
.chan_out (chan_out_all),
|
.chan_out (chan_out_all),
|
|
.router_event (router_event[0]),
|
.clk (clk ),
|
.clk (clk ),
|
.reset (reset )
|
.reset (reset )
|
);
|
);
|
|
|
|
|
endmodule
|
endmodule
|
|
|
|
|
module star_conventional_routing #(
|
module star_conventional_routing #(
|
parameter NE = 8
|
parameter NE = 8
|
)
|
)
|
(
|
(
|
dest_e_addr,
|
dest_e_addr,
|
destport
|
destport
|
);
|
);
|
|
|
function integer log2;
|
function integer log2;
|
input integer number; begin
|
input integer number; begin
|
log2=(number <=1) ? 1: 0;
|
log2=(number <=1) ? 1: 0;
|
while(2**log2
|
while(2**log2
|
log2=log2+1;
|
log2=log2+1;
|
end
|
end
|
end
|
end
|
endfunction // log2
|
endfunction // log2
|
|
|
localparam EAw = log2(NE);
|
localparam EAw = log2(NE);
|
|
|
input [EAw-1 :0] dest_e_addr;
|
input [EAw-1 :0] dest_e_addr;
|
output [EAw-1 :0] destport;
|
output [EAw-1 :0] destport;
|
// the destination endpoint address & connection port number are the same in star topology
|
// the destination endpoint address & connection port number are the same in star topology
|
assign destport = dest_e_addr;
|
assign destport = dest_e_addr;
|
endmodule
|
endmodule
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.