Commit 06ca2d62 authored by CLAUDEPIERRE Ludovic's avatar CLAUDEPIERRE Ludovic
Browse files

probleme addresse (taille 1 byte de nouveau) corrigé

parent 78e4bb84
......@@ -81,7 +81,7 @@ architecture behavior of configuration_manager is
signal mem: std_logic_vector(MAX_ADDRESS*8-1 downto 0);
-- signal address: unsigned(7 downto 0);
signal v_address: std_logic_vector(15 downto 0);
signal v_address: std_logic_vector(7 downto 0);
signal v_state: std_logic_vector(2 downto 0);
signal address: integer range 0 to 255;
signal count_add: integer range 0 to 255;
......@@ -175,15 +175,10 @@ address <= to_integer(unsigned(v_address));
add_set: process(clk, reset)--write data to host
begin
if reset = '1' then
v_address <= x"0000";
v_address <= x"00";
elsif rising_edge(clk) then
if command_state = ADD and data_en = '1' then
count_add<=count_add+1;
if count_add <2 then
v_address((2-count_add)*8-1 downto (2-count_add-1)*8) <= data_byte; -- SIZE ADRESS = 2 BYTES
end if;
elsif command_state = FUN then
count_add <=0;
v_address(7 downto 0) <= data_byte; -- SIZE ADRESS = 2 BYTES
end if;
end if;
end process;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment