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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [doc/] [src/] [guides/] [reset_sys_design.html] - Blame information for rev 103

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

Line No. Rev Author Line
1 19 jt_eaton
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<html>
3
<head>
4 27 jt_eaton
  <meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
5
  <title>Reset System Design</title>
6 19 jt_eaton
  <meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)">
7
  <meta name="CREATED" content="0;0">
8
  <meta name="CHANGED" content="20100309;9305300">
9
  <meta name="KEYWORDS" content="start">
10
  <meta name="Info 3" content="">
11
  <meta name="Info 4" content="">
12
  <meta name="date" content="2008-01-08T12:01:41-0500">
13
  <meta name="robots" content="index,follow">
14
  <style type="text/css">
15
        <!--
16
                H3.western { font-family: "Albany", sans-serif }
17
                H3.cjk { font-family: "HG Mincho Light J" }
18
                H3.ctl { font-family: "Arial Unicode MS" }
19
        -->
20
        </style>
21
</head>
22
<body dir="ltr" lang="en-US">
23
<div id="toc__header" dir="ltr">
24
<p><br>
25
</p>
26
</div>
27
<h1><a name="socgen_project"></a>Design considerations for Reset
28
Systems<br>
29
</h1>
30
<p><br>
31
<br>
32
</p>
33
<p>In a world as fast moving as the semiconductor industry&nbsp; it is
34
essential that all designers continuously update their knowledge as the
35
technology changes. It is very easy to become complacent and then
36
suddenly discover that the techniques that have served you for many
37
years no longer work.&nbsp; <br>
38
<br>
39
</p>
40
<p>This paper was written to explore some of the mistakes that reset
41
system designers have made over the years and why they are no longer
42
true.<br>
43
</p>
44
<h3 class="western"><br>
45
</h3>
46
<h3 class="western"></h3>
47
<h3 class="western">Do we really need a reset system? <br>
48
</h3>
49
<p>Actually you don't. It is a good design practice to ensure that
50
there are no dead end states in your logic and that any state will
51
eventually lead into a valid operating mode. For many years designs
52
were simple and robust enough that they would function even if they
53
were enabled without a reset. Then along came embedded processors and
54
the world became much more complex. I have seen some pretty audacious
55
attempts to create a watchdog&nbsp; to detect and restart a lost system
56
but the best that they can do is to improve the odds that the system
57
will recover. None of them were 100%.<br>
58
</p>
59
<p>It is possible that you do not need to reset all the storage
60
elements in a design. In many cases the data is reloaded shortly before
61
it is needed and it doesn't care what it was before that time. Some
62
designers will leave certain storage elements off of the power on reset
63
because it has no effect on the operation.<br>
64
</p>
65
<p>BUT.<br>
66
</p>
67
<p>There was a mathematician named Fermat who came up with a theorem
68
that eventually became known as Fermat's last theorem. It was a simple
69
little equation that worked in every test case that&nbsp; they threw at
70
it and they threw a lot of test cases at it. But it took over 350 years
71
before someone could prove that it would really work in all cases.</p>
72
<p><br>
73
If you allow your designers the option to leave storage elements off
74
the power on reset system then they will come up with these wonderful
75
little designs that appear to work and they will work in any test case
76
that you throw at it. But it will take you FOREVER to fully verify that
77
it will work in all cases.<br>
78
</p>
79
<p>You do not need a power on reset system for your logic to work. You
80
need it&nbsp; in order to verify that your logic works.&nbsp; It takes
81
longer to verify a design than it does to create it and not providing a
82 27 jt_eaton
100% known start up condition will make the verification effort that
83 19 jt_eaton
much harder. All storage elements must be on a reset if only for test
84
and verification purposes. If you have logic that must function during
85
a power up reset then put it on a special reset that is only active in
86
test mode.<br>
87
</p>
88
<br>
89
<h3 class="western">All components must come out of reset on exactly
90
the same clock<br>
91
</h3>
92 27 jt_eaton
That's true, or at least it was back in the 60's.&nbsp; Back then every
93 19 jt_eaton
component would come out of reset and start "componenting". The reset
94
system acted like a conductor&nbsp; so that everybody started on the
95
same beat. Those types of systems are rare today. Most major chips have
96
one or more microprocessors in side so components come out of reset
97
only to sit there waiting for the cpu to configure them and get them
98
started.&nbsp; It doesn't matter what cycle you come out of reset on as
99
long as you are up and ready&nbsp; before someone else asks you to do
100
something. <br>
101
<br>
102
This has led to two prong approach to reset system design.&nbsp; The
103
majority of the chip is on a large slow reset distribution&nbsp;
104
tree&nbsp; that doesn't even try&nbsp; to get&nbsp; everybody reset on
105
the&nbsp; same cycle.&nbsp; Then you have a second&nbsp; smaller and
106
faster tree that only resets the cpu and anything else that can&nbsp;
107
initiate activity.&nbsp; The fast reset is delayed long enough to
108
ensure that the slow reset is finished before starting the cpu. In
109
modern designs this can be a significant number of clock cycles. I have
110
seen repairable memories where you had to hold off starting the cpu for
111
3000 clocks to ensure that any repair would be finished before the cpu
112
started.<br>
113
<br>
114
<br>
115
<h3 class="western">You must design an asynchronous reset system<br>
116
</h3>
117
Absolutely. Most of the time your mission mode requirements will
118
dictate that the power on reset system works even in the absence of
119
clock. If it doesn't then the test engineer will require that all pads
120
must respond to an async reset in case a board is built missing it's
121
clock. Asynchronous reset design is essential.&nbsp; A power up monitor
122
will drive the reset input&nbsp; active&nbsp; as the power is ramping
123
up. You will not have a clock at this time so the reset system must be
124
able to work without one.<br>
125
<br>
126
<br>
127
<br>
128
<h3 class="western">You must design your logic using synchronous design
129
methods<br>
130
</h3>
131 27 jt_eaton
Absolutely. Today's chips are huge. The only way that you can close
132 19 jt_eaton
timing on a large design is if everyone follows strict synchronous
133
design rules.&nbsp; The mistake that many of todays designers make is
134
that they think that because they have to design an asynchronous reset
135
system that they get an exemption from following the rules for
136
synchronous design.&nbsp; Sorry guys, it not one or the other its BOTH.
137
You have to design a asynchronous reset system but you cannot use any
138
flip flops with an asynchronous reset port.<br>
139
<br>
140
The funny thing is that synchronous design methodology is quite
141
capable&nbsp; of&nbsp; creating an asynchronous reset&nbsp; system and
142
will actually&nbsp; give you&nbsp; a smaller and faster design that
143
either of the traditional&nbsp; async only or sync only solutions.<br>
144
<br>
145
<br>
146
<h3 class="western">Don't worry about making the reset system
147
testable.The test engineer has a tool that will fix any problem in the
148
back end<br>
149
</h3>
150
That used to be true. The first thing a vendor does when they get a net
151
list is to run a full drc that looks for dft issues. If anybody has any
152
signals crossing between&nbsp; the async reset port on a flipflop and
153
either a D or a Q port then it flags it as a violation. So you can
154
either send it back to the customer and wait a week for them to find
155 27 jt_eaton
it, fix it, and re-synthesizes or you can eco in a test mux at the flop
156 19 jt_eaton
and have it fixed in 5 minutes. Everyone took the easy way out.<br>
157
<br>
158
But then along came Logic equivalence checking (LEC).&nbsp; The final
159
routed net list will be sent back and compared with the customers
160
golden net list and all of these ecos will show up&nbsp; in the report.
161
Now somebody has check out each and every item in the report&nbsp;
162
before you can release the masks. It now&nbsp; becomes easier for the
163
customer to find and fix these errors before synthesis than it is to
164
deal with thousands of lec errors.<br>
165
<br>
166
Besides with the newer processes the days when you could eco in a small
167
tweak on a routed net list and not have it break something are fast
168
disappearing.&nbsp; You will eco the rtl code and then re-synthesis and
169
reroute.<br>
170
<br>
171
<br>
172
<br>
173
&nbsp;<br>
174
<br>
175
<h3 class="western">You must use a sync_reset pragma if you design a
176
synchronous reset system<br>
177
</h3>
178
I cringe whenever I hear someone&nbsp; say this. If you do a
179
synchronous reset design then you will find that your gate simulations
180
will not run. Many of your flipflops will never reset to a known value.
181
They will get a valid clock and the reset in the block will be valid
182
but synthesis will have combined the reset logic in with the mission
183
mode logic and it will be distributed throughout the logic cone feeding
184
the D input. It also uses the flops current state in order to compute
185
the next state.&nbsp; It creates a situation where if the flop has a 0
186
or 1 in it then the logic will compute the next state as 0 when reset
187
is active. However if the flop is unknown as it is at power up then
188
verilog is unable to figure out the correct next state and it remains
189
at x.<br>
190
<br>
191
This is a simulation only issue as flops in real silicon will always
192
resolve to a valid state.<br>
193
<br>
194
Tool vendors created the sync_reset pragma so that you could tell the
195
tool not to combine the reset logic with the mission mode logic. You
196
place it at the very tip of the logic cone and it will remain there in
197
gates.<br>
198
<br>
199
So whats wrong with that?<br>
200
<br>
201
The synthesis tool will make a list of all signals that enter the logic
202
cone along with the relative time it enters before the next clock
203
edge.&nbsp; If it finds a early arriving signal entering the cone
204
closer to the tip than a late arriving one&nbsp; then it&nbsp; will try
205
to remap the logic&nbsp;&nbsp; and swap them so that the late
206
arrival&nbsp; can&nbsp;&nbsp; move closer to tip.&nbsp; Ideally the
207
latest signals are moved towards the tip and the early ones are moved
208
to the rear. <br>
209
<br>
210
The reset from a properly designed distribution tree and the feedback
211
signal from the flop that you are working on will always be two of the
212
earliest signals. They will get pushed up away from the tip of the cone
213
simply to make room for the mission critical late signals. This is a
214
good thing, you want this to happen. <br>
215
<br>
216
The problem is that designers think that they must prove that the reset
217
system works in gate sims. Verilog is a great tool when every node is
218
in a known state but it is lousy when dealing with unknowns. There are
219
times like this when it is possible to resolve a X into a known
220
value&nbsp; and it can't. There are also times when it will resolve an
221
X to a known value when it shouldn't. The only way to use verilog is to
222
start with everything in a known state and stop it when anything goes
223 27 jt_eaton
X.&nbsp; That means there's a problem and nothing downstream from that
224
X
225 19 jt_eaton
can be trusted.<br>
226
<br>
227
<br>
228
You do not prove your reset system design in gates sims. You prove the
229
design in rtl sims and use LEC to prove that gates matches the design
230
that works.&nbsp; Then you use initial statements to force all flops to
231 27 jt_eaton
a known state at start up and use gates sims to prove that everything
232 19 jt_eaton
else works. Verilog gates is the wrong tool to use to verify the reset
233
system.<br>
234
<br>
235
You never use the sync_reset pragma unless you really like big slow
236
designs.<br>
237
<br>
238
<br>
239
<br>
240
<br>
241
<br>
242
<br>
243
<br>
244
<br>
245
<br>
246
<h3 class="western">Doing a synchronous reset design adds logic in the
247
D pathway and will slow down the design<br>
248
</h3>
249
<br>
250
Wrong. Adding logic in the critical path will slow down the design.
251
Adding it into a non-critical path simply reduces slack in that path.
252
If you put the reset logic at the very tip of the logic cone then you
253
are adding it into the critical path and the synthesis tool will move
254
it up the cone&nbsp; until&nbsp; it is in a&nbsp; safe location.<br>
255
<br>
256
Adding a synchronous reset system doesn't really add much logic to the
257
design. The tools will first locate any mission mode logic that also
258
forces the flop into the reset state and it will piggyback the reset
259
system with that logic. You don't add gates , you bump a gate up to add
260
an extra input.<br>
261
<br>
262
<br>
263
<br>
264
<h3 class="western">A component must perform&nbsp; reset in one clock
265
cycle<br>
266
</h3>
267
The power on reset is really a slow operation.&nbsp; A typical system
268
could see:<br>
269
<br>
270
<ul>
271
  <li>Ramp time for power rails</li>
