Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ubuntu_virtual_cae_system [2021/03/14 14:46] – [Lubuntu Virtual CAE System] not beckmanf | ubuntu_virtual_cae_system [2024/06/03 00:28] (current) – restructure beckmanf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Lubuntu | + | ===== Debian |
| - | The Lubuntu(r) | + | The Debian |
| * [[altera_boards|Altera DE1 board]] (Digitaltechnik, | * [[altera_boards|Altera DE1 board]] (Digitaltechnik, | ||
| Line 7: | Line 7: | ||
| The last version that supports Cyclone II fpga architecture is Quartus 13.0sp1. That version does not support the Cyclone V architecture. All quartus versions that support Cyclone V do not support Cyclone II. So unfortunately there is not one Quartus version that supports both fpga architecutures. | The last version that supports Cyclone II fpga architecture is Quartus 13.0sp1. That version does not support the Cyclone V architecture. All quartus versions that support Cyclone V do not support Cyclone II. So unfortunately there is not one Quartus version that supports both fpga architecutures. | ||
| + | |||
| ==== Preconfigured VirtualBox virtual machine ==== | ==== Preconfigured VirtualBox virtual machine ==== | ||
| + | Hans Färber has build three different virtual machines: | ||
| - | Hans Färber has build two different virtual machines: | + | |
| - | + | * [[https:// | |
| - | | + | * [[https:// |
| - | * [[https:// | + | |
| ===== Build your own from scratch ===== | ===== Build your own from scratch ===== | ||
| - | The CAD software is based on Lubuntu linux, Quartus and other software. The software and the linux operating system are supposed to run in a virtual machine. If you do not use a virtualization environment, | + | The CAD software is based on Debian Linux, Quartus and other software. The software and the linux operating system are supposed to run in a virtual machine. If you do not use a virtualization environment, |
| ==== Virtual Machine ==== | ==== Virtual Machine ==== | ||
| + | === Virtualization Software === | ||
| There are different virtual machine environments. | There are different virtual machine environments. | ||
| - | === VMWare | + | == VMWare == |
| - | VMWare(r) provides a commercial version VMWare Fusion for Mac OS(r). This has a very good integration in MacOS and I use it with MacOS 10.13.6 (High Sierra). It is not free. For Windows(r) | + | VMWare(r) provides a commercial version |
| - | === VirtualBox | + | == VirtualBox == |
| - | VirtualBox(r) is available for Windows, Linux and Mac OS. It is free. From my experience with MacOS it is not as good integrated as VMWare Fusion. If you want to use this, then download and install the the virtual machine software from [[https:// | + | [[https:// |
| - | === Get the Lubuntu 18.04 install image === | + | == UTM for Mac == |
| - | Download the ISO file for the 64 Bit Lubuntu 18.04.4 LTS Desktop version. You can download | + | [[https:// |
| - | [[http:// | + | === Get the .iso install image === |
| + | Download the ISO file for Debian 12.5.0 preconfigured setup. You can download the image from here: | ||
| - | === Install the Lubuntu machine === | + | < |
| + | <a href=" | ||
| + | </ | ||
| - | This depends on the virtualization environment that you use. | + | === Create |
| - | == VMWare == | + | This depends on the virtualization environment that you use. The iso contains a preconfigured debian installer which will install a machine with a user " |
| - | Create a new virtual | + | For all virtual |
| - | You need to install the guest additions. Without the guest additions, the interaction with the host system is not working (file sharing / Clipboard). Run " | + | == VMWare |
| - | + | ||
| - | < | + | |
| - | cd | + | |
| - | mkdir vmware | + | |
| - | cp / | + | |
| - | cd vmware | + | |
| - | tar -xvzf VMwareTools-< | + | |
| - | cd vmware-tools-distrib | + | |
| - | sudo ./ | + | |
| - | </ | + | |
| - | + | ||
| - | Say " | + | |
| + | Create a new virtual machine with minimum 30GB hard disk size. The hard disk will result in a file on the host operating system (Here MacOs) but the file size on the host will be dynamic, i.e. it will depend on the actual usage in the virtual machine. So you can also configure 120GB. Choose minimum 2GB ram or 50% of your RAM in your computer. Choose 50% of the processor cores on your computer. | ||
| == Virtualbox == | == Virtualbox == | ||
| Line 65: | Line 59: | ||
| to be done | to be done | ||
| - | ===== Install Quartus 13.0sp1 and Modelsim ===== | + | == UTM == |
| - | The following steps will install | + | Make sure you choose " |
| - | * Altera Quartus II Web Edition Version 13.0sp1 (13.0.1 build 232) | + | === Finalize the installation === |
| - | * Modelsim Altera Starter Edition Version 10.1d (included in 13.0sp1) | + | |
| - | These versions are required for the Altera DE1 board which is used in the digital design lab and is available in the library. This Quartus version is the last version that supports the Altera Cyclone II FPGA which is on that board. So do not install a later version if you want to use that board. | + | After the debian installer has finished you should reboot your virtual machine. It will start in terminal mode. You need to login as user "caeuser" |
| - | + | ||
| - | Install the software at "/ | + | |
| < | < | ||
| - | sudo mkdir /opt/altera | + | cd |
| - | sudo chown caeuser: | + | ./go.sh |
| </ | </ | ||
| - | === Install 32Bit Libraries | + | That will install |
| - | Quartus | + | * Altera |
| + | * GHDL + gtkwave | ||
| + | * LXQt + Lightdm Window environment | ||
| - | Enable multiple architectures (32 Bit / 64 Bit) | + | These versions are required for the Altera DE1 board which is used in the digital design lab and is available in the library. This Quartus version is the last version that supports the Altera Cyclone II FPGA which is on that board. So do not install a later version if you want to use that board. The quartus software will be installed at "/opt/ |
| - | < | + | ===== Test the installation ===== |
| - | sudo dpkg --add-architecture i386 | + | |
| - | sudo apt-get update | + | |
| - | </ | + | |
| - | Install the 32Bit libraries | + | === Start Quartus GUI=== |
| < | < | ||
| - | sudo apt-get install libc6:i386 libpng16-16: | + | quartus |
| </ | </ | ||
| - | === Missing libpng12 | + | === Run some projects |
| - | The quartus software requires the libpng12 library but Lubuntu 18.04 comes with libpng16. If you do not install libpng12, then the following error will occur: | + | Install git |
| - | + | ||
| - | < | + | |
| - | fritz@vcae: | + | |
| - | quartus: error while loading shared libraries: libpng12.so.0: | + | |
| - | caeuser@vcae: | + | |
| - | </ | + | |
| - | The following check shows that libpng16 is installed but quartus needs libpng12. | ||
| < | < | ||
| - | fritz@vcae: | + | sudo apt install git |
| - | ii libpng16-16: | + | |
| - | caeuser@vcae: | + | |
| </ | </ | ||
| - | So download, compile and copy the libpng12 library to the quartus install directory. You have to install both, the 32bit and the 64bit versions. | + | Download |
| < | < | ||
| cd | cd | ||
| - | cd cae | + | mkdir projects |
| - | sudo apt install build-essential gcc-multilib zlib1g-dev: | + | cd projects |
| - | wget https://www.hs-augsburg.de/homes/beckmanf/public/ | + | git clone https://gitlab.elektrotechnik.hs-augsburg.de/ |
| - | tar -xvzf libpng-1.2.59.tar.gz | + | |
| - | cd libpng-1.2.59 | + | |
| - | CFLAGS=' | + | |
| - | make | + | |
| - | sudo make install | + | |
| - | make clean | + | |
| - | ./configure --libdir=/ | + | |
| - | make | + | |
| - | sudo make install | + | |
| </ | </ | ||
| - | === Download and install Quartus 13.0sp1 (incl. Modelsim) === | + | Now start a simulation |
| < | < | ||
| - | cd | + | cd dtlab |
| - | mkdir cae | + | cd sim |
| - | cd cae | + | cd top_shift |
| - | wget http:// | + | make wave |
| - | tar -xvf Quartus-web-13.0.1.232-linux.tar | + | |
| - | ./setup.sh | + | |
| </ | </ | ||
| - | The installation directory is / | + | To run a synthesis |
| - | + | ||
| - | === adapt .profile for PATH === | + | |
| - | + | ||
| - | First add a symbolic link to the current version of the quartus software | + | |
| < | < | ||
| - | cd /opt/altera | + | cd dtlab |
| - | ln -s 13.0sp1 version | + | cd pnr |
| - | cd | + | cd top_simple |
| + | make quartus | ||
| </ | </ | ||
| - | In order to be able to start the binaries from the commandline, | + | If you have a [[altera_boards|FPGA Board]], you can download |
| - | + | ||
| - | <code bash .profile> | + | |
| - | # Include the ALTERA fpga software | + | |
| - | PATH=" | + | |
| - | # Include the ALTERA Modelsim VHDL simulator | + | |
| - | PATH=" | + | |
| - | </ | + | |
| - | + | ||
| - | Then you have to logout | + | |
| - | + | ||
| - | === Fix linux_rh60 vco script problem === | + | |
| - | + | ||
| - | When you run modelsim and see: | + | |
| < | < | ||
| - | caeuser@vcae: | + | make prog |
| - | Error: cannot find / | + | |
| - | caeuser@vcae: | + | |
| </ | </ | ||
| - | then, you have to fix the vco script. First change the permissions such that you can modify the script. | + | ==== How this is done ==== |
| - | < | + | The repository [[https://github.com/fredowski/vcae]] contains how the |
| - | cd /opt/altera/13.0sp1/modelsim_ase | + | |
| - | chmod u+w vco | + | |
| - | </code> | + | |
| - | Open the vco with | + | * Debian preconfigured iso |
| + | * The quartus debian packages | ||
| + | * The ansible install scripts | ||
| + | * A vagrant setup | ||
| - | < | + | are made. |
| - | vi vco | + | |
| - | </ | + | |
| - | and find the following section | + | ==== Install Quartus via the package ==== |
| - | < | + | If you already have a native |
| - | else | + | |
| - | case $utype in | + | |
| - | 2.4.[7-9]*) | + | |
| - | 2.4.[1-9][0-9]*) vco="linux" ;; | + | |
| - | 2.[5-9]*) | + | |
| - | 2.[1-9][0-9]*) vco=" | + | |
| - | 3.[0-9]*) | + | |
| - | *) vco=" | + | |
| - | </ | + | |
| - | And change the " | + | <code bash quartus.list> |
| - | + | deb [arch=i386,amd64 trusted=yes lang=none] http://www.tha.de/homes/beckmanf/ | |
| - | === Fix the libfreetype problem === | + | |
| - | + | ||
| - | If you see | + | |
| - | + | ||
| - | < | + | |
| - | caeuser@ADLab-Tools-OS:~$ vsim | + | |
| - | Error in startup script: | + | |
| - | Initialization problem, exiting. | + | |
| - | + | ||
| - | Initialization problem, exiting. | + | |
| - | + | ||
| - | while executing | + | |
| - | " | + | |
| - | invoked from within | + | |
| - | " | + | |
| - | (file "/mtitcl/vsim/vsim" line 1) | + | |
| - | ** Fatal: Read failure in vlm process (0,0) | + | |
| - | caeuser@ADLab-Tools-OS: | + | |
| </ | </ | ||
| - | then you have to install an old version or differently configured version of libfreetype. Enable the deb-src packages in the / | + | to "/ |
| < | < | ||
| - | #deb cdrom: | + | sudo cp quartus.list /etc/apt/sources.d |
| - | + | ||
| - | # See http://help.ubuntu.com/ | + | |
| - | # newer versions of the distribution. | + | |
| - | deb http:// | + | |
| - | deb-src http:// | + | |
| - | + | ||
| - | ## Major bug fix updates produced after the final release of the | + | |
| - | ## distribution. | + | |
| - | deb http:// | + | |
| - | deb-src http:// | + | |
| - | </ | + | |
| - | + | ||
| - | Now install the build dependencies and compile and install the old libfreetype version. | + | |
| - | + | ||
| - | < | + | |
| - | cd | + | |
| - | cd cae | + | |
| sudo apt update | sudo apt update | ||
| - | sudo apt build-dep -a i386 libfreetype6 | ||
| - | wget https:// | ||
| - | tar -xvzf freetype-2.8.1.tar.gz | ||
| - | cd freetype-2.8.1 | ||
| - | CFLAGS=' | ||
| - | make -j8 | ||
| </ | </ | ||
| - | It is important to configure the freetype library with " | + | === Intel Quartus 13.0sp1 for Cyclone II FPGA (Alter DE1 Board)=== |
| - | < | + | Quartus |
| - | mkdir / | + | |
| - | cp objs/ | + | |
| - | </ | + | |
| - | + | ||
| - | Now you have to change modelsim / | + | |
| < | < | ||
| - | dir=`dirname " | + | sudo dpkg --add-architecture i386 |
| </ | </ | ||
| - | After that line add | + | and then |
| < | < | ||
| - | export LD_LIBRARY_PATH=/ | + | sudo apt update |
| + | sudo apt install quartus13: | ||
| </ | </ | ||
| - | === USB Settings | + | === Quartus 23.1 for Cyclone V (Altera DE1-SoC Board) |
| - | + | ||
| - | For the USB programming via the USB Blaster(tm), | + | |
| < | < | ||
| - | / | + | sudo apt update |
| + | sudo apt install quartus23 | ||
| </ | </ | ||
| - | The file should contain the following rules for the Altera DE1 board. | + | === Quartus path setup === |
| - | <code bash 51-usbblaster.rules> | + | In order to be able to start the binaries from the terminal, the path for the binaries has to be in the PATH environment variable. For that you have to modify the .bashrc file in your home directory. Append the following snippet to the .bashrc file with [[http:// |
| - | # Altera USB-Blaster for Quartus FPGA Software | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | # USB-Blaster II | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | </code> | + | |
| - | For the following test you need to attach the Altera Board to your computer. Notice that you have to attach the usb device to the virtual machine (Virtual Box) with Devices->USB Devices-> | + | <code bash .bashrc> |
| - | + | # Include | |
| - | < | + | export PATH=" |
| - | caeuser@vcae:/etc/udev/rules.d$ lsusb | + | |
| - | Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet | + | |
| - | Bus 001 Device 003: ID 09fb:6001 Altera Blaster | + | |
| - | Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | + | |
| - | caeuser@vcae: | + | |
| </ | </ | ||
| - | You can see the permissions for the devices with ls. See the rw rights for " | + | Then you have to logout |
| - | + | ||
| - | < | + | |
| - | caeuser@vcae:/ | + | |
| - | insgesamt 0 | + | |
| - | crw-rw-r-- 1 root root 189, 0 Mai 7 16:35 001 | + | |
| - | crw-rw-r-- 1 root root 189, 1 Mai 7 16:35 002 | + | |
| - | crw-rw-rw- 1 root root 189, 2 Mai 7 16:38 003 | + | |
| - | </ | + | |
| - | + | ||
| - | If your permissions for the usb port are correct, then you should be able to scan the jtag chain | + | |
| - | with jtagconfig. | + | |
| - | + | ||
| - | < | + | |
| - | caeuser@vcae:/ | + | |
| - | 1) USB-Blaster [1-2] | + | |
| - | 020B30DD | + | |
| - | + | ||
| - | fritz@fritz-VirtualBox:/ | + | |
| - | </ | + | |
| - | + | ||
| - | === Start Modelsim === | + | |
| - | + | ||
| - | < | + | |
| - | vsim | + | |
| - | </ | + | |
| - | + | ||
| - | === Start Quartus === | + | |
| - | + | ||
| - | < | + | |
| - | quartus | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Only Bachelor ET and ME students: Install qfsm ==== | + | |
| - | + | ||
| - | [[http:// | + | |
| - | + | ||
| - | < | + | |
| - | sudo apt-get install cmake qt4-dev-tools libgraphviz-dev | + | |
| - | </ | + | |
| - | + | ||
| - | Then you can build and install qfsm. | + | |
| - | < | + | |
| - | cd | + | |
| - | mkdir qfsm | + | |
| - | cd qfsm | + | |
| - | wget http:// | + | |
| - | bunzip2 qfsm.tar.bz2 | + | |
| - | tar -xvf qfsm.tar | + | |
| - | mkdir build | + | |
| - | cd build | + | |
| - | cmake ../ | + | |
| - | make | + | |
| - | sudo make install | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Optional: Install Quartus 18.1 ===== | + | |
| - | + | ||
| - | For the master course you need Quartus 18.1 to program the Altera DE1 Soc board with the Cyclone V fpga. [[vcae-lubuntu-18.04|How to install Quartus 18.1]] | + | |
| - | + | ||
| - | ===== Very Optional: Download and build the mips toolchain ===== | + | |
| - | + | ||
| - | The MIPS Cross Compiler is only needed for the patterson project. | + | |
| - | + | ||
| - | Follow the instructions in [[mips_cross_compiler|MIPS Cross Compiler build]] | + | |
| - | + | ||
| - | ===== Test the installation ===== | + | |
| - | + | ||
| - | Install git | + | |
| - | + | ||
| - | < | + | |
| - | sudo apt-get install git | + | |
| - | </ | + | |
| - | + | ||
| - | Download the " | + | |
| - | + | ||
| - | < | + | |
| - | cd | + | |
| - | mkdir projects | + | |
| - | cd projects | + | |
| - | git clone https:// | + | |
| - | </ | + | |
| - | + | ||
| - | Now start a Modelsim simulation | + | |
| - | + | ||
| - | < | + | |
| - | cd digitaltechnikpraktikum | + | |
| - | cd sim | + | |
| - | cd ledcomb | + | |
| - | make sim | + | |
| - | </ | + | |
| - | + | ||
| - | To run a synthesis | + | |
| - | + | ||
| - | < | + | |
| - | cd digitaltechnikpraktikum | + | |
| - | cd pnr | + | |
| - | cd ledcomb | + | |
| - | make compile | + | |
| - | make quartus | + | |
| - | </ | + | |
| - | + | ||
| - | If you have a [[altera_boards|FPGA Board]], you can download and test the design. | + | |
| - | + | ||
| - | < | + | |
| - | make prog | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Trademarks ==== | + | |
| - | + | ||
| - | MIPS(r) and MIPS I(tm) are trademarks of [[http:// | + | |
| - | + | ||
| - | Altera(r), Quartus(r), Nios(r), Cyclone(r), USB-Blaster(tm), | + | |
| - | + | ||
| - | VMWare(r) is a trademark of [[http:// | + | |
| - | + | ||
| - | Apple(r), Mac OS(r), MacBook(r) and Mac(r) are trademarks of [[https:// | + | |
| - | + | ||
| - | Windows(r) is a trademark of [[https:// | + | |
| - | + | ||
| - | VirtualBox(r) is a trademark of [[http:// | + | |
| - | + | ||
| - | ModelSim(r) is a trademark of [[http:// | + | |
| - | + | ||
| - | Linux(r) is a trademark of [[http:// | + | |
| - | + | ||
| - | Ubuntu(r) is a trademark of [[http:// | + | |
| - | + | ||
| - | This is an independent publication and is not affiliated with, nor has it been authorized, sponsored, or otherwise approved by any of these companies. | + | |