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 [2022/03/15 11:22] – switched link to new gitlab server beckmanf | ubuntu_virtual_cae_system [2026/03/18 23:53] (current) – [Preconfigured VirtualBox virtual machine] add UTM machine beckmanf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Lubuntu | + | ===== Debian |
| - | The Lubuntu(r) | + | The Debian |
| - | * [[altera_boards|Altera DE1 board]] (Digitaltechnik, | + | * [[altera_boards|Altera DE1 board]] (Digitaltechnik, |
| - | * NOT IN SS21!!! | + | * Altera DE1 SOC (Technische Projektarbeit) with Cyclone V FPGA |
| 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 three different virtual machines: | ||
| - | * [[https:// | + | * [[https:// |
| - | * [[https:// | + | * [[https:// |
| * [[https:// | * [[https:// | ||
| - | ===== Build your own from scratch ===== | + | I have a preconfigured virtual machine for arm MacOS with UTM here: |
| - | 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, | + | * [[https:// |
| - | ==== Virtual Machine ==== | ||
| - | There are different virtual machine environments. | ||
| - | === VMWare | + | ===== Build your own from scratch ===== |
| - | 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) there is the VMWare Player. The VMWare Player is free. I have not tested it. | + | 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, |
| - | === VirtualBox | + | ==== Virtual Machine ==== |
| - | 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:// | + | === Virtualization Software |
| - | + | There are different virtual | |
| - | === Get the Lubuntu 18.04 install image === | + | |
| - | + | ||
| - | Download the ISO file for the 64 Bit Lubuntu 18.04.4 LTS Desktop version. You can download the image from here: | + | |
| - | + | ||
| - | [[http:// | + | |
| - | + | ||
| - | + | ||
| - | === Install the Lubuntu | + | |
| - | + | ||
| - | This depends on the virtualization environment that you use. | + | |
| == VMWare == | == VMWare == | ||
| - | Create | + | VMWare(r) provides |
| - | You need to install the guest additions. Without the guest additions, the interaction with the host system is not working (file sharing / Clipboard). Run " | + | == VirtualBox == |
| - | < | + | [[https://www.virtualbox.org|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 |
| - | cd | + | |
| - | mkdir vmware | + | |
| - | cp /media/caeuser/ | + | |
| - | cd vmware | + | |
| - | tar -xvzf VMwareTools-< | + | |
| - | cd vmware-tools-distrib | + | |
| - | sudo ./vmware-install.pl | + | |
| - | </code> | + | |
| - | Say " | + | == UTM for Mac == |
| + | [[https:// | ||
| - | == Virtualbox == | + | The following description is for ARM based Apple Laptops. |
| - | to be done | + | === Get the .iso install image === |
| - | ===== Install Quartus | + | The current vcae machine is based on debian |
| - | The following steps will install | + | https:// |
| - | * Altera Quartus II Web Edition Version 13.0sp1 (13.0.1 build 232) | + | === Create the virtual machine === |
| - | * 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. | + | == UTM == |
| - | Install the software at "/ | + | Create |
| - | < | + | * Virtualize |
| - | sudo mkdir /opt/altera | + | * Linux |
| - | sudo chown caeuser:caeuser /opt/altera | + | * Minimum 8192 MiB RAM |
| - | </ | + | * Cores: Leave Standard or choose more than half of your cores |
| + | * Leave "Use Apple Virtualization" | ||
| + | * Check: "Boot from ISO image" | ||
| + | * Select the debian iso that you have downloaded | ||
| + | * Chose 128 GiB Disk Space (the actually used space on the host depends on your actual usage) | ||
| + | * Leave Share unused | ||
| + | * Name your machine " | ||
| + | * Save the machine | ||
| - | === Install 32Bit Libraries | + | When you now start the machine, you boot the " |
| - | Quartus | + | * Your language |
| + | * Hostname: vcae | ||
| + | * Domain-name: | ||
| + | * Root-Password: | ||
| + | * User Fullname: caeuser | ||
| + | * Username: caeuser | ||
| + | * Password: caeuser | ||
| + | * Partition: guided - complete disk | ||
| + | * Choose: vda | ||
| + | * All files on one partition | ||
| + | * Confirm to write files on disk | ||
| + | * No additional install media | ||
| + | * Debian mirror: ftp.de.debian.org | ||
| + | * Mirror proxy: LEAVE EMPTY | ||
| + | * popularity-contest: | ||
| + | * Software selection: Leave only "SSH server" | ||
| - | Enable multiple architectures (32 Bit / 64 Bit) | + | After reboot, you will again enter the installer because you still have the iso file mounted as USB. |
| - | < | + | * Switch off the machine |
| - | sudo dpkg --add-architecture i386 | + | * Delete the USB Drive in the machine settings in UTM via right-click " |
| - | sudo apt-get update | + | * Start the Machine again |
| - | </ | + | * Login as user " |
| - | Install the 32Bit libraries | + | === Finalize the installation |
| - | + | ||
| - | < | + | |
| - | sudo apt-get install libc6:i386 libpng16-16: | + | |
| - | </ | + | |
| - | + | ||
| - | === Missing libpng12 | + | |
| - | + | ||
| - | 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: | + | |
| - | + | ||
| - | < | + | |
| - | 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: | + | |
| - | 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. | + | After the debian installer has finished you should reboot your virtual machine. It will start in terminal mode. You need to login as user " |
| < | < | ||
| cd | cd | ||
| - | cd cae | + | sudo apt -y install |
| - | sudo apt install | + | git clone https://github.com/fredowski/vcae.git |
| - | wget https://www.hs-augsburg.de/homes/beckmanf/ | + | pushd ./vcae/ansible |
| - | tar -xvzf libpng-1.2.59.tar.gz | + | sudo ansible-playbook disable-sudo-password.yaml |
| - | cd libpng-1.2.59 | + | ansible-playbook sose26.yaml |
| - | CFLAGS=' | + | |
| - | make | + | |
| - | sudo make install | + | |
| - | make clean | + | |
| - | ./ | + | |
| - | make | + | |
| - | sudo make install | + | |
| </ | </ | ||
| - | === Download | + | After the installation, |
| < | < | ||
| - | cd | + | sudo apt -y install gtkwave |
| - | mkdir cae | + | git clone https:// |
| - | cd cae | + | pushd ./ |
| - | wget http://www.hs-augsburg.de/~beckmanf/ | + | ./ |
| - | tar -xvf Quartus-web-13.0.1.232-linux.tar | + | popd |
| - | ./setup.sh | + | wget https://tha.de/homes/beckmanf/ |
| + | sudo tar -xJf openroad.tar.xz -C /opt | ||
| + | echo ' | ||
| + | echo ' | ||
| + | echo ' | ||
| </ | </ | ||
| - | The installation directory is / | + | That will install |
| - | === adapt .profile for PATH === | + | * Altera Quartus II Web Edition Version 13.0sp1 (13.0.1 build 232) |
| + | * gtkwave | ||
| + | * OpenROAD tools including ghdl, yosys, ghdl-yosys plugin and openroad | ||
| + | * LXQt + Lightdm Window environment | ||
| - | First add a symbolic link to the current | + | 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 |
| - | < | + | ghdl, yosys and the openroad tools are precompiled for arm64 on debian 13 (trixie). These precompiled binaries are produced with these scripts: https://github.com/ |
| - | cd /opt/altera | + | |
| - | ln -s 13.0sp1 version | + | |
| - | cd | + | |
| - | </code> | + | |
| - | In order to be able to start the binaries from the commandline, | + | The installation of quartus and the window |
| - | <code bash .profile> | + | ===== Test the installation ===== |
| - | # Include the ALTERA fpga software | + | |
| - | PATH=" | + | |
| - | # Include the ALTERA Modelsim VHDL simulator | + | |
| - | PATH=" | + | |
| - | </ | + | |
| - | + | ||
| - | Then you have to logout and login again to make the changes active. | + | |
| - | + | ||
| - | === Fix linux_rh60 vco script problem | + | |
| - | When you run modelsim and see: | + | === Start Quartus GUI=== |
| < | < | ||
| - | caeuser@vcae: | + | quartus --64bit |
| - | Error: cannot find / | + | |
| - | caeuser@vcae: | + | |
| </ | </ | ||
| - | then, you have to fix the vco script. First change the permissions such that you can modify the script. | + | === Run some projects === |
| - | < | + | Install git |
| - | cd / | + | |
| - | chmod u+w vco | + | |
| - | </ | + | |
| - | + | ||
| - | Open the vco with | + | |
| < | < | ||
| - | vi vco | + | sudo apt install git |
| </ | </ | ||
| - | and find the following section | + | Download |
| - | + | ||
| - | < | + | |
| - | else | + | |
| - | case $utype in | + | |
| - | 2.4.[7-9]*) | + | |
| - | 2.4.[1-9][0-9]*) | + | |
| - | 2.[5-9]*) | + | |
| - | 2.[1-9][0-9]*) | + | |
| - | 3.[0-9]*) | + | |
| - | *) vco=" | + | |
| - | </ | + | |
| - | + | ||
| - | And change the " | + | |
| - | + | ||
| - | === Fix the libfreetype problem === | + | |
| - | + | ||
| - | If you see | + | |
| - | + | ||
| - | < | + | |
| - | caeuser@ADLab-Tools-OS: | + | |
| - | Error in startup script: | + | |
| - | Initialization problem, exiting. | + | |
| - | + | ||
| - | Initialization problem, exiting. | + | |
| - | + | ||
| - | while executing | + | |
| - | "InitializeINIFile quietly" | + | |
| - | invoked | + | |
| - | " | + | |
| - | (file "/ | + | |
| - | ** 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 | + | |
| - | + | ||
| - | < | + | |
| - | #deb cdrom:[Lubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ | + | |
| - | + | ||
| - | # See http://help.ubuntu.com/ | + | |
| - | # newer versions of the distribution. | + | |
| - | deb http:// | + | |
| - | deb-src http://de.archive.ubuntu.com/ | + | |
| - | + | ||
| - | ## Major bug fix updates produced after the final release of the | + | |
| - | ## distribution. | + | |
| - | deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted | + | |
| - | deb-src http:// | + | |
| - | </ | + | |
| - | + | ||
| - | Now install the build dependencies and compile and install the old libfreetype version. | + | |
| < | < | ||
| cd | cd | ||
| - | cd cae | + | mkdir projects |
| - | sudo apt update | + | cd projects |
| - | sudo apt build-dep -a i386 libfreetype6 | + | git clone https://caeis.etech.fh-augsburg.de/beckmanf/dtlab.git |
| - | wget https://download.savannah.gnu.org/releases/freetype/ | + | |
| - | 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 " | + | Now start a simulation |
| < | < | ||
| - | mkdir / | + | cd dtlab |
| - | cp objs/ | + | cd sim |
| + | cd top_shift | ||
| + | make wave | ||
| </ | </ | ||
| - | Now you have to change modelsim / | + | To run a synthesis |
| < | < | ||
| - | dir=`dirname " | + | cd dtlab |
| + | cd pnr | ||
| + | cd top_simple | ||
| + | make quartus | ||
| </ | </ | ||
| - | After that line add | + | If you have a [[altera_boards|FPGA Board]], you can download and test the design. |
| < | < | ||
| - | export LD_LIBRARY_PATH=/ | + | make prog |
| </ | </ | ||
| - | === USB Settings | + | ==== How this is done ==== |
| - | For the USB programming via the USB Blaster(tm), | + | The repository [[https:// |
| - | < | + | * Debian preconfigured iso |
| - | / | + | * The quartus debian packages |
| - | </ | + | * The ansible install scripts |
| + | * A vagrant setup | ||
| - | The file should contain the following rules for the Altera DE1 board. | + | are made. |
| - | <code bash 51-usbblaster.rules> | + | ==== Install Quartus via the package |
| - | # Altera USB-Blaster for Quartus FPGA Software | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | # USB-Blaster II | + | |
| - | SUBSYSTEMS==" | + | |
| - | SUBSYSTEMS==" | + | |
| - | </ | + | |
| - | For the following test you need to attach | + | If you already have a native linux installed, then you can install quartus also via a debian package. In order to make the packages available on your installation. Copy the file [[https:// |
| - | < | + | < |
| - | caeuser@vcae:/etc/udev/rules.d$ lsusb | + | deb [arch=arm64, |
| - | 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 "others" | + | to "/ |
| < | < | ||
| - | caeuser@vcae: | + | sudo cp quartus.list |
| - | insgesamt 0 | + | sudo apt update |
| - | 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 | + | === Intel Quartus 13.0sp1 for Cyclone II FPGA (Alter DE1 Board)=== |
| - | with jtagconfig. | + | |
| < | < | ||
| - | caeuser@vcae:/ | + | sudo apt update |
| - | 1) USB-Blaster [1-2] | + | sudo apt install quartus13 |
| - | 020B30DD | + | |
| - | + | ||
| - | fritz@fritz-VirtualBox:/ | + | |
| </ | </ | ||
| - | === Start Modelsim | + | === Quartus 23.1 for Cyclone V (Altera DE1-SoC Board) |
| < | < | ||
| - | vsim | + | sudo apt update |
| + | sudo apt install quartus23 | ||
| </ | </ | ||
| - | === Start Quartus === | + | === Quartus |
| - | < | + | 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:// |
| - | quartus | + | |
| - | </code> | + | |
| - | ==== Only Bachelor ET and ME students: Install qfsm ==== | + | <code bash .bashrc> |
| - | + | # Include the ALTERA fpga software | |
| - | [[http://qfsm.sourceforge.net|QFSM]] ist the state chart editor used in the lab. First you need to install some required packages. | + | export PATH=" |
| - | + | ||
| - | < | + | |
| - | sudo apt-get install cmake qt4-dev-tools libgraphviz-dev | + | |
| </ | </ | ||
| - | Then you can build and install qfsm. | + | Then you have to logout |
| - | < | + | |
| - | 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 ===== | + | |
| - | + | ||
| - | 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. | + | |
| - | + | ||
| | | ||