272
  <li>clock start up time</li>
273
  <li>pll lock time</li>
274
</ul>
275
You are looking at activity that is measured in the milliseconds on a
276
system clock that is measured in the nanoseconds. Performing a reset in
277
one clock cycle&nbsp; requires adding logic to every single flipflop<br>
278 28 jt_eaton
to provide nanosecond resolution to an event that is measured in
279
microseconds. A designer should only add reset logic as a last
280 27 jt_eaton
resort. The preferred method is to use the existing mission mode logic
281 19 jt_eaton
to perform the reset. If you have a computational block with a fifty
282
stage deep pipeline then reset should force it's inputs to 0 and open
283
all the gates so that every flipflop will be flushed out in 50 clocks.
284
Better yet would be to have the block feeding your input force it's
285
output to all 0's during reset.<br>
286
<br>
287
Every design should spec a multicycle reset and give the designers the
288
freedom to reset any way they want as long as it's finished by the end
289
of the reset pulse.<br>
290
<br>
291
<br>
292
<br>
293
<br>
294
<br>
295
<br>
296
<br>
297
<br>
298
<br>
299
<br>
300
<br>
301
<div id="toc__header" dir="ltr">
302
<p><br>
303
</p>
304
</div>
305
<h1><a name="socgen_project"></a>How to design the Reset System<br>
306
</h1>
307
<br>
308
<br>
309
<h3 class="western">1) Write a mission statement<br>
310
</h3>
311
The first step in any design task is to write a statement that sums up
312
what the thing you are designing&nbsp; will do.&nbsp; This is important
313
because everything after this point must be traceable back to this
314
statement.&nbsp; The statement will&nbsp; tell you&nbsp; what&nbsp;
315
steps you must follow. Anything that you cannot trace back to something
316
in the mission statement is not part of the design<br>
317
<br>
318
<br>
319
The mission statement for the reset system is:<br>
320
<br>
321
<br>
322
<br>
323
The reset system will force all the nodes in a system or subsystem into
324
a known good state while&nbsp; a reset trigger is active.<br>
325
<br>
326
<br>
327
<br>
328
<h3 class="western">2) Define the reset triggers<br>
329
</h3>
330
We must now make a list of all the events that will cause us to reset
331
all or part of the system. Our list is:<br>
332
<br>
333
<ul>
334
  <li>The design has a power monitor chip that provides a low signal
