Puis-je avoir une explication de ces lignes de code ?Code:library ieee; use ieee.std_logic_1164.all; package sine_package is constant max_table_value: integer := 127; subtype table_value_type is integer range 0 to max_table_value; constant max_table_index: integer := 127; subtype table_index_type is integer range 0 to max_table_index; subtype sine_vector_type is std_logic_vector( 7 downto 0 ); function get_table_value (table_index: table_index_type) return table_value_type; end; package body sine_package is function get_table_value (table_index: table_index_type) return table_value_type is variable table_value: table_value_type; begin case table_index is when 0 => table_value := 1; when 1 => table_value := 2; when 2 => table_value := 4; ... ... ... when 127 => table_value := 127; end case; return table_value; end; end;
==> Je n'ai jamais fais de sinus !!
La rom est-elle utilisée ? Comment fonctionnent les mémoires ?
Cordialement
DELALIN Ambroise
-----