OpenCores
URL https://opencores.org/ocsvn/async_sdm_noc/async_sdm_noc/trunk

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [init/] [common/] [src/] [mnma.v] - Blame information for rev 22

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

Line No. Rev Author Line
1 17 wsong0210
/*
2
 Asynchronous SDM NoC
3
 (C)2011 Wei Song
4
 Advanced Processor Technologies Group
5
 Computer Science, the Univ. of Manchester, UK
6
 
7
 Authors:
8
 Wei Song     wsong83@gmail.com
9
 
10
 License: LGPL 3.0 or later
11
 
12
 M-N Match allocator
13
 *** SystemVerilog is used ***
14
 
15
 References
16
   Thomas E. Anderson, Susan S. Owicki, James B. Saxe and Charles P. Thacker, High-speed switch scheduling for local-area networks, ACM Transactions on Computer Systems, 1993(11), 319-352.
17
 
18
 For the detail structure, please refer to Section 6.3.1 of the thesis:
19
   Wei Song, Spatial parallelism in the routers of asynchronous on-chip networks, PhD thesis, the University of Manchester, 2011.
20
 
21
 History:
22
 09/06/2010  Initial version. <wsong83@gmail.com>
23
 08/03/2011  Tree arbiter cannot be used as the requests are not allowed to drop before ack. <wsong83@gmail.com>
24
 24/05/2011  Clean up for opensource. <wsong83@gmail.com>
25
 
26
*/
27
 
28
module mnma(/*AUTOARG*/
29
   // Outputs
30
   cfg,
31
   // Inputs
32
   r
33
   );
34
   parameter N = 2;             // number of input requests
35
   parameter M = 2;             // number of resources
36
 
37
   input [N-1:0][M-1:0]       r;  // input requests
38
   output [M-1:0][N-1:0]      cfg;        // configuration to the crssbar
39
 
40
   wire [M-1:0][N-1:0]          OPr;
41
   wire [M-1:0][N-1:0]          OPg;
42
   wire [M-1:0][N-1:0][M-1:0] OPren;
43
   wire [N-1:0][M-1:0]          IPr;
44
   wire [N-1:0][M-1:0]          IPg;
45
 
46
   genvar                     i,j,k;
47
 
48
   //-------------------------------------
49
   // OP arbiters
50
   generate
51
      for(i=0; i<M; i++) begin:OPA
52
         mutex_arb #(N)
53
         A (
54
            .req    ( OPr[i]  ),
55
            .gnt    ( OPg[i]  )
56
            );
57
      end
58
   endgenerate
59
 
60
   //--------------------------------------
61
   // IP arbiters
62
   generate
63
      for(i=0; i<N; i++) begin:IPA
64
         mutex_arb #(M)
65
         A (
66
            .req    ( IPr[i]  ),
67
            .gnt    ( IPg[i]  )
68
            );
69
      end
70
   endgenerate
71
 
72
   //--------------------------------------
73
   // connections
74
   generate
75
      for(i=0; i<M; i++) begin:CO
76
         for(j=0; j<N; j++) begin:CI
77
            for(k=0; k<M; k++) begin:EN
78
               if(i==k)
79
                 assign OPren[i][j][k] = 1'b0;
80
               else
81
                 assign OPren[i][j][k] = IPg[j][k]; // connection j->k is settle
82
            end
83
            and AND_OPRen (OPr[i][j], r[j][i] ,(~|OPren[i][j]));
84
            assign cfg[i][j] = IPg[j][i];
85
            assign IPr[j][i] = OPg[i][j];
86
         end // block: CI
87
      end // block: CO
88
   endgenerate
89
 
90
endmodule // mnma
91
 
92
 

powered by: WebSVN 2.1.0

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