335
when the supply rails have&nbsp; not been above the limit for a long
336
enough period of time</li>
337
</ul>
338
<ul>
339 27 jt_eaton
  <li>The design has a soft reset block that can reset any sub block if
340 19 jt_eaton
its reset flop is set to 1.</li>
341
</ul>
342
<ul>
343
  <li>The clocks must run during reset but the divider has a special
344
reset input for simulation and testing</li>
345
</ul>
346
<ul>
347
  <li>The design has ieee 1149.1 test logic with a active low trst* pin.</li>
348
</ul>
349
<ul>
350
  <li>The reset signal&nbsp; has a metastable filter to sync it with
351
the clock.<br>
352
  </li>
353
</ul>
354
The last is important because some designers will forget that the
355 27 jt_eaton
filtered output is actually it's own separate reset domain<br>
356 19 jt_eaton
<br>
357
<br>
358
<br>
359
<br>
360
<h3 class="western">3) Define a known good state<br>
361
</h3>
362
We&nbsp; now look at every storage element in the design and define a
363
safe state for each&nbsp; element of either 1 or 0. Don't cares are not
364
allowed. If you cannot pick a value then one will be assigned for you.
365
This task is best performed after the system and board designers have
366
defined the known good state for the PCA.&nbsp; They will define the
367
state for all of the pads, the ic design team must define the states
368
for all internal nodes.<br>
369
<br>
370
<h3 class="western">4) Assign storage elements to triggers<br>
371
</h3>
372
Once we have a list of all storage element we list any and all triggers
373
that will force them into a safe mode.<br>
374
A typical list would list all the flipflops in timer module u12.r567
375
would be reset by:<br>
376
<br>
377
<ul>
378
  <li>an active high on soft reset bit #23</li>
