[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[oc] VHDL Help...



Dear cores,

     Well, my problem is that writing an entity i have to use two
     variables, but i think it is a way to write it with one variable,
     i don't know if this line is correct, but compiler tells me it
     isn't... do you think that i could do it this way ?

     PROBLEM ON: (ceil(log2(tamany_data)))

     --< CODE > ---------------------------------------------

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;

ENTITY mux IS
GENERIC( size_data : integer := 8 );
PORT(
           data : IN STD_LOGIC_VECTOR(size_data-1 downto 0);
      **   sel     : IN STD_LOGIC_VECTOR(ceil(log2(size_data)) downto 0); **
           result : OUT STD_LOGIC
        );
END mux;

    --< END CODE >----------------------------------------------------
  

-- 
Cheers,
 Héctor                          mailto:hecormar@opencores.org

--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml