C
Carl
Guest
I agree Andy - making this into a function makes the code cleaner and
is preferred if I would use this more than once.
is preferred if I would use this more than once.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Carl,I agree Andy - making this into a function makes the code cleaner and
is preferred if I would use this more than once.
sorry correcting myself: there is one register between bit0 and d0.The big flaw is the combinatorial feedback of bit 0. since d0 <=
xnor...bit0
and bit0 is assigned do.
Kaz
---------------------------------------
Posted through http://www.FPGARelated.com
I can't understand your advice. For more than a decade I have used ModelSiI advice using delays in general to help debuging code and to detect
inadverted clock-2-data race conditions when clock is going over
several signal assignments, but for me, this means, that I usually
only delay signal assignments from clock edge in clocked process, in
usual code thats enough to see, if data changes before or after clock
edge.
bye Thomas
I agree, I don't like and would not advocate adding these type of delaysI advice using delays in general to help debuging code and to detect
inadverted clock-2-data race conditions when clock is going over
several signal assignments, but for me, this means, that I usually
only delay signal assignments from clock edge in clocked process, in
usual code thats enough to see, if data changes before or after clock
edge.
bye Thomas
I can't understand your advice. For more than a decade I have used ModelSim
to
functionally verify chains of DSP modules and never needed to put any
delay
inside RTL code. In the top level testbench all inputs are generated on the
clocks so I wouldn't worry about delta delay problem.
Kaz
I have sometimes had to put delays on I/O signals between my FPGA andI advice using delays in general to help debuging code and to detect
inadverted clock-2-data race conditions when clock is going over several
signal assignments, but for me, this means, that I usually only delay
signal assignments from clock edge in clocked process, in usual code
thats enough to see, if data changes before or after clock edge.
I can't understand your advice. For more than a decade I have used
ModelSim to functionally verify chains of DSP modules and never needed
to put any delay inside RTL code. In the top level testbench all inputs
are generated on the
clocks so I wouldn't worry about delta delay problem.
In DSP I guess you have in general only one clk and all modulesI advice using delays in general to help debuging code and to detect
inadverted clock-2-data race conditions when clock is going over
several signal assignments, but for me, this means, that I usually
only delay signal assignments from clock edge in clocked process, in
usual code thats enough to see, if data changes before or after clock
edge.
I can't understand your advice. For more than a decade I have used ModelSim
to
functionally verify chains of DSP modules and never needed to put any
delay
inside RTL code. In the top level testbench all inputs are generated on the
clocks so I wouldn't worry about delta delay problem.
Even funnier when the clock assignment is helpfully implemented for you,clk1 <= clk;
Then clock things with 'clk' and 'clk1' and watch them not work. In
this instance the 'clk1 <= clk;' assignment would not be implemented in
any hardware but the simulator would be off by a delta cycle.
Kevin Jennings
On Wed, 28 Nov 2012 03:17:44 -0600, kaz wrote:
I advice using delays in general to help debuging code and to detect
inadverted clock-2-data race conditions when clock is going over
several signal assignments, but for me, this means, that I usually only
delay signal assignments from clock edge in clocked process, in usual
code thats enough to see, if data changes before or after clock edge.
I can't understand your advice. For more than a decade I have used
ModelSim to functionally verify chains of DSP modules and never needed
to put any delay inside RTL code. In the top level testbench all inputs
are generated on the clocks so I wouldn't worry about delta delay
problem.
I have sometimes had to put delays on I/O signals between my FPGA and
vendor-supplied models, e.g. for memory devices, to make a board level
behavioural simulation match the real world.
If I didn't, data would appear a cycle early, or be written to an
off-by-
one address, or the "data stable" eye would miss my sampling point, etc.
I think this is justifiable as making the FPGA model more closely match
its real world behaviour, but I have never had to do the same
internally!
But now you're letting this guy's postings bother you so much that the two sentences you just wrote contradict each other.Why is this an issue?
It's not an issue. I was only pointing out that there is no need
for you "to feel for him" (For full disclosure and
information only: it is actually an issue for me personally
I don't follow how you think it makes no sense for you to write high quality blogs alongside someone who you (and apparently others) think writes low quality ones. If APP has no editorial board or peer review process (which is what it looks like to me), then there is no quality control mechanism other than the replies to the blog. So you can't choose your fellow bloggers....but you can control that by blogging elsewhere if you so choose.- since some time I am also a blogger on APP and I have spent
lots of time trying to write high quality blogs. That makes
little sense if it turns out you can write anything you want
without having to worry about correctness.)
It's a personal issue for me, but it shouldn't become one forOn Thursday, November 29, 2012 2:30:50 PM UTC-5, Jan Decaluwe wrote:
Why is this an issue?
It's not an issue. I was only pointing out that there is no need
for you "to feel for him" (For full disclosure and information
only: it is actually an issue for me personally
But now you're letting this guy's postings bother you so much that
the two sentences you just wrote contradict each other.
From those replies (or lack of replies) I infer, perhapsI don't follow how you think it makes no sense for you to write high
quality blogs alongside someone who you (and apparently others) think
writes low quality ones. If APP has no editorial board or peer
review process (which is what it looks like to me), then there is no
quality control mechanism other than the replies to the blog.
Correct. So the question I have to answer for myself is whetherSo you can't choose your fellow bloggers...but you can control that by
blogging elsewhere if you so choose.
You are right, that clock gateing might destory a bit the story, butActually your example does not quite demonstrate the point you were making. In your example, you have actual function (the muxing and enabling) between the clocks so you're describing a gated clock system. That system, if built, could very well behave exactly as you have described but not be what the designer intended simply because the designer did not account for the clock skew. The simulation without the added delay very well may describe the actual hardware. In this case, adding the delay 'to fix the simulation' would be sweeping the design error under the rug until it eventually is uncovered in real hardware.
To demonstrate your point though you simply need to generate the new clock as this:
clk1 <= clk;
Then clock things with 'clk' and 'clk1' and watch them not work. In this instance the 'clk1 <= clk;' assignment would not be implemented in any hardware but the simulator would be off by a delta cycle.
My understanding is that logic delays in FPGAs are always longer thanYou are right, that clock gateing might destory a bit the story, but
in general clock skew is handled during layout and checked by STA.
During simulation of rtl code I have to assume, that layout does not
destroy my functionality, otherwise I could stop simualtion anyway.
regards Thomas
Indeed. Altera recommends using the reset async port but with sync signaOn 11/30/2012 12:55 AM, Bart Fox wrote:
rickman wrote:
I have no idea why you say an async reset won't work in a sync design.
Do I misunderstand your statement? I am talking about FPGAs where every
chip has an async reset during configuration. You can choose to use
this in your design or not, but it is there and it works no matter what
you do. I supposed I should have qualified my statement to FPGAs that
use RAM configuration and have to be configured. There aren't a lot of
true flash based device that come up instantly without a configuration
process.
Rick
pre-synchronised. Xilinx, I believe, recommends using synchronous syncOn 11/30/2012 12:55 AM, Bart Fox wrote:
rickman wrote:
I have no idea why you say an async reset won't work in a sync design.
Do I misunderstand your statement? I am talking about FPGAs where ever
chip has an async reset during configuration. You can choose to use
this in your design or not, but it is there and it works no matter what
you do. I supposed I should have qualified my statement to FPGAs that
use RAM configuration and have to be configured. There aren't a lot of
true flash based device that come up instantly without a configuration
process.
Rick
Indeed. Altera recommends using the reset async port but with sync signal
Short of required hand placement, there is no way to 'handle' clock skew in layout in an FPGA/CPLD. Logic induced skew between any two clocks creates two clock domains. If the design is such that the two clocks are treated as unrelated (for example if data only moves from one domain to the other through a dual clock fifo) then the design will work. You might get lucky, you might not if you think that any place and route tool will help you out here. Most likely you will encounter the 'bad' sort of luck, not the 'good luck'.On 11/30/2012 4:05 AM, Thomas Stanka wrote:
You are right, that clock gateing might destory a bit the
story, but in general clock skew is handled during layout and
checked by STA. During simulation of rtl code I have to assume,
that layout does not destroy my functionality, otherwise I
could stop simualtion anyway.
It doesn't need to depend on routing. Thomas' example introduced a logic delay between the two clocks. The implementation of that logic will create a race condition.On Friday, November 30, 2012 3:07:17 PM UTC-5, rickman wrote:
My understanding is that logic delays in FPGAs are always longer
than clock delays on the clock trees so that you can't have a
hold time violation. If the clock is routed on the signal routing
then all bets are off. I don't know how well the timing analysis
does with verifying clock delays on the signal routing because I
have never needed to use it that I can remember