379
</ul>
380
<ul>
381
  <li>an active low on the power monitor input</li>
382
</ul>
383
<ul>
384
  <li>an active low on the simulation/test reset</li>
385
</ul>
386
<ul>
387
  <li>an active low on the output of the metastable filter</li>
388
</ul>
389
<br>
390 27 jt_eaton
The jtag reset is not included because it doesn't reset the
391
timer.&nbsp;
392 19 jt_eaton
Once this step is complete it will provide a map for the reset
393
distribution tree that you will need. The best way to distribute the
394
reset over a large design is to use what is called a "synchronous reset
395
tree".<br>
396
<br>
397
<br>
398
<br>
399
<br>
400
<br>
401
<h3 class="western">5) Select between synchronous or asynchronous reset
402
system<br>
403
</h3>
404
At this point it is easy to see if we need a synchronous or
405
asynchronous reset system. If your trigger is asynchronous then you
406
must design a asynchronous reset system. If the trigger can occur
407
without a clock then you must be able to reset the system without a
408
clock.<br>
409
<br>
410
If the trigger is synchronous then you may design a synchronous reset
411
system or you may also choose to design a asynchronous one.&nbsp; The
412
async one will enter reset one&nbsp; cycle&nbsp; before the sync one
413
but they will both exit on&nbsp; at the same&nbsp; time. <br>
414
<br>
415
<br>
416
<br>
417 27 jt_eaton
<h3 class="western">6) Select reset style for each flip/flop<br>
418
</h3>
419
We now need to select a reset "Style" for each flip/flop from the four
420
possible reset styles.<br>
421 19 jt_eaton
<br>
422
<br>
423 27 jt_eaton
<ul>
424
  <li>Synchronous</li>
