K
KJ
Guest
On Jan 10, 10:47 am, Amal <akhailt...@gmail.com> wrote:
<snip>
Rather than repeat what Jim says, I'll simply say that I agree with
it.
that is that you won't waste any time simulating to find that you have
inadvertantly connected multiple drivers to a signal that you intend
to only have one source. By using std_ulogic(vector), you're telling
the compiler that there is only one driver so it will immediately flag
when you connect more. Granted this situation generally only comes up
in the earlier stages of a design when you're still trying to put
things together but you can still end up wasting chunks of time
debugging down to this problem that the compiler could have told you
about right up front.
As to the conversions to/from that are required for the vector forms,
they cause a bit more typing but not that much. The issue comes up
when interfacing to a component that has std_logic_vector that for
whatever reason you can't simply change. But the conversion to
std_logic_vector can be put right in to the port map for input signals
to the component; for outputs you simply define a new std_logic_vector
signal that only gets used to connect with the output of that
component and then is input to the conversion function and nowhere
else needs to be used...all and all it's not that bad.
Kevin Jennings
<snip>
Rather than repeat what Jim says, I'll simply say that I agree with
it.
What Jim didn't comment on is the benefit of std_ulogic(vector) and2. On the use of std_logic(_vector) and std_ulogic(_vector). If there
are no multiple tri-statable drivers and no wired and/or, ... bus,
should one use std_ulogic(_vector)? What are the advantages/
disadvantages?
that is that you won't waste any time simulating to find that you have
inadvertantly connected multiple drivers to a signal that you intend
to only have one source. By using std_ulogic(vector), you're telling
the compiler that there is only one driver so it will immediately flag
when you connect more. Granted this situation generally only comes up
in the earlier stages of a design when you're still trying to put
things together but you can still end up wasting chunks of time
debugging down to this problem that the compiler could have told you
about right up front.
As to the conversions to/from that are required for the vector forms,
they cause a bit more typing but not that much. The issue comes up
when interfacing to a component that has std_logic_vector that for
whatever reason you can't simply change. But the conversion to
std_logic_vector can be put right in to the port map for input signals
to the component; for outputs you simply define a new std_logic_vector
signal that only gets used to connect with the output of that
component and then is input to the conversion function and nowhere
else needs to be used...all and all it's not that bad.
Kevin Jennings