Forum Discussion
Altera_Forum
Honored Contributor
11 years agoModelsim keeps its libraries in folders. You use vlib to create the folder and vmap to point to those folders, eg., lets say you want your Modelsim work folder in a directory pointed to by $mwork (I use a Modelsim-version dependent directory for this) and your source is in $src, then you can ...
# Create the Modelsim build folder
file mkdir $mwork
# Create the "work" library folder
vlib $mwork/work
vmap work $mwork/work
# Create the "standard_additions" library folder
vlib $mwork/standard_additions
vmap standard_additions $mwork/standard_additions
# Build the standard_additions library
vcom -work standard_additions $src/standard_additions.vhd
This is too basic though, since the folders are created and built each time you run this as a script. A more intelligent script checks the timestamps on files to see if they should be rebuilt (much like a makefile). Cheers, Dave