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/] [mutex_arb.v] - Blame information for rev 66

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

Line No. Rev Author Line
1 11 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-to-1 asynchronous multi-way MUTEX arbiter.
13
 
14
 History:
15
 24/05/2009  Initial version. <wsong83@gmail.com>
16
 23/05/2011  Clean up for opensource. <wsong83@gmail.com>
17
 
18
*/
19
 
20
module mutex_arb (/*AUTOARG*/
21
   // Outputs
22
   gnt,
23
   // Inputs
24
   req
25
   );
26
 
27
   parameter wd = 4;            // the number of request inputs
28
 
29
   input  [wd-1:0]    req;
30
   output [wd-1:0]    gnt;
31
 
32
   genvar             i,j;
33
 
34
   wire [wd-1:0]      arb_w [wd-1:0];
35
   wire [wd-1:0]      gnt;
36
 
37
   generate
38
      for(i=0; i<wd; i=i+1) begin:lv
39
         for(j=i+1; j<wd; j=j+1) begin:b
40 28 wsong0210
            mutex2 ME ( .a(arb_w[i][j-1]),     .b(arb_w[j][i]),  .qa(arb_w[i][j]),     .qb(arb_w[j][i+1]));
41 11 wsong0210
         end
42
         assign arb_w[i][0] = req[i];
43
         assign gnt[i] = arb_w[i][wd-1];
44
      end
45
   endgenerate
46
 
47
endmodule // mutex_arb
48
 

powered by: WebSVN 2.1.0

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