Qué tal, para un pequeño proyecto estoy tratando de hacer uso de una RAM 16x4, como estoy usando las herramientas de Xilinx me decidí por hacer la prueba con el Core Generator que incluye, así, creo una memoria y un archivo con los datos qe debe tener grabados.
Ahora, como no se soportan testbench waveform para las unidades creadas con el Core Generator, una vez creada la RAM, creo un archivo fuente VHDL que pretendo utilizar para probar el funcionamiento de la memoria, este es el código:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity top_memory is
Port ( clk : in STD_LOGIC;
leer : in STD_LOGIC;
direccion : in STD_LOGIC_VECTOR (3 downto 0);
entrada : in STD_LOGIC_VECTOR (3 downto 0);
salida : out STD_LOGIC_VECTOR (3 downto 0));
end top_memory;
architecture Behavioral of top_memory is
-- The following code must appear in the VHDL architecture header:
component memory
port (
addr: IN std_logic_VECTOR(3 downto 0);
clk: IN std_logic;
din: IN std_logic_VECTOR(3 downto 0);
dout: OUT std_logic_VECTOR(3 downto 0);
we: IN std_logic);
end component;
begin
instancia : memory
port map (
addr => direccion,
clk => clk,
din => entrada,
dout => salida,
we => leer);
end Behavioral;
Luego, creo un testbench waveform para simular este archivo, pero no puedo realizar la simulación, ya que al llamarla usando "Generate Expected Simulation Results" siempre me da error:
ERROR: VSim failed to simulate annotated testbench
Esta es la salida completa en la consola:
Reading C:/Modeltech_xe_starter/tcl/vsim/pref.tcl
# 6.0a
# do top_memory_tb.ado
# ** Warning: (vlib-34) Library already exists at "work".
# resume
# Model Technology ModelSim XE III vlog 6.0a Compiler 2004.11 Nov 10 2004
# -- Compiling module memory
#
# Top level modules:
# memory
# Model Technology ModelSim XE III vcom 6.0a Compiler 2004.11 Nov 10 2004
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Loading package std_logic_arith
# -- Loading package std_logic_unsigned
# -- Compiling entity top_memory
# -- Compiling architecture behavioral of top_memory
# Model Technology ModelSim XE III vcom 6.0a Compiler 2004.11 Nov 10 2004
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Loading package std_logic_arith
# -- Loading package std_logic_unsigned
# -- Loading package textio
# -- Loading package std_logic_textio
# -- Compiling entity top_memory_tb
# -- Compiling architecture testbench_arch of top_memory_tb
# Model Technology ModelSim XE III vlog 6.0a Compiler 2004.11 Nov 10 2004
# -- Compiling module glbl
#
# Top level modules:
# glbl
# vsim -L xilinxcorelib_ver -L unisims_ver -lib work -t 1ps top_memory_tb glbl
# Loading C:\Modeltech_xe_starter\win32xoem/../std.standard
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_1164(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_arith(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_unsigned(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../std.textio(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_textio(body)
# Loading work.top_memory_tb(testbench_arch)
# ** Warning: (vsim-3479) Time unit 'fs' is less than the simulator resolution (1ps).
# Time: 0 ps Iteration: 0 Region: /
# XE version supports only a single HDL# Error loading design
Error loading design
ERROR: VSim failed to simulate annotated testbench
En negritas está lo que creo es la causa de que no se lleve a cabo la simulación, sin embargo, debo comentar que en alguna ocasión funcionó la simulación sin problemas

, pero desde entonces no he podido realizarla nuevamente. Ahora, ¿cómo es que al llamar al simulador se trata de compilar dos fuentes? ¿Alguien sabe qué es eso de glbl?
Saludos,
José Jorge (Geo).