The all zero state just should not be. If it is, it means that the major screw up happened. In the cases where it really matters (such as encryption, gambling machines, etc.) they run the self test sequences at the every few cycles. This is in the addition to all sorts of other precautions.
VLV
Didn't find your answer? Ask the community — no account required.
Back ground info : Using Modelsim in Windows environment, usingVerilog.I'm...
J
John Larkin
That gets into the philosophical issue: should we attempt to detect and correct for transient hardware errors in digital systems? That can apply to config bits in FPGAs (do we check them on a regular basis?), registers in uPs (including PC, SP, etc), values in counters, whatever.
We generally assume that if it's broke, it's broke.
John
S
Spehro Pefhany
I generally do. Check or refresh (sometimes checking has side effects or refreshing has side effects, unfortunately).
If power cycling doesn't happen regularly or cheaply then a flipped bit can have almost the same cost as a hardware failure. Since soft errors are more common than hardware problems, IME, why not try to increase the reliabilty of your product? Of course for bench instruments or if there's a power switch within easy reach, it's not so important, but consider a microcontroller-based signal conditioner sitting out in an inaccessible area of a large plant and powered 24/7 for years and years. For space stuff there's generally a way of recovering from that sort of thing, which is good because single event upsets are more likely in that enviroment.
Best regards, Spehro Pefhany
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
B
bill.sloman
It follows that the 0 0 0 0 0 0 0 0 sequence isn't a lock-up state for your generator. Presumably, one or more of of your XORs is actually an XNOR and the actual lock-up state is something different.
-- Bill Sloman, Nijmegen
J
John Larkin
In most of our recent products, the big heap of dynamic bits are FPGA config bits, sometimes 5 million per chip [1]. They are also, probably, the worst as regards being flipped by neutrons or whatever. And we can't read them back to see if they're OK, and we can't afford to regularly reset the FPGAs and reprogram them.
John
[1] which has to fit into a 4Mbit eprom! Luckily, they compress nicely.
S
slebetman
What's wrong with using the regular XOR feedback but simply invert the output? Surely that eliminates the possibility of lockups (allowing all zero state) and uses just one extra NOT gate:
I agree. I've built pseudo-random noise generators from basic parts (I used chips but today a FPLA would be the thing) and they work. But assuming the "research" doesn't require true random numbers there are chips out there that already do the job and are quite optimized within their parameters.
Of course if you DO need random numbers then things get quit a bit more sticky. In that case you first need a truly random source. Candidates are atomic decay (geiger counters or other detectors of radioactivity), noise diodes (there are chips that do this) or natural noice (the sound between stations) or at very low frequencies one can simply use a keystroke recording a system clock as a randomizer. The problem with all these methods is you MUST check the system output statistics for true randomness. Often things that appear random are not. (a pseudo random noise generator for example) Testing for true randomness is not as simple as you might think!
J
John Fields
That\'s right. There _is_ no lock-up state in the generator.
J
John Fields
The point here, though, is that the machine will get itself unbroke
if it ever accidentally gets into what would normally have been the
lock-up state.
J
John Fields
On Sat, 08 Sep 2007 08:08:10 -0500, John Fields wrote:
And my point is that it shouldn't "accidentally" get into a broken state, any more than the program counter of a CPU should accidentally find itself in never-never land.
If a digital system is unreliable, the cause should be found and fixed. The problem with kluges like this is the same problem with watchdog timers: they hide the real problem, so keep it from getting fixed.
I always turn off the watchdog timer on test units, and protos delivered to customers. I only enable it after we're sure we don't need it.
John
R
Rich Grise
The Xilinx app note says that using the all 1's lockup state is recommended, (i.e., XNOR) because the flip-flops' default powerup state is 0, which is in the sequence, so it doesn't lock up by default. ;-)
Cheers! Rich
J
John Larkin
Shift registers are very cheap in Xilinx chips (you can use the cell config bits) so you can make huge sequences. And you can initialize any shift register to any pattern, so an xor or xnor is equally safe, as long as you init it to something random-ish.
We just did an FPGA that contains eight channels of Gaussian noise generator. Each channel uses, as I recall, eight *long* shift registers of different sequence lengths, with a 16 bit random number manufactured by scrambling bits from various registers. Every shift register is initialized to something different. Clocked at 128 MHz, no channel will repeat a pattern in the life of the universe.
The 16-bit random words are digitally lowpass filtered to produce a nearly-Gaussian probability distrib and programmable -3 dB point, from mHz to 2 MHz.
John
M
MooseFET
Watch dogs don't always recover the system from a glitch. If you are storing data in battery back RAM or flash, you need to be sure that wrong values don't cause things to hang in some non-recoverable way.
M
MooseFET
For that matter it is not actually possible. Any string of bits no matter how long may just be part of a longer repeated string. You have to assume things about what the circuit is doing to be able really test for it being random. This is where you can get into serious trouble because what you assume my blind you to a problem with a random generator.
The odds of getting 10 zeros in a row vs the odds of 100 zeros and etc depends on the low frequency content of the noise. Ac coupling in the circuit messes with this.
G
Guy Macon
I have seen engineers get into trouble that would have been avoided had they only followed the above advice.
Another problem-hider is filling unused ROM with jumps to the reset vector. I only do that on the production units; for the prototype (and sometimes for the pilot run) I like to fill unused ROM with stop instructions.
A technique that I sometimes use when designing toys is to have the button / switch that tells the toy to start moving and making noise cause a hardware reset, and the timeout at the end of play that tells the toy to stop moving and conserve power to invoke the deepest available sleep mode -- usually with the clock stopped entirely -- to be woken up by the next hardware reset. In industrial control applications you sometimes see the same sort of thing but with a counter causing the resets to occur every N seconds. This techniques isn't always applicable (check to see how fast the oscillator can come up, for example; some are annoyingly slow) but in some limited cases it works well.
Guy Macon
J
John Fields
It shouldn\'t, but it can [get into a "broken" state] if that broken
state is allowed to exist. For instance, a glitch on a power supply
rail can cause any number of problems, including putting a shift
register in a prohibited state and causing a circuit to hang.
My circuit (Not "mine" in the sense that I invented it; I didn\'t.)
side-steps the problem by forcing the potentially problematical
normally prohibited state to be part of the sequence.
M
MooseFET
On Sep 9, 8:56 am, Guy Macon wrote: [....]
On the 8051 an erased cell is a worthless instruction that will let the PC count off the end of code space and back in at 0000H. This has the same effect.
I sometimes put a break point at 0FFFFH and run the code just to make sure it doesn't happen.
An external watchdog to force the hardware into a safe state is a very useful thing for making faults less costly. Here's an example of something I have suggested humorously but would never in fact implement:
Micros today commonly have an ADC so they can measure their own supply voltage if the supply is not the reference for the ADC.
A very low parts count bucker regulator could be made if the micro measured its supply voltage and turned off the pass transistor if the voltage was more than the set point. The hardware would have to default to turning the pass transistor on so that the system starts up.
J
John Larkin
Some things have to run continuously, with microsecond response to inputs, so can't be periodically reset. Most of my products have long startup times, too, as long a 5 seconds, so a true system reset is pretty traumatic.
The reliability of a good digital system should be dominated by classic hardware MTBF, not by bugs or glitches. It should have *no* bugs or glitches.
John
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.