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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [init/] [vc/] [src/] [ddmux.v] - Blame information for rev 44

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

Line No. Rev Author Line
1 39 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
 Demux for a 1-of-n buffer stage.
13
 
14
 History:
15
 31/03/2010  Initial version. <wsong83@gmail.com>
16
 02/06/2011  Clean up for opensource. <wsong83@gmail.com>
17
 
18
*/
19
 
20
module ddmux ( /*AUTOARG*/
21
   // Outputs
22
   d_in_a, d_out,
23
   // Inputs
24
   d_in, d_sel, d_out_a
25
   );
26
   parameter VCN = 2;           // number of output VCs
27
   parameter DW = 32;           // data width of the input
28
 
29
   input [DW-1:0]   d_in;
30
   input [VCN-1:0]  d_sel;
31
   output           d_in_a;
32
 
33
   output [VCN-1:0][DW-1:0]  d_out;
34
   input  [VCN-1:0]           d_out_a;
35
 
36
   genvar                     i,j;
37
 
38
   /*
39
   generate
40
      for (i=0; i<VCN; i++) begin: VCD
41
         for(j=0; j<DW; j++) begin: D
42
            c2 C (.a0(d_in[j]), .a1(d_sel[i]), .q(d_out[i][j]));
43
         end
44
      end
45
   endgenerate
46
    */
47
 
48
   generate
49
      for (i=0; i<VCN; i++) begin: VCD
50
         assign d_out[i] = d_sel[i] ? d_in : 0;
51
      end
52
   endgenerate
53
 
54
   assign d_in_a = |d_out_a;
55
 
56
endmodule // ddmux
57
 

powered by: WebSVN 2.1.0

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