You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msgid"Fork a simulation process to generate the ClockDomain stimulus (clock, reset, softReset, clockEnable signals)"
46
+
msgid"Fork a simulation process to generate the ClockDomain stimulus (clock, reset, softReset, clockEnable signals). The reset duration is 16 clock periods. The ``period`` is given as a number of simulation time units. An odd ``period`` will be truncated by one to have a symmetrical clock."
msgid"Similar to ``forkStimulus(period)`` but wait ``sleepDuration`` clock cycles after the reset is done and allows to specify ``resetCycles`` (default 16 cycles)"
55
+
msgstr""
56
+
57
+
#:../../SpinalHDL/Simulation/clock.rst:23
58
+
msgid"``forkStimulus()``"
47
59
msgstr""
48
60
49
-
#:../../SpinalHDL/Simulation/clock.rst:17
61
+
#:../../SpinalHDL/Simulation/clock.rst:24
62
+
msgid"Similar to ``forkStimulus(period)`` but the period is computed from the ``frequency`` field of the clock domain"
63
+
msgstr""
64
+
65
+
#:../../SpinalHDL/Simulation/clock.rst:26
50
66
msgid"``forkSimSpeedPrinter(printPeriod)``"
51
67
msgstr""
52
68
53
-
#:../../SpinalHDL/Simulation/clock.rst:18
69
+
#:../../SpinalHDL/Simulation/clock.rst:27
54
70
msgid"Fork a simulation process which will periodically print the simulation speed in kilo-cycles per real time second. ``printPeriod`` is in realtime seconds"
55
71
msgstr""
56
72
57
-
#:../../SpinalHDL/Simulation/clock.rst:19
73
+
#:../../SpinalHDL/Simulation/clock.rst:28
58
74
msgid"``clockToggle()``"
59
75
msgstr""
60
76
61
-
#:../../SpinalHDL/Simulation/clock.rst:20
77
+
#:../../SpinalHDL/Simulation/clock.rst:29
62
78
msgid"Toggle the clock signal"
63
79
msgstr""
64
80
65
-
#:../../SpinalHDL/Simulation/clock.rst:21
81
+
#:../../SpinalHDL/Simulation/clock.rst:30
66
82
msgid"``fallingEdge()``"
67
83
msgstr""
68
84
69
-
#:../../SpinalHDL/Simulation/clock.rst:22
85
+
#:../../SpinalHDL/Simulation/clock.rst:31
70
86
msgid"Clear the clock signal"
71
87
msgstr""
72
88
73
-
#:../../SpinalHDL/Simulation/clock.rst:23
89
+
#:../../SpinalHDL/Simulation/clock.rst:32
74
90
msgid"``risingEdge()``"
75
91
msgstr""
76
92
77
-
#:../../SpinalHDL/Simulation/clock.rst:24
93
+
#:../../SpinalHDL/Simulation/clock.rst:33
78
94
msgid"Set the clock signal"
79
95
msgstr""
80
96
81
-
#:../../SpinalHDL/Simulation/clock.rst:25
97
+
#:../../SpinalHDL/Simulation/clock.rst:34
82
98
msgid"``assertReset()``"
83
99
msgstr""
84
100
85
-
#:../../SpinalHDL/Simulation/clock.rst:26
101
+
#:../../SpinalHDL/Simulation/clock.rst:35
86
102
msgid"Set the reset signal to its active level"
87
103
msgstr""
88
104
89
-
#:../../SpinalHDL/Simulation/clock.rst:27
105
+
#:../../SpinalHDL/Simulation/clock.rst:36
90
106
msgid"``deassertReset()``"
91
107
msgstr""
92
108
93
-
#:../../SpinalHDL/Simulation/clock.rst:28
109
+
#:../../SpinalHDL/Simulation/clock.rst:37
94
110
msgid"Set the reset signal to its inactive level"
95
111
msgstr""
96
112
97
-
#:../../SpinalHDL/Simulation/clock.rst:29
113
+
#:../../SpinalHDL/Simulation/clock.rst:38
98
114
msgid"``assertClockEnable()``"
99
115
msgstr""
100
116
101
-
#:../../SpinalHDL/Simulation/clock.rst:30
102
-
#:../../SpinalHDL/Simulation/clock.rst:32
117
+
#:../../SpinalHDL/Simulation/clock.rst:39
118
+
#:../../SpinalHDL/Simulation/clock.rst:41
103
119
msgid"Set the clockEnable signal to its active level"
104
120
msgstr""
105
121
106
-
#:../../SpinalHDL/Simulation/clock.rst:31
122
+
#:../../SpinalHDL/Simulation/clock.rst:40
107
123
msgid"``deassertClockEnable()``"
108
124
msgstr""
109
125
110
-
#:../../SpinalHDL/Simulation/clock.rst:33
126
+
#:../../SpinalHDL/Simulation/clock.rst:42
111
127
msgid"``assertSoftReset()``"
112
128
msgstr""
113
129
114
-
#:../../SpinalHDL/Simulation/clock.rst:34
115
-
#:../../SpinalHDL/Simulation/clock.rst:36
130
+
#:../../SpinalHDL/Simulation/clock.rst:43
131
+
#:../../SpinalHDL/Simulation/clock.rst:45
116
132
msgid"Set the softReset signal to its active level"
117
133
msgstr""
118
134
119
-
#:../../SpinalHDL/Simulation/clock.rst:35
135
+
#:../../SpinalHDL/Simulation/clock.rst:44
120
136
msgid"``deassertSoftReset()``"
121
137
msgstr""
122
138
123
-
#:../../SpinalHDL/Simulation/clock.rst:39
139
+
#:../../SpinalHDL/Simulation/clock.rst:48
124
140
msgid"Wait API"
125
141
msgstr""
126
142
127
-
#:../../SpinalHDL/Simulation/clock.rst:41
128
-
#:../../SpinalHDL/Simulation/clock.rst:81
143
+
#:../../SpinalHDL/Simulation/clock.rst:50
144
+
#:../../SpinalHDL/Simulation/clock.rst:90
129
145
msgid"Below is a list of ``ClockDomain`` utilities that you can use to wait for a given event from the domain:"
130
146
msgstr""
131
147
132
-
#:../../SpinalHDL/Simulation/clock.rst:47
148
+
#:../../SpinalHDL/Simulation/clock.rst:56
133
149
msgid"ClockDomain wait functions"
134
150
msgstr""
135
151
136
-
#:../../SpinalHDL/Simulation/clock.rst:49
152
+
#:../../SpinalHDL/Simulation/clock.rst:58
137
153
msgid"``waitSampling([cyclesCount])``"
138
154
msgstr""
139
155
140
-
#:../../SpinalHDL/Simulation/clock.rst:50
156
+
#:../../SpinalHDL/Simulation/clock.rst:59
141
157
msgid"Wait until the ``ClockDomain`` makes a sampling, (active clock edge && deassertReset && assertClockEnable)"
142
158
msgstr""
143
159
144
-
#:../../SpinalHDL/Simulation/clock.rst:51
160
+
#:../../SpinalHDL/Simulation/clock.rst:60
145
161
msgid"``waitRisingEdge([cyclesCount])``"
146
162
msgstr""
147
163
148
-
#:../../SpinalHDL/Simulation/clock.rst:52
164
+
#:../../SpinalHDL/Simulation/clock.rst:61
149
165
msgid"Wait cyclesCount rising edges on the clock; cycleCount defaults to 1 cycle if not otherwise specified. Note, cyclesCount = 0 is legal, and the function is not sensitive to reset/softReset/clockEnable"
150
166
msgstr""
151
167
152
-
#:../../SpinalHDL/Simulation/clock.rst:53
168
+
#:../../SpinalHDL/Simulation/clock.rst:62
153
169
msgid"``waitFallingEdge([cyclesCount])``"
154
170
msgstr""
155
171
156
-
#:../../SpinalHDL/Simulation/clock.rst:54
172
+
#:../../SpinalHDL/Simulation/clock.rst:63
157
173
msgid"Same as ``waitRisingEdge`` but for the falling edge"
158
174
msgstr""
159
175
160
-
#:../../SpinalHDL/Simulation/clock.rst:55
176
+
#:../../SpinalHDL/Simulation/clock.rst:64
161
177
msgid"``waitActiveEdge([cyclesCount])``"
162
178
msgstr""
163
179
164
-
#:../../SpinalHDL/Simulation/clock.rst:56
180
+
#:../../SpinalHDL/Simulation/clock.rst:65
165
181
msgid"Same as ``waitRisingEdge`` but for the edge level specified by the ``ClockDomainConfig``"
166
182
msgstr""
167
183
168
-
#:../../SpinalHDL/Simulation/clock.rst:57
184
+
#:../../SpinalHDL/Simulation/clock.rst:66
169
185
msgid"``waitInactiveEdge([cyclesCount])``"
170
186
msgstr""
171
187
172
-
#:../../SpinalHDL/Simulation/clock.rst:58
188
+
#:../../SpinalHDL/Simulation/clock.rst:67
173
189
msgid"Same as ``waitFallingEdge`` but for the edge level specified by the ``ClockDomainConfig``"
174
190
msgstr""
175
191
176
-
#:../../SpinalHDL/Simulation/clock.rst:59
192
+
#:../../SpinalHDL/Simulation/clock.rst:68
177
193
msgid"``waitRisingEdgeWhere(condition)``"
178
194
msgstr""
179
195
180
-
#:../../SpinalHDL/Simulation/clock.rst:60
196
+
#:../../SpinalHDL/Simulation/clock.rst:69
181
197
msgid"Same as ``waitRisingEdge``, but to exit, the boolean ``condition`` must be true when the rising edge occurs"
182
198
msgstr""
183
199
184
-
#:../../SpinalHDL/Simulation/clock.rst:61
200
+
#:../../SpinalHDL/Simulation/clock.rst:70
185
201
msgid"``waitFallingEdgeWhere(condition)``"
186
202
msgstr""
187
203
188
-
#:../../SpinalHDL/Simulation/clock.rst:62
204
+
#:../../SpinalHDL/Simulation/clock.rst:71
189
205
msgid"Same as ``waitRisingEdgeWhere``, but for the falling edge"
190
206
msgstr""
191
207
192
-
#:../../SpinalHDL/Simulation/clock.rst:63
208
+
#:../../SpinalHDL/Simulation/clock.rst:72
193
209
msgid"``waitActiveEdgeWhere(condition)``"
194
210
msgstr""
195
211
196
-
#:../../SpinalHDL/Simulation/clock.rst:64
212
+
#:../../SpinalHDL/Simulation/clock.rst:73
197
213
msgid"Same as ``waitRisingEdgeWhere``, but for the edge level specified by the ``ClockDomainConfig``"
198
214
msgstr""
199
215
200
-
#:../../SpinalHDL/Simulation/clock.rst:65
216
+
#:../../SpinalHDL/Simulation/clock.rst:74
201
217
msgid"``waitInactiveEdgeWhere(condition)``"
202
218
msgstr""
203
219
204
-
#:../../SpinalHDL/Simulation/clock.rst:66
220
+
#:../../SpinalHDL/Simulation/clock.rst:75
205
221
msgid"Same as ``waitFallingEdgeWhere``, but for the edge level specified by the ``ClockDomainConfig``"
206
222
msgstr""
207
223
208
-
#:../../SpinalHDL/Simulation/clock.rst:67
224
+
#:../../SpinalHDL/Simulation/clock.rst:76
209
225
msgid"``waitSamplingWhere(condition) : Boolean``"
210
226
msgstr""
211
227
212
-
#:../../SpinalHDL/Simulation/clock.rst:68
228
+
#:../../SpinalHDL/Simulation/clock.rst:77
213
229
msgid"Wait until a clockdomain sampled and the given condition is true"
msgid"Same as waitSamplingWhere defined above, but will never block more than timeout cycles. Return true if the exit condition came from the timeout"
222
238
msgstr""
223
239
224
-
#:../../SpinalHDL/Simulation/clock.rst:74
240
+
#:../../SpinalHDL/Simulation/clock.rst:83
225
241
msgid"All the functionality of the wait API can only be called directly from inside a thread, and not from a callback executed via the Callback API."
226
242
msgstr""
227
243
228
-
#:../../SpinalHDL/Simulation/clock.rst:79
244
+
#:../../SpinalHDL/Simulation/clock.rst:88
229
245
msgid"Callback API"
230
246
msgstr""
231
247
232
-
#:../../SpinalHDL/Simulation/clock.rst:87
248
+
#:../../SpinalHDL/Simulation/clock.rst:96
233
249
msgid"ClockDomain callback functions"
234
250
msgstr""
235
251
236
-
#:../../SpinalHDL/Simulation/clock.rst:89
252
+
#:../../SpinalHDL/Simulation/clock.rst:98
237
253
msgid"``onNextSampling { callback }``"
238
254
msgstr""
239
255
240
-
#:../../SpinalHDL/Simulation/clock.rst:90
256
+
#:../../SpinalHDL/Simulation/clock.rst:99
241
257
msgid"Execute the callback code only once on the next ``ClockDomain`` sample (active edge + reset off + clock enable on)"
242
258
msgstr""
243
259
244
-
#:../../SpinalHDL/Simulation/clock.rst:91
260
+
#:../../SpinalHDL/Simulation/clock.rst:100
245
261
msgid"``onSamplings { callback }``"
246
262
msgstr""
247
263
248
-
#:../../SpinalHDL/Simulation/clock.rst:92
264
+
#:../../SpinalHDL/Simulation/clock.rst:101
249
265
msgid"Execute the callback code each time the ``ClockDomain`` sample (active edge + reset off + clock enable on)"
250
266
msgstr""
251
267
252
-
#:../../SpinalHDL/Simulation/clock.rst:93
268
+
#:../../SpinalHDL/Simulation/clock.rst:102
253
269
msgid"``onActiveEdges { callback }``"
254
270
msgstr""
255
271
256
-
#:../../SpinalHDL/Simulation/clock.rst:94
272
+
#:../../SpinalHDL/Simulation/clock.rst:103
257
273
msgid"Execute the callback code each time the ``ClockDomain`` clock generates its configured edge"
258
274
msgstr""
259
275
260
-
#:../../SpinalHDL/Simulation/clock.rst:95
276
+
#:../../SpinalHDL/Simulation/clock.rst:104
261
277
msgid"``onEdges { callback }``"
262
278
msgstr""
263
279
264
-
#:../../SpinalHDL/Simulation/clock.rst:96
280
+
#:../../SpinalHDL/Simulation/clock.rst:105
265
281
msgid"Execute the callback code each time the ``ClockDomain`` clock generates a rising or falling edge"
266
282
msgstr""
267
283
268
-
#:../../SpinalHDL/Simulation/clock.rst:97
284
+
#:../../SpinalHDL/Simulation/clock.rst:106
269
285
msgid"``onRisingEdges { callback }``"
270
286
msgstr""
271
287
272
-
#:../../SpinalHDL/Simulation/clock.rst:98
288
+
#:../../SpinalHDL/Simulation/clock.rst:107
273
289
msgid"Execute the callback code each time the ``ClockDomain`` clock generates a rising edge"
274
290
msgstr""
275
291
276
-
#:../../SpinalHDL/Simulation/clock.rst:99
292
+
#:../../SpinalHDL/Simulation/clock.rst:108
277
293
msgid"``onFallingEdges { callback }``"
278
294
msgstr""
279
295
280
-
#:../../SpinalHDL/Simulation/clock.rst:100
296
+
#:../../SpinalHDL/Simulation/clock.rst:109
281
297
msgid"Execute the callback code each time the ``ClockDomain`` clock generates a falling edge"
282
298
msgstr""
283
299
284
-
#:../../SpinalHDL/Simulation/clock.rst:101
300
+
#:../../SpinalHDL/Simulation/clock.rst:110
285
301
msgid"``onSamplingWhile { callback : Boolean }``"
286
302
msgstr""
287
303
288
-
#:../../SpinalHDL/Simulation/clock.rst:102
304
+
#:../../SpinalHDL/Simulation/clock.rst:111
289
305
msgid"Same as onSampling, but you can stop it (forever) by letting the callback returning false"
290
306
msgstr""
291
307
292
-
#:../../SpinalHDL/Simulation/clock.rst:106
308
+
#:../../SpinalHDL/Simulation/clock.rst:115
293
309
msgid"Default ClockDomain"
294
310
msgstr""
295
311
296
-
#:../../SpinalHDL/Simulation/clock.rst:108
312
+
#:../../SpinalHDL/Simulation/clock.rst:117
297
313
msgid"You can access the default ``ClockDomain`` of your toplevel as shown below:"
298
314
msgstr""
299
315
300
-
#:../../SpinalHDL/Simulation/clock.rst:124
316
+
#:../../SpinalHDL/Simulation/clock.rst:133
301
317
msgid"Note that you can also directly fork a standard reset/clock process:"
302
318
msgstr""
303
319
304
-
#:../../SpinalHDL/Simulation/clock.rst:130
320
+
#:../../SpinalHDL/Simulation/clock.rst:139
305
321
msgid"An example of how to wait for a rising edge on the clock:"
306
322
msgstr""
307
323
308
-
#:../../SpinalHDL/Simulation/clock.rst:138
324
+
#:../../SpinalHDL/Simulation/clock.rst:147
309
325
msgid"New ClockDomain"
310
326
msgstr""
311
327
312
-
#:../../SpinalHDL/Simulation/clock.rst:140
328
+
#:../../SpinalHDL/Simulation/clock.rst:149
313
329
msgid"If your toplevel defines some clock and reset inputs which aren't directly integrated into their ``ClockDomain``, you can define their corresponding ``ClockDomain`` directly in the testbench:"
0 commit comments