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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 68 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
 Unidirectional crossbar
13
 *** SystemVerilog is used ***
14
 
15
 History:
16
 07/07/2011  Initial version. <wsong83@gmail.com>
17
 
18
*/
19
 
20
module cb (/*AUTOARG*/
21
   // Outputs
22
   data_out,
23
   // Inputs
24
   data_in, cfg
25
   ) ;
26
   // parameters
27
   parameter NN = 1;          // number of input ports
28
   parameter MN = 1;          // number of output ports
29
   parameter DW = 1;          // datawidth a port
30
 
31
   input [NN-1:0][DW-1:0]     data_in;      // input data
32
   output [MN-1:0][DW-1:0]    data_out;     // output requests
33
   input [MN-1:0][NN-1:0]     cfg; // the crossbar configuration
34
 
35
   wire [MN-1:0][DW-1:0][NN-1:0] m; // the internal wires for data
36
 
37
   // generate variable
38
   genvar                     i, j, k;
39
 
40
   // request matrix
41
   generate
42
      for (i=0; i<MN; i++) begin: EN
43
         for (j=0; j<DW; j++) begin: SC
44
            for (k=0; k<NN; k++) begin: IP
45
               and AC (m[i][j][k], data_in[k][j], cfg[i][k]);
46
            end
47
 
48
            // the OR gates
49
            assign data_out[i][j] = |m[i][j];
50
         end
51
      end
52
   endgenerate
53
 
54
endmodule // cb
55
 
56
 

powered by: WebSVN 2.1.0

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