Tools for Development and Lab

1. C Online Compiler IDE and Editor and a Linux terminal from https://repl.it/languages/c

Use this site to edit your C program, compiler and execute it to see its results.

2. Compiler Explorer from https://godbolt.org/

Use this site to see the assembly output of a C program compiled by different compiler on different computer architectures/ISAs.

3. A University educational cluster named Centaurus

Centaurus is available via: hpc-student.uncc.edu, hpc-student.uncc.edu is both the INTERACTIVE and SUBMIT host for the cluster. If off campus, the VPN is required for access. In addition, Centaurus utilizes DUO for SSH logins. Please ensure you have set up DUO accounts. More info about the cluster, and how to access it

4. RARS -- RISC-V Assembler and Runtime Simulator from https://github.com/TheThirdOne/rars

This is a standalone Java software that you need to download and launch the program for writing RISC-V assembly program and execute the program using simulation.

5. Digital for digital logic design and experiment from https://github.com/hneemann/Digital

This is a Java software that you need to download and launch the program for the digital logic design and simulation.

If you ever want an actual Linux the environments for some of the development, you can use either a Linux virtual machine, or a bare-metal Linux machine that can be accessed locally or remotely. But this is not required for this course.

Virtual Machines (Not required for this semester)

The development computer can be any Linux machine with required software installed. To use virtual machine, you need a virtual machine software such as VMWare, VirtualBox, Parallels etc.

On Windows Platform

If you are on a Windows platform, download VMware Workstation Player, which is free for non-commercial use. If you use Mac OS X, download the Parallels Desktop free trail for 14 days. After download, install the software by following the installation procedure.

You then need the virtual machine itself. We have created a Linux VM of Ubuntu Linux 18.04 desktop that has all the software you need loaded. For using VMware Workstation Player on Windows, download the VM file UbuntuLinux_ITSC381.ova (about 12G) to the lab computer or your own computer from the google driver folder. After download completes, use VMWare Workstation Player to import (not to create a new one) the VM file to set up the UbuntuLinux_ITSC381 VM. The VM takes up about 30G storage space. After the VM is ready, you can start the VM and the UbuntuLinux_ITSC381.ova file can be deleted.

The VM has one account setup as "ITSC3181 Lab" with password admin@123.

Enable hardware counter on VMWare Workstation Player (Windows)

Since we are using VM, hardware counter must be enabled in the VM setting on VMWare Workstation Player or VMWare Fusion in order to use perf command to display instruction and cycles information. You can only enable hardware counter in the VM setting when the VM is powered off. See below screen shot for enabling hardware counter in VM Settings->Harware->Processor setting window:

On Mac OS X Platform

If you use Mac OS X, download the Parallels Desktop free trail for 14 days. You need to download either the Pro Edition or Business Edition. After download, install the software by following the installation procedure.

You then need the virtual machine itself. We have created a Linux VM of Ubuntu Linux 18.04 desktop that has all the software you need loaded. For using Parallels Desktop on Mac OS X, download the VM file UbuntuLinux_ITSC381.pvm.zip (about 10G) from the google driver folder. After download completes, unzip the file which will create a UbuntuLinux_ITSC381.pvm folder. Then launch the Parallels Desktop application and use Parallels Desktop to Open the UbuntuLinux_ITSC381.pvm folder, which starts the VM. You can delete the UbuntuLinux_ITSC381.pvm.zip file after unzipping it.

To enable hardware counter from Parallels Desktop, the UbuntuLinux_ITSC381 VM has to be shutdown. In the Setting of the UbuntuLinux_ITSC381 VM, go to Hardware Tab, CPU & Memory and check "PMU virtualization", which should enable hardware counter for the VM. See below screen shot.

Share files between host and VM

The VM and host machine can share files. By default, the VM you download can access the any drive of the host machine. But it may not work since each time VM starts, it glitches here and there. You can enable sharing files between host and VM by the following instructions. Instructions for VMWare Workstation Player are show below. For Mac OS X and Parallels Desktop, you should be able to find the folder sharing in the setting for the VM.

  1. Open the "Virtual Machine Setting" menu
  2. Option tab -> Shared Folder where you add shared folder from host. See below screenshot for VMWare Workstation Player.
  3. In the VM, the shared folder normally appears under /mnt/hgfs/ folder.
  4. If you can access the google drive from your host machine, you can also share the google drive to your VM so all of your files will be stored on google drive.

Create your own VM to use

If you already have a Ubuntu VM with VMWare or you create one by yourself, you need to install additional software in your VM to have it ready for this course. The setup will be the same as setting up a real machine, see below instructions.

Real Machine (Not Required for this semester)

A real machine can be any computer that has Linux installed (e.g. Ubuntu) and that you can access locally or remotely. It provides the same environment as a virtual machine and also allow you to do more things for system development than what a VM can provide. Installing and seting up a standard Linux computer is beyound the scope of this course. After you have standard Linux environment setup, you need to do the following to have your machine ready for this course:

Install and setup perf utilities

Edit file from command line interface

You can use vi/vim, emacs, nano, etc to edit a file. Check Linux and C Programming (slide 5 and 6) for a short introduction to vim. I also found this Vim Basics very helpful and short.