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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [clos_opt/] [vc/] [src/] [vcdmux.v] - Blame information for rev 65

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 VC 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 53 wsong0210
 09/06/2011  Make sure the sel pin is considered in the ack process. <wsong83@gmail.com>
18
 
19 39 wsong0210
*/
20
 
21
module vcdmux ( /*AUTOARG*/
22
   // Outputs
23
   dia, do0, do1, do2, do3, dot,
24
   // Inputs
25
   di0, di1, di2, di3, dit, divc, doa
26
   );
27
   parameter VCN = 2;           // number of output VCs
28
   parameter DW = 32;           // data width of the input
29
   parameter SCN = DW/2;
30
 
31
   input [SCN-1:0]  di0, di1, di2, di3;
32
   input [2:0]       dit;
33
   input [VCN-1:0]  divc;
34
   output           dia;
35
 
36
   output [VCN-1:0][SCN-1:0] do0, do1, do2, do3;
37
   output [VCN-1:0][2:0]     dot;
38
   input  [VCN-1:0]           doa;
39
 
40
   genvar                     i,j;
41
 
42
   /*
43
   generate
44
      for (i=0; i<VCN; i++) begin: VCD
45
         for(j=0; j<SCN; j++) begin: D
46
            c2 C0 (.a0(di0[j]), .a1(divc[i]), .q(do0[i][j]));
47
            c2 C1 (.a0(di1[j]), .a1(divc[i]), .q(do1[i][j]));
48
            c2 C2 (.a0(di2[j]), .a1(divc[i]), .q(do2[i][j]));
49
            c2 C3 (.a0(di3[j]), .a1(divc[i]), .q(do3[i][j]));
50
         end
51
 
52
         for(j=0; j<3; j++) begin: T
53
            c2 C0 (.a0(dit[j]), .a1(divc[i]), .q(dot[i][j]));
54
         end
55
      end
56
   endgenerate
57
    */
58
 
59
   generate
60
      for (i=0; i<VCN; i++) begin: VCD
61
         assign do0[i] = divc[i] ? di0 : 0;
62
         assign do1[i] = divc[i] ? di1 : 0;
63
         assign do2[i] = divc[i] ? di2 : 0;
64
         assign do3[i] = divc[i] ? di3 : 0;
65
         assign dot[i] = divc[i] ? dit : 0;
66
      end
67
   endgenerate
68
 
69 53 wsong0210
   //assign dia = |doa;
70
   c2 CACK (.a0(|doa), .a1(|divc), .q(dia));
71 39 wsong0210
 
72
endmodule // vcdmux
73
 

powered by: WebSVN 2.1.0

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