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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [clos_opt/] [common/] [src/] [mnma.v] - Blame information for rev 77

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 28 wsong0210
   ra, cfg,
31 17 wsong0210
   // 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 28 wsong0210
   output [N-1:0]              ra;       // ack to input requests
39 17 wsong0210
   output [M-1:0][N-1:0]      cfg;        // configuration to the crssbar
40
 
41
   wire [M-1:0][N-1:0]          OPr;
42
   wire [M-1:0][N-1:0]          OPg;
43
   wire [M-1:0][N-1:0][M-1:0] OPren;
44
   wire [N-1:0][M-1:0]          IPr;
45
   wire [N-1:0][M-1:0]          IPg;
46
 
47
   genvar                     i,j,k;
48
 
49
   //-------------------------------------
50
   // OP arbiters
51
   generate
52
      for(i=0; i<M; i++) begin:OPA
53
         mutex_arb #(N)
54
         A (
55
            .req    ( OPr[i]  ),
56
            .gnt    ( OPg[i]  )
57
            );
58
      end
59
   endgenerate
60
 
61
   //--------------------------------------
62
   // IP arbiters
63
   generate
64
      for(i=0; i<N; i++) begin:IPA
65
         mutex_arb #(M)
66
         A (
67
            .req    ( IPr[i]  ),
68
            .gnt    ( IPg[i]  )
69
            );
70 28 wsong0210
 
71
         // the input ack
72
         assign ra[i] = |IPg[i];
73 17 wsong0210
      end
74
   endgenerate
75
 
76
   //--------------------------------------
77
   // connections
78
   generate
79
      for(i=0; i<M; i++) begin:CO
80
         for(j=0; j<N; j++) begin:CI
81
            for(k=0; k<M; k++) begin:EN
82
               if(i==k)
83
                 assign OPren[i][j][k] = 1'b0;
84
               else
85
                 assign OPren[i][j][k] = IPg[j][k]; // connection j->k is settle
86
            end
87
            and AND_OPRen (OPr[i][j], r[j][i] ,(~|OPren[i][j]));
88
            assign cfg[i][j] = IPg[j][i];
89
            assign IPr[j][i] = OPg[i][j];
90
         end // block: CI
91
      end // block: CO
92
   endgenerate
93
 
94
endmodule // mnma
95
 
96
 

powered by: WebSVN 2.1.0

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