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 48

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 48 alirezamon
`timescale 1ns / 1ps
2
 
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
                chan_out_all
23
        );
24
 
25
 
26
        input   clk,reset;
27
        //local ports
28
        input   smartflit_chanel_t chan_in_all  [NE-1 : 0];
29
        output  smartflit_chanel_t chan_out_all [NE-1 : 0];
30
 
31
 
32
            router_top # (
33
                        .P(NE)
34
                )
35
                the_router
36
                (
37
                        .current_r_addr  (1'b0),
38
                        .chan_in         (chan_in_all),
39
                        .chan_out        (chan_out_all),
40
                        .clk             (clk            ),
41
                        .reset           (reset          )
42
                );
43
 
44
 
45
endmodule
46
 
47
 
48
module star_conventional_routing #(
49
                parameter NE                = 8
50
                )
51
                (
52
                dest_e_addr,
53
                destport
54
);
55
 
56
        function integer log2;
57
                input integer number; begin
58
                        log2=(number <=1) ? 1: 0;
59
                        while(2**log2
60
                                log2=log2+1;
61
                        end
62
                end
63
        endfunction // log2
64
 
65
        localparam EAw = log2(NE);
66
 
67
        input   [EAw-1   :0] dest_e_addr;
68
        output  [EAw-1   :0] destport;
69
        // the destination endpoint address & connection port number are the same in star topology
70
        assign destport = dest_e_addr;
71
endmodule

powered by: WebSVN 2.1.0

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