A sparse memory is a large memory (reg [7:0] mem[(16*1024*1024):0]) where only a few locations are accessed during simulation.
Before SystemVerilog simulators were able to deal with this and not require a large amount of memory to be allocated on the host system. (VCS and NCsim deal with this automatically.)
This has also been called "dynamic memory".
Here is a link that explains the SV way to do it:
http://www.asicguru.com/system-verilog/tutorial/assoc-arrays/72/ Modelsim AE seems to fail on large Verilog 2000 style memory declarations liek above:
# do
modelsim.do# vsim -novopt -L work test # Start time: 09:33:47 on Apr 06,2016# // ModelSim ALTERA 10.4b May 27 2015 Linux 2.6.32-504.23.4.el6.x86_64# //# // Copyright 1991-2015 Mentor Graphics Corporation# // All Rights Reserved.# //# // THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION# // WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS# // LICENSORS AND IS SUBJECT TO LICENSE TERMS.# // THIS DOCUMENT CONTAINS TRADE SECRETS AND COMMERCIAL OR FINANCIAL# // INFORMATION THAT ARE PRIVILEGED, CONFIDENTIAL, AND EXEMPT FROM# // DISCLOSURE UNDER THE FREEDOM OF INFORMATION ACT, 5 U.S.C. SECTION 552.# // FURTHERMORE, THIS INFORMATION IS PROHIBITED FROM DISCLOSURE UNDER# // THE TRADE SECRETS ACT, 18 U.S.C. SECTION 1905.# //# Loading work.test# ** Fatal: (vsim-4) ****** Memory allocation failure. *****# Attempting to allocate 16777240 bytes# Please check your system for available memory and swap space.# ** Fatal: (vsim-4) ****** Memory allocation failure. *****# Attempting to allocate 16777224 bytes# Please check your system for available memory and swap space.# ** Warning: (vsim-3116) Problem reading symbols from /home/tools/altera/15.1/modelsim_ae/linuxaloem/vsimk : can not allocate memory for reading ELF file.
Our host has 24G of physical memory and it's mostly free (20G) when we run the sim. So I don't think the error message is very accurate.
This is annoying.....but we've modified the legacy code and used SV style declarations to fix this.
Regards,
John Pavan