Other with integer

Guest
hi,

how to do an other condition with no change like this :

N : integer
with sig select
N<=
11 when "00",
13 when "01",
N when other; ??????

Quartus inffer a latch !!!

with vector as std_logic_vector I do this :

with sig select
vector <=
"00" when "00",
"11" when "01",
"--" when other;
 
patrick.melet@dmradiocom.fr wrote:
hi,

how to do an other condition with no change like this :

N : integer
with sig select
N<=
11 when "00",
13 when "01",
N when other; ??????

Quartus inffer a latch !!!
It infers a latch because otherwise, how would it retain the original
value?

-a
 
with sig select
N <= <value> when <sig_value> else
<other_value> when <sig_value> else
<another_value>;

ex
with sig select
N <= "0001" when "00" else
"0010" when "01" else
"0100" when "10" else
"1000" when "11"; -- no need for 'else when others' since all
values are evaluated...
 
patrick.melet a écrit:

how to do an other condition with no change like this :
N : integer
with sig select
N <= 11 when "00",
13 when "01",
N when other; ??????

Quartus inffer a latch !!!
Salut
QuartusII just does what you tell it to do. You actually described a
latch because your "others" condition loops N back on itself (ie
holding previous value)

I wonder what QuartusII infers with your std_logic description, '-' is
not an actual electrical value.

Nicolas
 
Nicolas Matringe wrote:

I wonder what QuartusII infers with your std_logic description, '-' is
not an actual electrical value.
This should be a "don't care", very useful to minimize karnaugh maps.
Dunno for Quartus, but XST accepts it.
 
Stéphane a écrit:
This should be a "don't care", very useful to minimize karnaugh maps.
Dunno for Quartus, but XST accepts it.
I know what it means in std_logic, I just wonder what comes out of the
synthesizer...
Interesting anyway, I had never thought about that.

Nicolas
 

Welcome to EDABoard.com

Sponsor

Back
Top