Lab 1 - EE 421L 

Author: Edgar Amalyan

Date: 09/02/2020


Goals:
The majority of this lab was setting up the workspace which we will use to perform the rest of the labs in the semester.
Given this fact, instead of reiterating the steps that are already outlined in great detail in the tutorial, I will focus on the technical aspects of the enviornments.

Prelab  

The prelab had us request a CMOSedu account from Dr. Baker. 

After, we followed a tutorial to setup a simple web page which included a table, an image, and a link.

This can be seen below:

prelab

To edit web pages, we can use HTML/CSS or a web authoring program such as KompoZer. 

To setup my page, I create a directory in my backup folder (discussed at the end of this lab report). 

This folder is essentially a container for other files in the website. In KompoZer, we click the "Edit Sites" icon, and press the select directory button. We then navigate to and select the folder that we just created. 

This path is now our "publishing address", which of course is a local directory. This method has various advantages. One is that our web page is independant of CMOSedu.com. We do not have to connect to retrieve and start editing the pages.

Another benefit is that the majority of links are relative to other pages and not absolute to the website. 

After finishing our editing, we save and simply drag and drop the folder to ftp://cmosedu.com/


Lab

To run Cadence, we connect to the UNLV EE csim cluster. It can be run from ssh using X11 window forwarding. From home, this method is usable, but not ideal. For better performance, we can use VNC.
Since VNC is unencrypted, we use a VPN. The tunnel from your house to the VPN server will be secure. Since the VPN server is close to the Cadence server, the attack surface is greatly reduced.

After going through the Cadence setup steps in the tutorials, we are ready to start virtuoso. The recommended command is virtuoso &, which is a bash operator that runs the process in the background, freeing up the current terminal.
One thing to note is that while you gain the terminal back, you lose the ability to quickly terminate the program if it hangs. During one of the homework problems from the lecture, I wrongly entered 0.01ps instead of 0.01ns as the scale for the x-axis in the plot. While replotting, virtuoso was taking up 100% CPU and not finishing.
To end the program, I ran htop -u amalyane, which displayed the current processes I had running. I located the pid of virtuoso and executed kill <pid>. Without the original ampersand, closing the terminal would end Cadence.


In virtuoso, we draw the schematic.
The circuit is a voltage divider. We expect the node 'in' to be equal to vdc, 1, and 'out' to be equal to 1 * (10k / (10k + 10k)) = 0.5V. 


schematic




We now simulate and plot the voltages on the nodes.
Our results are correct.

plot

Backups:

For backups of the webpages and Cadence files, I use Google Cloud Storage. Google Drive and other sync services limit the number of files that can be transferred per second. Furthermore, actually downloading the files from the backup can be frustrating as they first have to be zipped. This process can take ages and sometimes just hangs.

I find this to be unreliable. Enterprise options such as those from Google and S3 from AWS, trade ease of use and cost for performance and control. To sync files to Storage, the provided gsutil tool can be used. But it is written in Python and often slow. Instead, I use a utility called rclone, which supports many different cloud services. The process for setting up an rclone
remote and GCP bucket is out of scope here, but I have a simple shortcut on my desktop that syncs all the files in the desired directory to the cloud. On Windows, you can create a batch file to do this.
In this file I have:
start cmd /C rclone sync D:\Backup gcp:edgaramalyan -P --fast-list --transfers 8
This allows me to sync everything with only a click.


The folder which contains my webpages resides in the main directory (D:\Backup) that gets synced.
As for the files on the csim cluster, I download them to D:\Backup so they get synced as well. To do this, I archive the files I need and compress them. I do this for my root directory, amalyane, and seperately for the CMOSedu directory. This is done with a simple bash script. The contents can be seen below:

backup

It is diffuclt to accurately manually guess which files are new and which were modified everytime you start working on a project. Therefore, it is a good idea to backup the entire CMOSedu directory.
Cadence also relies on files outside of the CMOSedu folder, so it is also a good idea to backup your entire user directory. If my entire account gets nuked, I am prepared and can restore it with basically no work.

Compressing the tar with gzip results in reasonable folder sizes that can be transferred quickly through the SFTP browser in MobaXterm.

After downloading the files, I run my sync batch script.

backup_gcp1

backup_gcp2

Return to EE 421L Labs