Hi all.
In part of my code, I have the following
This performs the same functionality as
val is a 4-bit
and input is an 11-bit
. When I synthesise it, I get timing violations, and if I run the post-place&route simulation, I get some 'X's in val.
Is there any way this can be made more efficient, either by use of different vhdl, or by changing the logic of it?
Thanks
Ciaran
In part of my code, I have the following
Code:
val <= "1010" when input(9) = '1' else
"1001" when input(8) = '1' else
"1000" when input(7) = '1' else
"0111" when input(6) = '1' else
"0110" when input(5) = '1' else
"0101" when input(4) = '1' else
"0100" when input(3) = '1' else
"0011" when input(2) = '1' else
"0010" when input(1) = '1' else
"0001" when input(0) = '1' else
"0000";
This performs the same functionality as
Code:
val <= "1010" when input = "1---------" else
"1001" when input = "01--------" else
"1000" when input = "001-------" else
"0111" when input = "0001------" else
"0110" when input = "00001-----" else
"0101" when input = "000001----" else
"0100" when input = "0000001---" else
"0011" when input = "00000001--" else
"0010" when input = "000000001-" else
"0001" when input = "0000000001" else
"0000"; --when input = "0000000000";
val is a 4-bit
Code:
std_logic_vector
Code:
std_logic_vector
Is there any way this can be made more efficient, either by use of different vhdl, or by changing the logic of it?
Thanks
Ciaran