I am learning VHDL and I have a problem with the code I'm trying to write in order to satisfy the related validation exception.
Here is my main summary code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;
use IEEE.NUMERIC_STD.ALL;
use ieee.std_logic_unsigned.all;
...
port(
Address: in std_logic_vector(15 downto 0);
...
constant SIZE : integer := 4096;
variable addr: integer range 0 to SIZE-1 := 0;
...
process ...
addr := conv_integer(Address) and (SIZE-1); --error here
The error message I get is
src / memory.vhd: 37: 35: no function declarations for the "and" operator
Basically, my goal is to create a 16-bit address bus, the reference memory is only 4096 bytes. Why am I getting this odd error? Am I missing a library or something else?
Earlz source
share