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

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
 General pipeline stage using the 4-phase 1-of-4 QDI protocol.
13
 *** SystemVerilog is used ***
14
 
15
 History:
16
 05/05/2009  Initial version. <wsong83@gmail.com>
17 14 wsong0210
 17/04/2011  Replace the common ack generation. <wsong83@gmail.com>
18 26 wsong0210
 26/05/2011  Clean up for opensource. <wsong83@gmail.com>
19 11 wsong0210
 
20
*/
21
 
22
// the router structure definitions
23
`include "define.v"
24
 
25
module pipe4(/*AUTOARG*/
26
   // Outputs
27
   ia, o0, o1, o2, o3,
28
   // Inputs
29
   i0, i1, i2, i3, oa
30
`ifdef ENABLE_EOF
31
   , i4, o4
32
`endif
33
   );
34
 
35
   parameter DW = 32;           // the data width of the pipeline stage
36
   parameter SCN = DW/2;        // the number of 1-of-4 sub-stage required
37
 
38 14 wsong0210
   input  [SCN-1:0]  i0, i1, i2, i3;
39
   output [SCN-1:0]  o0, o1, o2, o3;
40
   input             oa;        // input ack
41
   output            ia;        // output ack
42 11 wsong0210
 
43
`ifdef ENABLE_EOF
44 26 wsong0210
   output            o4;        // the eof bit
45
   input             i4;
46 11 wsong0210
`endif
47
 
48
   // internal signals
49 26 wsong0210
   wire [SCN-1:0]    tack;
50 11 wsong0210
 
51
   // generate the ack line
52
   genvar       i;
53
 
54
   // the data pipe stage
55
   generate for (i=0; i<SCN; i++) begin:DD
56 14 wsong0210
      dc2 DC0 (.d(i0[i]), .a(oa), .q(o0[i]));
57
      dc2 DC1 (.d(i1[i]), .a(oa), .q(o1[i]));
58
      dc2 DC2 (.d(i2[i]), .a(oa), .q(o2[i]));
59
      dc2 DC3 (.d(i3[i]), .a(oa), .q(o3[i]));
60 11 wsong0210
   end endgenerate
61
 
62
   // the eof bit
63
`ifdef ENABLE_EOF
64 26 wsong0210
   dc2 DD_DC4 (.d(i4),  .a(oa),  .q(o4));
65 11 wsong0210
`endif
66
 
67
   // generate the input ack
68 14 wsong0210
   assign tack = o0|o1|o2|o3;
69
   ctree #(.DW(SCN)) ACKT (.ci(tack), .co(ia));
70 11 wsong0210
 
71 12 wsong0210
endmodule // pipe4
72 11 wsong0210
 
73
 
74
 
75 12 wsong0210
 

powered by: WebSVN 2.1.0

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