Skip to content

Instantly share code, notes, and snippets.

@dries007
Last active September 30, 2024 13:35
Show Gist options
  • Save dries007/36c31fb8b2d712dfb41c6709f16e6e66 to your computer and use it in GitHub Desktop.
Save dries007/36c31fb8b2d712dfb41c6709f16e6e66 to your computer and use it in GitHub Desktop.
ModelSim 17.1 for (Arch) Linux

ModelSim 17.1 (Starters Edition) for (Arch) Linux

You need to download the setup file yourself. Put in where you run the setup script. Easy DL link It should be named ModelSimSetup-17.1.0.590-linux.run.

  1. Install dependencies (some AUR, both 32 and 64 bit is required.)
    • 64 bit: expat fontconfig freetype2 xorg-fonts-type1 glibc gtk2 libcanberra libpng libpng12 libice libsm util-linux ncurses tcl tcllib zlib libx11 libxau libxdmcp libxext libxft libxrender libxt libxtst
    • 32 bit lib32-expat lib32-fontconfig lib32-freetype2 lib32-glibc lib32-gtk2 lib32-libcanberra lib32-libpng lib32-libpng12 lib32-libice lib32-libsm lib32-util-linux lib32-ncurses lib32-zlib lib32-libx11 lib32-libxau lib32-libxdmcp lib32-libxext lib32-libxft lib32-libxrender lib32-libxt lib32-libxtst
    • ncurses compat libs: ncurses5-compat-libs and lib32-ncurses5-compat-libs
  2. Run setup file, from console, install in default location (~/intelFPGA/17.1) The setup hangs after completing.
  3. Get lib32-freetype2-2.5.0.1 and unpack libs to ~/intelFPGA/17.1/modelsim_ase/lib32
  4. Modify the startup script (~/intelFPGA/17.1/modelsim_ase/vco)
    • Replace linux_rh60 with linux
    • Add LD_LIBRARY_PATH=${dir}/lib32 after $dir is set

A semi automatic script is provided below for the lazy :)

#/bin/bash
echo Installing dependencies...
pacaur -S --needed expat fontconfig freetype2 xorg-fonts-type1 glibc gtk2 libcanberra libpng libpng12 libice libsm util-linux ncurses tcl tcllib zlib libx11 libxau libxdmcp libxext libxft libxrender libxt libxtst lib32-expat lib32-fontconfig lib32-freetype2 lib32-glibc lib32-gtk2 lib32-libcanberra lib32-libpng lib32-libpng12 lib32-libice lib32-libsm lib32-util-linux lib32-ncurses lib32-zlib lib32-libx11 lib32-libxau lib32-libxdmcp lib32-libxext lib32-libxft lib32-libxrender lib32-libxt lib32-libxtst ncurses5-compat-libs lib32-ncurses5-compat-libs
echo Running setup file...
./ModelSimSetup-17.1.0.590-linux.run --modelsim_edition modelsim_ase --accept_eula 1 --mode unattended --unattendedmodeui minimal &
PID=$!
echo Press enter when the setup dialog says \"Setup complete.\"
read -n 1
kill $PID
wget -q --show-progress https://dl.dries007.net/lib32-freetype2-2.5.0.1.tar.xz -O lib32-freetype2-2.5.0.1.tar.xz
tar xf lib32-freetype2-2.5.0.1.tar.xz -C ~/intelFPGA/17.1/modelsim_ase/
cd ~/intelFPGA/17.1/modelsim_ase/
sed -i 's/linux_rh60/linux/' vco
sed -i 's/dir=`dirname "$arg0"`/dir=`dirname "$arg0"`\nexport LD_LIBRARY_PATH=${dir}\/lib32/' vco # adds "export LD_LIBRARY_PATH=${dir}/lib32" after $dir is found.
cat > ~/.local/share/applications/modelsim.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=ModelSim
Comment=ModelSim
Exec=$HOME/intelFPGA/17.1/modelsim_ase/bin/vsim
Icon=applications-electronics
Terminal=true
Type=Application
Categories=Development
EOF
echo "Done, enjoy!"
@dries007
Copy link
Author

dries007 commented Jun 5, 2019

@samwhiteUK Sorry for the late reply, but a good choose is to have a look at the Arch repositories. I think I got mine from the Arch archives, I don't quite remember.

@jonnew Your welcome :) I hope it still works, it's been a long time since I needed it.

@mspronesti
Copy link

Thanks! Is there any possibility to avoid launcher opening a new terminal hanging on "reading pref.tcl" while running ModelSim (it closes when I close ModelSim and vice versa) ?

@dries007
Copy link
Author

@PronElle it's been a long time since I've used the this. I do remember a console window popping up, but I don't think I ever got rid of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment