P
Peter Alfke
Guest
Let me get back to the fundamental problem:
We distribute a (p)reset signal all over the chip. The problem is not the
activating edge of this signal, it's the release of (p)reset. No matter how
we distribute and phase it (unless there is only a single user clock of
relatively low frequency) the trailing edge will not appear at every
flip-flop in the same clock period. Whether the (p)reset is asynchronous or
synchronous does not matter. I do not see a way to solve this dilemma on the
chip-hardware-design level.
I suppose the software could be made smart enought to handle this, same as
smart designers can design around this. Especially with an elegant construct
like SRL16.
Peter Alfke
We distribute a (p)reset signal all over the chip. The problem is not the
activating edge of this signal, it's the release of (p)reset. No matter how
we distribute and phase it (unless there is only a single user clock of
relatively low frequency) the trailing edge will not appear at every
flip-flop in the same clock period. Whether the (p)reset is asynchronous or
synchronous does not matter. I do not see a way to solve this dilemma on the
chip-hardware-design level.
I suppose the software could be made smart enought to handle this, same as
smart designers can design around this. Especially with an elegant construct
like SRL16.
Peter Alfke
From: Jim Lewis <Jim@SynthWorks.com
Organization: Posted via Supernews, http://www.supernews.com
Newsgroups: comp.arch.fpga,comp.lang.vhdl
Date: Wed, 14 Jul 2004 12:01:13 -0700
Subject: Re: FSM in illegal state (conclusion)
Rick,
These circuits are typically FSM, counters and the like.
Normally the data path does not care about reset since it
will immediately go to the correct state on the next clock.
I am a former ASIC designer. I think I understand this
part well. I do have a couple concerns. First I want a
reset methodology that is device independent and
simulates well for any ASIC or FPGA technology not
just specific to Xilinx. Hence, everything that requires
reset will need the synchronized reset. I agree most
data path does not need reset (except for on some ASIC designs
to get the device to pass vectors more easily on the tester).
My second concern is that selective reset is not for
everyone. For some this methodology will cause chaos.
For a design review with selective reset, this is just
one more item that needs to be reviewed in detail.
One circuit you can add to any FSM to provide a sync reset is just one
or a pair of FFs which work just like a metastability reduction
circuit. Have the GSR hold these FFs in the '1' state and wire the D
input of the first one to a '0'. The last output will be your sync
reset. The sync reset will be held for one or two clock edges after the
release of GSR. This will only need to be used by the first two bits of
a one-hot FSM, the first changed bit of a gray coded counter, the first
bit of a JRC or even the first bit of a binary counter (assuming it
starts at 0); and so will not overly complicate them and slow them
down.
To me this seems like Chaos**n. Not that it will not work,
it just adds more details you need to manage.
This methodology would have to buy me something significant
(speed or device size) for me to want to do additional
analysis and verification to prove that a circuit designed
as above actually works under all conditions.
If this is possible, is there a VHDL coding methodology
that you can recommend? The big missing piece for me
is how do I access the output of GSR?
This is something that should be added to Peter's app note.
#1: Explicitly through instantiation?
#2: Implicitly through initializing the VHDL
signals that create the registers?
Although this technique seems possible in XST,
would it also work the same in other synthesis tools?
#3: Put the reset logic in a separate hierarchical
block and explicitly code an asynchronous reset, but
at the next level of the design tie the asynchronous
reset to a constant inactive value?
You don't need to access the GSR signal explicitly. If you provide an
async reset control that is common to most/all of your sequential logic,
I believe the tools will infer the GSR.
run_en_reg: PROCESS (sysclk, reset) BEGIN
IF (reset = '1') THEN
run_en <= '0';
ELSIF (rising_edge(sysclk)) then
run_en <= '1';
END IF;
END PROCESS;
This sounds like it would address my needs nicely.
What do you connect reset to? Do you just leave
it floating? What do you do with it in simulation?
If there is something here that would work with
XST, Synplicity, and Mentor, without changing the
code, this would make me happy. Especially if
the only thing I needed to change for each FPGA/ASIC
technology is the reset block and where the power-on
reset comes from.
You can learn a lot about it by reading how the end of configuration
works. But the main thing is to stop assuming that the end of GSR is a
synchronous event. On other chips we get used to the reset just working
(like magic). In the FPGA we need to give it a little thought, even if
it is not really hard.
On ASICs reset is explicit. On your flow above with Xilinx,
I code reset on the register, hook it to ?? or leave it
unconnected, and then "magically" it gets connected to GSR.
Is there a datasheet, manual, or appnote you recommend reading
on configuration.
Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787
Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~