En mi proyecto, que compila bien en ModelSim, cuando intento simular mi código me da:
Aquí está mi código para el multiplicador:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.MATH_REAL.ALL;
ENTITY mult IS
PORT(
a, b: IN REAL;
dataOut: OUT REAL
);
END mult;
ARCHITECTURE base OF mult IS
BEGIN
dataOut <= a * b;
END base;
y esta es mi memoria que deriva a y b:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.MATH_REAL.ALL;
ENTITY memory IS
GENERIC(
memCapacity: INTEGER := 8
);
PORT(
w, r: IN BIT;
address: IN INTEGER;
dataIn: IN REAL;
dataOut: OUT REAL
);
END memory;
ARCHITECTURE base OF memory IS
TYPE memBlock IS ARRAY (INTEGER RANGE <>) OF REAL;
SIGNAL mem: memBlock(memCapacity DOWNTO 0);
BEGIN
PROCESS (w, r)
BEGIN
IF (w = '1') THEN
mem(address) <= dataIn;
ELSIF (r = '1') THEN
dataOut <= mem(address);
END IF;
END PROCESS;
END base;