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/] [star_noc.sv] - Blame information for rev 56

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 54 alirezamon
`include "pronoc_def.v"
2 48 alirezamon
 
3
/**************************************
4
 * Module: tree
5
 * Date:2019-01-01
6
 * Author: alireza
7
 *
8
 *
9
Description:
10
 
11
    Star
12
 
13
 ***************************************/
14
 
15
 
16 56 alirezamon
module  star_noc_top #(
17
        parameter NOC_ID=0
18
) (
19 48 alirezamon
                reset,
20
                clk,
21
                chan_in_all,
22 54 alirezamon
                chan_out_all,
23
                router_event
24 48 alirezamon
        );
25
 
26 56 alirezamon
        `NOC_CONF
27 48 alirezamon
 
28
        input   clk,reset;
29 54 alirezamon
        //Endpoints ports
30 48 alirezamon
        input   smartflit_chanel_t chan_in_all  [NE-1 : 0];
31
        output  smartflit_chanel_t chan_out_all [NE-1 : 0];
32 54 alirezamon
 
33
        //Events
34
        output  router_event_t  router_event [NR-1 : 0][MAX_P-1 : 0];
35 48 alirezamon
 
36
 
37
            router_top # (
38 56 alirezamon
                        .NOC_ID(NOC_ID),
39 48 alirezamon
                        .P(NE)
40
                )
41
                the_router
42
                (
43 54 alirezamon
                        .current_r_id    (0),
44 48 alirezamon
                        .current_r_addr  (1'b0),
45
                        .chan_in         (chan_in_all),
46
                        .chan_out        (chan_out_all),
47 54 alirezamon
                        .router_event    (router_event[0]),
48 48 alirezamon
                        .clk             (clk            ),
49
                        .reset           (reset          )
50
                );
51
 
52
 
53
endmodule
54
 
55
 
56
module star_conventional_routing #(
57
                parameter NE                = 8
58
                )
59
                (
60
                dest_e_addr,
61
                destport
62
);
63
 
64
        function integer log2;
65
                input integer number; begin
66
                        log2=(number <=1) ? 1: 0;
67
                        while(2**log2
68
                                log2=log2+1;
69
                        end
70
                end
71
        endfunction // log2
72
 
73
        localparam EAw = log2(NE);
74
 
75
        input   [EAw-1   :0] dest_e_addr;
76
        output  [EAw-1   :0] destport;
77
        // the destination endpoint address & connection port number are the same in star topology
78
        assign destport = dest_e_addr;
79
endmodule

powered by: WebSVN 2.1.0

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