In article <
[email protected]>,
[email protected] says...
> > But in your equations you have:
> > ACK <= EMPTY and WRITE;
> > ...which infers a gate and thus at least a gate delay between ACK and
> > EMPTY.
> Yes, but in the example the ACK signal is calculated for another purpose (to
> inform data provider that we consume the data). Thus, I have this data delay
> in any case, whether control loading by EMPTY or ACK.
Sure, but the slack for this register will be better, allowing easier
PAR and perhaps allowing a better solution for something else. There
is no point in making things worse.
> > > However, if reg loading
> > > controlling signal turns out to appear at the longest trace this option
> may
> > > gain sense. But (I may mistake) in modern HW traces play as an important
> > > role as the gates. If a signal is available at a certain part of a
> design
> > > then why to trace another one?
> >
> > This is an unknown in this problem. If this is a big problem, I'd do
> > it both ways and let synthesis/PAR work out the best solution. This is
> > often done, though I don't think I've done it at this low of a level
> > (usually different implementations of larger blocks).
> May be this is not a big problem, but lots of small problems is always a one
> big problem. Bad style means you have small errors/drawbacks throughout your
> code. As I'm relatively young to HW I try to develop a good style.
Good plan. Be consistent with your style and white-space too. Lots of
comments also make for a good style. I always spend a lot of time
making things easy to read. It *undoubtedly* will save me time next
week figuring what the hell I just did.
>
> > Let the software do its thing. ;-)
> Load the reg with *don't care* when it is empty and with data input on ACK?
No. Don't use "don't cares" in synthesizable logic. The "don't care"
state isn't realizable and the synthesizer may puke.
You should also have a reset clause in your process.
> Good idea. But synthesier placer, router are still different tools. From the
> sithesier point of view, there is no difference in delay controlling the
> load.
That depends on your toolset. The toolset I used had delays built into
the synthesizer. They weren't always of great use because, as you
note, wiring delay is significant and the synthesizer can't know where
PAR puts things. OTOH, if your PHB is rich (I had a virtually
unlimited budget ;-) there are physical synthesis tools out there that
can do a much better job before PAR.
> I don't stop wonder how intelligent sometems morern tools can be, but
> in general they are stupid. Optimization task is NP-complete, it is always
> better to simplify SW can optimize a design replacing its parts as far as
> behafviur is the same.
The problem is that your synthesizer doesn't have all the information
needed to do the job you're asking it to do. You need timing feedback
from the PAR tools.
>
> **** Let the software do its thing *****
> if ACK then
> DATA_REG <= DATA
> elsif EMPTY then
> DATA <= '-';
> -- else hold value
> end if;
Ack! ;-) You're using ACK as your clock and it's going to produce a
level sensitive latch (not good in most technologies). (or did you just
leave out the clock?)
It's also rather unlikely that your target technology has a '-' level.
What I meant by "letting the software do its thing" was implement it
both ways and see which does a better job. Let the software tell you
where the negative slack is, then fix it. This sort of thing is likely
going to be highly implementation dependant. There is unlikely a "best
way", other than not to shoot yourself (before you need to ;-).
--
Keith