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

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

Line No. Rev Author Line
1 12 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
 Request crossbar for wormhole and SDM routers.
13
 *** SystemVerilog is used ***
14
 
15
 History:
16
 10/12/2009  Initial version. <wsong83@gmail.com>
17
 23/05/2011  Use SystemVerilog for wire declaration. <wsong83@gmail.com>
18 27 wsong0210
 27/05/2011  Clean up for opensource. <wsong83@gmail.com>
19 12 wsong0210
 
20
*/
21
 
22
module rcb (/*AUTOARG*/
23
   // Outputs
24
   ira, oreq,
25
   // Inputs
26
   ireq, ora, cfg
27
   ) ;
28
   // parameters
29
   parameter NN = 1;          // number of input ports
30
   parameter MN = 1;          // number of output ports
31
   parameter DW = 1;          // datawidth a port
32
 
33
   input [NN-1:0][DW-1:0]     ireq; // input requests
34
   output [NN-1:0]             ira;  // ack for input requests
35
   output [MN-1:0][DW-1:0]    oreq; // output requests
36 27 wsong0210
   input [MN-1:0]              ora;  // ack for output requests
37 12 wsong0210
   input [MN-1:0][NN-1:0]     cfg;  // the crossbar configuration
38
 
39 27 wsong0210
   wire [MN-1:0][DW-1:0][NN-1:0] m; // the internal wires for requests
40
   wire [NN-1:0][MN-1:0]   ma; // the internal wires for acks
41 12 wsong0210
 
42
   // generate variable
43
   genvar                     i, j, k;
44
 
45
   // request matrix
46
   generate
47
      for (i=0; i<MN; i++) begin: EN
48 27 wsong0210
         for (j=0; j<DW; j++) begin: SC
49
            for (k=0; k<NN; k++) begin: IP
50 12 wsong0210
               and AC (m[i][j][k], ireq[k][j], cfg[i][k]);
51
            end
52
 
53
            // the OR gates
54
            assign oreq[i][j] = |m[i][j];
55
         end
56
      end
57
   endgenerate
58
 
59
   // ack matrix
60
   generate
61 27 wsong0210
      for (k=0; k<NN; k++) begin: ENA
62
         for (i=0; i<MN; i++) begin: OP
63 12 wsong0210
            and AC (ma[k][i], ora[i], cfg[i][k]);
64
         end
65
 
66
         // the OR gates
67
         assign ira[k] = |ma[k];
68
      end
69
   endgenerate
70
 
71
endmodule // rcb
72
 
73
 

powered by: WebSVN 2.1.0

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