U
u_stadler@yahoo.de
Guest
hi
i have a problem:
i created a lookup Table:
type SBOX_TYPE is array ( 0 to 255) of std_logic_vector(7 downto 0);
constant SBOX_Table: SBOX_TYPE := ( ........ );
in my actual code i have a state machine with different states. i have
4 states (sub0 to sub3) in which i call SBOX_TABLE.these states can
never be acticve at the same time.
if s_State_Sub0 = '1' then
v_Word(0) <= SBOX_Table(conv_integer(v_Word(0)));
s_Next_State_Sub0 <= '0';
s_Next_State_Sub1 <= '1';
end if;
if s_State_Sub1 = '1' then
v_Word(1) <= SBOX_Table(conv_integer(v_Word(1)));
s_Next_State_Sub1 <= '0';
s_Next_State_Sub2 <= '1';
end if;
if s_State_Sub2 = '1' then
v_Word(2) <= SBOX_Table(conv_integer(v_Word(2)));
s_Next_State_Sub2 <= '0';
s_Next_State_Sub3 <= '1';
end if;
if s_State_Sub3 = '1' then
v_Word(3) <= SBOX_Table(conv_integer(v_Word(3)));
s_Next_State_Sub3 <= '0';
s_Next_State_RCON <= '1';
end if;
when i synthesize my code now (im using the xilinx web pack ise 7.3) it
generates 4 rom tables which use a lot of space. how can i reduce this
to one since i never access it at the same time?
another question: do things like type conversions (for example
conv_integer) get synthesized or is it just for the simulation? i don't
think so because its all a bit vector in hardware anyway.
thanks
i have a problem:
i created a lookup Table:
type SBOX_TYPE is array ( 0 to 255) of std_logic_vector(7 downto 0);
constant SBOX_Table: SBOX_TYPE := ( ........ );
in my actual code i have a state machine with different states. i have
4 states (sub0 to sub3) in which i call SBOX_TABLE.these states can
never be acticve at the same time.
if s_State_Sub0 = '1' then
v_Word(0) <= SBOX_Table(conv_integer(v_Word(0)));
s_Next_State_Sub0 <= '0';
s_Next_State_Sub1 <= '1';
end if;
if s_State_Sub1 = '1' then
v_Word(1) <= SBOX_Table(conv_integer(v_Word(1)));
s_Next_State_Sub1 <= '0';
s_Next_State_Sub2 <= '1';
end if;
if s_State_Sub2 = '1' then
v_Word(2) <= SBOX_Table(conv_integer(v_Word(2)));
s_Next_State_Sub2 <= '0';
s_Next_State_Sub3 <= '1';
end if;
if s_State_Sub3 = '1' then
v_Word(3) <= SBOX_Table(conv_integer(v_Word(3)));
s_Next_State_Sub3 <= '0';
s_Next_State_RCON <= '1';
end if;
when i synthesize my code now (im using the xilinx web pack ise 7.3) it
generates 4 rom tables which use a lot of space. how can i reduce this
to one since i never access it at the same time?
another question: do things like type conversions (for example
conv_integer) get synthesized or is it just for the simulation? i don't
think so because its all a bit vector in hardware anyway.
thanks