@@ -3,7 +3,9 @@ package edu.berkeley.cs.ucie.digital
3
3
import chisel3 ._
4
4
import chisel3 .util ._
5
5
6
- // The mainband pins exposed by a standard package UCIe module in one direction.
6
+ /** The mainband pins exposed by a standard package UCIe module in one
7
+ * direction.
8
+ */
7
9
class MainbandIo (lanes : Int = 16 ) extends Bundle {
8
10
val data = Bits (lanes.W )
9
11
val valid = Bool ()
@@ -12,60 +14,100 @@ class MainbandIo(lanes: Int = 16) extends Bundle {
12
14
val clkn = Clock ()
13
15
}
14
16
15
- // The sideband pins exposed by a standard package UCIe module in one direction.
17
+ /** The sideband pins exposed by a standard package UCIe module in one
18
+ * direction.
19
+ */
16
20
class SidebandIo extends Bundle {
17
21
val data = Bool ()
18
22
val clk = Clock ()
19
23
}
20
24
21
- // The pins (mainband and sideband) exposed by a standard package UCIe module in one direction.
25
+ /** The pins (mainband and sideband) exposed by a standard package UCIe module
26
+ * in one direction.
27
+ */
22
28
class UnidirectionalIo (lanes : Int = 16 ) extends Bundle {
23
29
val mainband = new MainbandIo (lanes)
24
30
val sideband = new SidebandIo ()
25
31
}
26
32
27
- // The pins (mainband and sideband) exposed by a standard package UCIe module in both directions.
33
+ /** The pins (mainband and sideband) exposed by a standard package UCIe module
34
+ * in both directions.
35
+ */
28
36
class StandardPackageIo (lanes : Int = 16 ) extends Bundle {
29
37
val tx = Output (new UnidirectionalIo (lanes))
30
38
val rx = Input (new UnidirectionalIo (lanes))
31
39
}
32
40
33
- // The sideband analog front-end (AFE) interface, from the perspective of the logical PHY layer.
34
- //
35
- // All signals in this interface are synchronous to the sideband clock (fixed at 800 MHz).
36
- // As a result, the sideband's `serializerRatio` likely will be different from the mainband's `serializerRatio`.
41
+ /** The sideband analog front-end (AFE) interface, from the perspective of the
42
+ * logical PHY layer.
43
+ *
44
+ * All signals in this interface are synchronous to the sideband clock (fixed
45
+ * at 800 MHz). As a result, the sideband's `serializerRatio` likely will be
46
+ * different from the mainband's `serializerRatio`.
47
+ */
37
48
class SidebandAfeIo (
38
49
serializerRatio : Int = 1 ,
39
50
) extends Bundle {
40
- // Data to transmit on the sideband.
41
- // Output from the async FIFO.
51
+
52
+ /** Data to transmit on the sideband.
53
+ *
54
+ * Output from the async FIFO.
55
+ */
42
56
val txData = Decoupled (Bits (serializerRatio.W ))
43
- // Data received on the sideband.
44
- // Input to the async FIFO.
57
+
58
+ /** Data received on the sideband.
59
+ *
60
+ * Input to the async FIFO.
61
+ */
45
62
val rxData = Flipped (Decoupled (Bits (serializerRatio.W )))
46
- // Enable sideband receivers.
63
+
64
+ /** Enable sideband receivers. */
47
65
val rxEn = Output (Bool ())
48
66
}
49
67
50
- // The mainband analog front-end (AFE) interface, from the perspective of the logical PHY layer.
51
- //
52
- // All signals in this interface are synchronous to the mainband AFE's digital clock,
53
- // which is produced by taking a high speed clock from a PLL
54
- // and dividing its frequency by `serializerRatio`.
55
- //
56
- // With half-rate clocking (1 data bit transmitted per UI; 1 UI = 0.5 clock cycles), the PLL clock
57
- // may be 2, 4, 6, 8, 12, or 16 GHz. With a serializer ratio of 16, this results in a 0.125-1 GHz
58
- // AFE digital clock.
68
+ /** The mainband analog front-end (AFE) interface, from the perspective of the
69
+ * logical PHY layer.
70
+ *
71
+ * All signals in this interface are synchronous to the mainband AFE's digital
72
+ * clock, which is produced by taking a high speed clock from a PLL and
73
+ * dividing its frequency by `serializerRatio`.
74
+ *
75
+ * With half-rate clocking (1 data bit transmitted per UI; 1 UI = 0.5 clock
76
+ * cycles), the PLL clock may be 2, 4, 6, 8, 12, or 16 GHz. With a serializer
77
+ * ratio of 16, this results in a 0.125-1 GHz AFE digital clock.
78
+ *
79
+ * @groupname data Data signals
80
+ * @groupprio data 50
81
+ * @groupname impedance Impedance control signals
82
+ * @groupprio impedance 100
83
+ * @groupname phase Phase control signals
84
+ * @groupprio phase 101
85
+ * @groupname receiver Receiver control signals
86
+ * @groupprio receiver 102
87
+ * @groupname freq Frequency control signals
88
+ * @groupprio freq 103
89
+ * @groupname clock Clock control signals
90
+ * @groupprio clock 104
91
+ */
59
92
class MainbandAfeIo (
60
93
lanes : Int = 16 ,
61
94
serializerRatio : Int = 16 ,
62
95
) extends Bundle {
63
- // Data to transmit on the mainband.
64
- // Output from the async FIFO.
96
+
97
+ /** Data to transmit on the mainband.
98
+ *
99
+ * Output from the async FIFO.
100
+ *
101
+ * @group data
102
+ */
65
103
val txData = Decoupled (Vec (lanes, Bits (serializerRatio.W )))
66
104
67
- // Data received on the mainband.
68
- // Input to the async FIFO.
105
+ /** Data received on the mainband.
106
+ *
107
+ * Input to the async FIFO.
108
+ *
109
+ * @group data
110
+ */
69
111
val rxData = Flipped (Decoupled (Vec (lanes, Bits (serializerRatio.W ))))
70
112
71
113
// ///////////////////
@@ -74,46 +116,83 @@ class MainbandAfeIo(
74
116
// Setting txZpu = txZpd = 0 sets drivers to hi-z.
75
117
// ///////////////////
76
118
77
- // TX pull up impedance control.
119
+ /** TX pull up impedance control.
120
+ *
121
+ * @group impedance
122
+ */
78
123
val txZpu = Output (Vec (lanes, UInt (4 .W )))
79
- // TX pull down impedance control.
124
+
125
+ /** TX pull down impedance control.
126
+ *
127
+ * @group impedance
128
+ */
80
129
val txZpd = Output (Vec (lanes, UInt (4 .W )))
81
- // RX impedance control.
130
+
131
+ /** RX impedance control.
132
+ *
133
+ * @group impedance
134
+ */
82
135
val rxZ = Output (Vec (lanes, UInt (4 .W )))
83
136
84
137
// ///////////////////
85
138
// phase control
86
139
// ///////////////////
87
140
88
- // Global (per-module) phase control.
141
+ /** Global (per-module) phase control.
142
+ *
143
+ * @group phase
144
+ */
89
145
val txGlobalPhaseSel = Output (UInt (4 .W ))
90
- // Per-lane phase control.
146
+
147
+ /** Per-lane phase control.
148
+ *
149
+ * @group phase
150
+ */
91
151
val txLaneDeskew = Output (Vec (lanes, UInt (4 .W )))
92
- // Per-lane phase control.
152
+
153
+ /** Per-lane phase control.
154
+ *
155
+ * @group phase
156
+ */
93
157
val rxLaneDeskew = Output (Vec (lanes, UInt (4 .W )))
94
158
95
159
// ///////////////////
96
160
// frequency control
97
161
// ///////////////////
162
+ /** @group freq */
98
163
val txFreqSel = Output (UInt (4 .W ))
99
164
100
165
// ///////////////////
101
166
// receiver control
102
167
// ///////////////////
103
- // Mainband receiver enable.
168
+ /** Mainband receiver enable.
169
+ *
170
+ * @group receiver
171
+ */
104
172
val rxEn = Output (Bool ())
105
- // Per-lane vref/offset cancellation control.
173
+
174
+ /** Per-lane vref/offset cancellation control.
175
+ *
176
+ * @group receiver
177
+ */
106
178
val rxVref = Output (Vec (lanes, UInt (4 .W )))
107
179
108
180
// ///////////////////
109
181
// clock control
110
182
// ///////////////////
111
- // Clock gating control.
183
+ /** Clock gating control.
184
+ *
185
+ * @group clock
186
+ */
112
187
val txClockEn = Output (Bool ())
113
- // Clock parking level.
114
- //
115
- // Per the UCIe spec, must alternate between high and low
116
- // on subsequent clock gating events. If the link is using
117
- // free running clock mode, this signal has no effect.
188
+
189
+ /** Clock parking level.
190
+ *
191
+ * Per the UCIe spec, must alternate between high and low on subsequent clock
192
+ * gating events. If the link is using free running clock mode, this signal
193
+ * has no effect.
194
+ *
195
+ * @group clock
196
+ */
118
197
val txClockPark = Output (Bool ())
119
198
}
0 commit comments