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 54

Go to most recent revision | 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
module  star_noc_top
17
                import pronoc_pkg::*;
18
        (
19
                reset,
20
                clk,
21
                chan_in_all,
22 54 alirezamon
                chan_out_all,
23
                router_event
24 48 alirezamon
        );
25
 
26
 
27
        input   clk,reset;
28 54 alirezamon
        //Endpoints ports
29 48 alirezamon
        input   smartflit_chanel_t chan_in_all  [NE-1 : 0];
30
        output  smartflit_chanel_t chan_out_all [NE-1 : 0];
31 54 alirezamon
 
32
        //Events
33
        output  router_event_t  router_event [NR-1 : 0][MAX_P-1 : 0];
34 48 alirezamon
 
35
 
36
            router_top # (
37
                        .P(NE)
38
                )
39
                the_router
40
                (
41 54 alirezamon
                        .current_r_id    (0),
42 48 alirezamon
                        .current_r_addr  (1'b0),
43
                        .chan_in         (chan_in_all),
44
                        .chan_out        (chan_out_all),
45 54 alirezamon
                        .router_event    (router_event[0]),
46 48 alirezamon
                        .clk             (clk            ),
47
                        .reset           (reset          )
48
                );
49
 
50
 
51
endmodule
52
 
53
 
54
module star_conventional_routing #(
55
                parameter NE                = 8
56
                )
57
                (
58
                dest_e_addr,
59
                destport
60
);
61
 
62
        function integer log2;
63
                input integer number; begin
64
                        log2=(number <=1) ? 1: 0;
65
                        while(2**log2
66
                                log2=log2+1;
67
                        end
68
                end
69
        endfunction // log2
70
 
71
        localparam EAw = log2(NE);
72
 
73
        input   [EAw-1   :0] dest_e_addr;
74
        output  [EAw-1   :0] destport;
75
        // the destination endpoint address & connection port number are the same in star topology
76
        assign destport = dest_e_addr;
77
endmodule

powered by: WebSVN 2.1.0

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