425
  <li>Synchronous with output override</li>
426
  <li>Asynchronous</li>
427
  <li>Both Synchronous and Asynchronous</li>
428
</ul>
429 19 jt_eaton
<br>
430 27 jt_eaton
If the reset system is synchronous then you may choose any of the four
431
styles. If it is asynchronous then you cannot use the synchronous style.<br>
432 19 jt_eaton
<br>
433
<br>
434
<br>
435
<br>
436
<br>
437 27 jt_eaton
<img style="width: 800px; height: 600px;" alt=""
438
 src="../png/reset_fig1.png"><br>
439 19 jt_eaton
<br>
440
<br>
441
<br>
442
<br>
443
<br>
444
<br>
445
<br>
446
<br>
447 27 jt_eaton
<h3 class="western">7) Apply DFT fixes to all asynchronous ports<br>
448
</h3>
449
All paths from the Q output of a flip/flop to the asynchronous
450
reset/preset port of a flip/flop must be disabled during scan testing.
451
The use of a test mux to do this is not recommended because anytime you
452
use a test mux you are not testing the circuit as it is used in mission
453
mode. There will always be at least one point of failure inside the
454
test mux where scan tests will pass but the IC will not function.<br>
455 19 jt_eaton
<br>
456 27 jt_eaton
The recommended method is to gate off the synchronous path with a atg
457
test signal and then recombine it with an asynchronous reset so that
458
the async reset it self is still testable. The lib module
459
cde_asyncdisable is available for this purpose. DO NOT CREATE YOUR OWN
460
TEST LOGIC.&nbsp; Checking the rtl code to ensure that all asynchronous
461
resets are testable requires a fairly sophisticated and expensive tool.
462
Checking the rtl to ensure that all asynchronous resets are properly
463
connected to a cde_asyncdisable module takes a simple perl script.<br>
464 19 jt_eaton
<br>
465 27 jt_eaton
<br>
466
<br>
467
<br>
468
<br>
469
<br>
470
<img style="width: 800px; height: 600px;" alt=""
471
 src="../png/reset_fig2.png"><br>
472
<br>
473 19 jt_eaton
<p><br>
474
<br>
475
</p>
476
<p><br>
477
<br>
478
</p>
479
<p><br>
480
<br>
481
</p>
482
<p><br>
483
</p>
484 28 jt_eaton
<h3 class="western">8) Seperate Synchronous and&nbsp; Asynchronous
485
resets<br>
486
</h3>
487
Asynchronous
488
resets connect to the asynchronouse reset/preset ports of a flip/flop.
489
Synchronous resets connect through the logic cone to the D flip/flop
490
port. They are the logicaly the same signal in mission mode but must be
491
sperate&nbsp; during scan testing. It is very easy to make a mistake in
492
rtl coding.&nbsp; The recomendation is the use active low signals for
493
all asynchronous resets and active high signals for all synchronous
494
ones.<br>
495 19 jt_eaton
<p><br>
496 28 jt_eaton
</p>
497
<p><br>
498 19 jt_eaton
<br>
499
</p>
500
<p><br>
501
<br>
502
</p>
503
<p><br>
504
<br>
505
</p>
506
<p><br>
507
<br>
508
</p>
509
<p><br>
510
<br>
511
</p>
512
<p><br>
513
<br>
514
</p>
515
<p><br>
516
<br>
517
</p>
518
<p><br>
519
<br>
520
</p>
521
<p><br>
522
<br>
523
</p>
524
<p><br>
525
<br>
526
</p>
527
<p><br>
528
<br>
529
</p>
530
<p><br>
531
<br>
532
</p>
533
<p><br>
534
<br>
535
</p>
536
<p><br>
537
<br>
538
</p>
539
<p><br>
540
<br>
541
</p>
542
<p><br>
543
<br>
544
</p>
545
<p><br>
546
<br>
547
</p>
548
<p><br>
549
<br>
550
</p>
551
</body>
552
</html>

powered by: WebSVN 2.1.0

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