Ece429 Lab1 Description
Ece429 Lab1 Description
Contents
1 Introduction 1
2 The Lab 2
5 Text Editors 11
1 Introduction
Welcome to ECE429!
This document presents a preliminary laboratory which prepares you for a semester full of work.
There is no VLSI design material introduced in this lab. The purpose of this lab is to help you
understand the whole lab system and to verify your lab setup before the busy semester starts. It
also contains information that you may want to reference later in the semester. For example, it
contains a list of various Linux commands and tools that would be used frequently.
1
ECE429 - Fall 2024 Professor: Ken Choi
2 The Lab
Since the commercial EDA tools and the libraries we use for the VLSI designs are not available for
free to the general public and requires sophisticated installation process, all the labs and the final
project will be completed on the ECE Linux network (e.g., Endeavour Server: endeavour.ece.
iit.edu) where all the tools and libraries are installed. An account on the ECE Linux network was
created for you after your registration of this course. There are two Lab sections this semester:
• On Campus (in-person students): L01 on Wednesday 08:35 AM - 11:15 AM at Siegel
Hall, Room 310A.
• Internet (Online): Lab session recording will be available online via Canvas on Wednesday
at 12:00 PM.
3.2 Students inside Illinois Tech network but not using SH310A desk-
tops
Students that are connected to Illinois Tech network, but are not using SH310A desktops. Depend-
ing on your personal device operating system (e.g., Windows, MacOS, Linux), please follow one of
the three tutorials (skip to step 5) in the the ECE Server System Documentation.
2
ECE429 - Fall 2024 Professor: Ken Choi
3.5 To do list:
Once you are successfully logged into the system, (e.g, completed step 16 from the tutorials). You
MUST do the following:
Once you see the virtuoso library manager tab (e.g., Figure 1), your setup is done, close the
window for today, and we will start with Virtuoso next week.
4. Follow Tutorial 0: Linux Development Environment to get familiar with Linux enviro-
ment and commands.
3
ECE429 - Fall 2024 Professor: Ken Choi
⋆ To-Do: Experiment with using the echo command to display different messages.
⋆ To-Do: Use the man command to learn more about the cat command.
4
ECE429 - Fall 2024 Professor: Ken Choi
5
ECE429 - Fall 2024 Professor: Ken Choi
You should see output similar to what is shown above, but instead of username it should show
your actual username. The pwd command shows a directory path. A directory path is a list of
nested directory names; it describes a “path” to get to a specific file or directory. So the above
path indicates that there is a toplevel directory named home that contains a directory named
username. This is the directory path to your home directory. As an aside, notice that Linux uses
a forward slash (/) to separate directories, while Windows uses a backslash (\) for the same purpose.
We can use the mkdir command to make new directories. The following command will make a
new directory named ece429 within your home directory.
$ mkdir ece429
We can use the cd command to change our current working directory. The following command
will change the current working directory to be the newly created ece429 directory, before displaying
the current working directory with the pwd command.
$ cd ece429
$ pwd
/home/username/ece429
Use the mkdir, cd, and pwd commands to make another directory.
$ mkdir lab1
$ cd lab1
$ pwd
/ home / username / ece429 / lab1
We sometimes say that lab1 is a subdirectory or a child directory of the ece429 directory. We might
also say that the ece429 directory is the parent directory of the lab1 directory.
There are some important shortcuts that we can use with the cd command to simplify navigating
the file system. The special directory named . (i.e., one dot) always refers to the current working
directory. The special directory named .. (i.e., two dots) always refers to the parent of the current
working directory. The special directory named ˜ (i.e., a tilde character) always refers to your
home directory. The special directory named / (e.g., single forward slash) always refers to the
highestlevel root directory. The following commands illustrate how to navigate up and down the
directory hierarchy we have just created.
$ pwd
/ home / username / ece429 / lab1
$ cd .
$ pwd
/ home / username / ece429 / lab1
$ cd ..
$ pwd
/ home / username / ece429
$ cd ..
$ pwd
/ home / username /
$ cd ece429 / lab1
$ pwd
/ home / username / ece429 / lab1
6
ECE429 - Fall 2024 Professor: Ken Choi
$ cd
$ pwd
/ home / username
$ cd /
$ pwd
/
$ cd ~/ ece429
$ pwd
/ home / username / ece429
Notice how we can use the cd command to change the working directory to another arbitrary
directory by simply using a directory path (e.g., ece429/lab1). These are called relative paths
because the path is relative to your current working directory. You can also use an absolute path
which always starts with the root directory to concretely specify a directory irrespective of the
current working directory. A relative path is analogous to directions to reach a destination from
your current location (e.g., How do I get to the Cloud Gate from my current location?), while an
absolute path is analogous to directions to reach a destination from a centralized location (e.g.,
How do I get to the Cloud Gate from the center of town?).
$ pwd
/ home / username / ece429
$ cd / home / username / ece429 / lab1
$ pwd
/ home / username / ece429 / lab1
$ cd
$ pwd
/ home / username
This example illustrates one more useful shortcut. The cd command with no command line
arguments always changes the current working directory to your home directory. We can use the
ls command to list files as well as directories. Use the following commands to create a new file and
directory in the ece429/lab1 subdirectory, and then list the file and directory.
$ cd ~/ ece429 / lab1
$ echo " ECE429 - Intro to VLSI " > ece429 - lab1 . txt
$ mkdir dirA
$ ls -1
You should see both the dirA subdirectory and the newly created ece429-lab1.txt file listed. Feel
free to use the cat command to verify the file contents of the newly created file. We can use the ls
-1 command to recursively list the contents of a directory. The following commands create a few
more directories before displaying the directory hierarchy.
$ cd ~/ ece429 / lab1
$ mkdir -p dirB / dirB_1
$ mkdir -p dirB / dirB_2
$ mkdir -p dirC / dirC_1
$ cd ~/ ece429 / lab1
$ ls -l
7
ECE429 - Fall 2024 Professor: Ken Choi
To-Do: Experiment with creating additional directories and files within the
ece429/lab1 subdirectory. Try creating deeper hierarchies with three or even
⋆ four levels of nesting using the -p option to the mkdir command. Experiment
with using the . and .. special directories. Use the ls -l command to
display your newly created directory hierarchy.
8
ECE429 - Fall 2024 Professor: Ken Choi
The following example illustrates how we can use the special . directory to move files from a
subdirectory into the current working directory.
$ cd ~/ ece429 / lab1
$ ls -1
$ mv dirE / ece429 - lab1 . txt .
$ ls -1
We can use the rm command to remove files. The following command removes a file from within
the ece429/lab1 subdirectory.
$ cd ~/ ece429 / lab1
$ ls -1
$ rm ece429 - lab1 . txt
$ ls -1
To clean up, we might want to remove the files we created in your home directory earlier in this
tutorial.
$ cd
$ rm ece429 - lab1 . txt
$ rm ece429 - lab1 - layer1 . txt
$ rm ece429 - lab1 - layer2 . txt
$ rm ece429 - lab1 - layer3 . txt
We can use the -r command line option with the rm command to remove entire directories,
but please be careful because it is relatively easy to permanently delete many files at once. See
Section 3.3 for a useful command that you might want to use instead of the rm command to avoid
accidentally deleting important work.
$ cd ~/ ece429 / lab1
$ ls -1
$ rm -r dirA dirB dirC dirE
$ ls -1
To-Do: Creating additional directories and files within the ece429/lab1
subdirectory, and then use the cp, mv, and rm commands to copy, move, and
⋆
remove the newly created directories and files. Use the ls commands to
display your file and directory organization.
9
ECE429 - Fall 2024 Professor: Ken Choi
laboratory assignments. The command takes the pattern and the files to search as command line
arguments. The following command searches for the word “dff” in the accu verilog file downloaded
in the previous section.
$ cd ~/ ece429 / lab1
$ grep " dff " accu_verilog
You should see just the lines within the accu verilog file that contain the word “dff”. We can
use the ––line-number and ––color command line options with the grep command to display the
line number of each match and to highlight the matched word.
$ cd ~/ ece429 / lab1
$ grep -- line - number -- color " dff " accu_verilog
We can use the -r command line option to recursively search all files within a given directory hi-
erarchy. In the following example, we create a subdirectory, copy the accu verilog file, and illustrate
how we can use the grep command to recursively search for the word “dff”.
$ cd ~/ ece429 / lab1
$ mkdir dirA
$ cp accu_verilog dirA
$ grep -r -- line - number -- color " dff " .
Notice how we specify a directory as a command line argument (in this case the special .
directory) to search the current working directory. You should see the three lines from both copies
of the overview.txt file. The grep command also shows which file contains the match. As another
example, we will search two special files named /proc/cpuinfo and proc/meminfo. These files are
present on every modern Linux system, and they contain information about the processor and
memory hardware in that system. The following command first uses the less command so you can
browse the file, and then uses the grep command to search for processor in the /proc/cpuinfo file.
Recall that with the less command, we use the up/down keys to scroll the file one line at a time,
the space bar to scroll down one page at a time, and the q key to quit viewing the file.
$ cd ~/ ece429 / lab1
$ less / proc / cpuinfo
$ grep " processor " / proc / cpuinfo
It should be pretty clear that you are using a system with multiple processors. You can also
search to find out which company makes the processors and what clock frequency they are running
at:
$ cd ~/ ece429 / lab1
$ grep " vendor_id " / proc / cpuinfo
$ grep " cpu MHz " / proc / cpuinfo
We can find out how much memory is in the system by searching for MemTotal in the /proc/mem-
info file.
$ cd ~/ ece429 / lab1
$ grep " MemTotal " / proc / meminfo
To-Do: Try using grep to search for the words "acc" and "clk" in the
⋆
accu verilog file.
10
ECE429 - Fall 2024 Professor: Ken Choi
5 Text Editors
You will need to be proficient in at least one text editor. Currently, there are multiple text editors
being supported, namely emacs, vim, and gedit. While the first two are very powerful and are
used by most professionals, they require weeks to learn. Hence, gedit, is recommended if you don’t
have any previous experience with emacs or vi. gedit is a simple text editor similar to Notepad
in Windows. To use gedit type:
$ gedit filename
It will open filename if that file already exists, otherwise, it will create a new file. Please note that
a text editor is not a word processor. A text editor only creates ASCII text files which you will
need in this class. Again, mastering the use of one text editor will increase your productivity and
save you time.
11
ECE429 - Fall 2024 Professor: Ken Choi
12