0% found this document useful (0 votes)
15 views12 pages

Ece429 Lab1 Description

The document outlines the structure and requirements for Lab 1 of ECE429, focusing on setting up a Linux environment and basic commands. It provides instructions for creating an ECE user account, connecting to the ECE Linux network, and familiarizing students with essential Linux commands. The lab aims to prepare students for the semester by ensuring they have the necessary tools and knowledge to complete their assignments.

Uploaded by

nerdygamer69900
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

Ece429 Lab1 Description

The document outlines the structure and requirements for Lab 1 of ECE429, focusing on setting up a Linux environment and basic commands. It provides instructions for creating an ECE user account, connecting to the ECE Linux network, and familiarizing students with essential Linux commands. The lab aims to prepare students for the semester by ensuring they have the necessary tools and knowledge to complete their assignments.

Uploaded by

nerdygamer69900
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

ECE429 - Fall 2024 Professor: Ken Choi

Lab 1: Setup, and Basic Linux Commands


Lab Date: Wednesday, September 4th, 2024
Due date: NO LAB REPORT REQUIRED

Teaching Assistant: Nader Alnatsheh


Offie Hours: Tuesday 11:45 am - 01:45 pm @SH309

Contents
1 Introduction 1

2 The Lab 2

3 Setup Your ECE User Account and Remote Connection 2


3.1 Students using SH310A desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.2 Students inside Illinois Tech network but not using SH310A desktops . . . . . . . . 2
3.3 Students outside Illinois Tech Network . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.4 Account Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.5 To do list: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

4 Tutorial 0 : Linux Development Environment 4


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 The Linux Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2.1 Hello World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2.2 Manual Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2.3 Create, View, and List Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.2.4 Create, Change, and List Directories . . . . . . . . . . . . . . . . . . . . . . 5
4.2.5 Copy, Move, and Remove Files and Directories . . . . . . . . . . . . . . . . . 8
4.2.6 Using wget to Download Files . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2.7 Using grep to Search Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2.8 Using find to Find Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5 Text Editors 11

6 Lab Policy, Help and Other Advice 12

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 Setup Your ECE User Account and Remote Connection


1. If you are going to work on the lab experiments in SH310A, please follow section 3.1
2. If you are not going to work on the lab experiments in SH310A, but you are connected to
Illinois Tech network, please follow section 3.2
3. If you are going to work on the lab experiments outside Illinois Tech network, please follow
section 3.3

3.1 Students using SH310A desktops


The desktops in SH310A are connected to Illinois Tech network, and the PUTTY ssh application
is already installed there. Please invoke PUTTY and follow the tutorial from step 5.
Note: As the ECE LINUX network can be accessed remotely almost anytime 24 hours per day,
7 days per week, main campus students requiring additional lab accesses should also utilize such
option by following steps 1 - 4.

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.

3.3 Students outside Illinois Tech Network


Depending on your personal device operating system (e.g., Windows, MacOS, Linux), please follow
one of the three tutorials in the ECE Server System Documentation.

3.4 Account Administrator


If you have account issues or remote access problems, please e-mail Mr. Kamran , CC ECE support
, and the TA: Nader Alnatsheh.

2
ECE429 - Fall 2024 Professor: Ken Choi

Figure 1: Cadence Virtuoso Library Manager Tab

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:

1. Change your password, in a new terminal type the command:


$ passwd
Changing password for user username .
Changing password for username .
( current ) UNIX password :
New password :
passwd : all authentication tokens updated successfully .

2. Add the following lines at the end of the .cshrc file:


$ gedit ~/. cshrc
source / import / scripts / ece429 . cshrc

3. Invoke Cadence Virtuoso, type the command:


$ virtuoso

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

4 Tutorial 0 : Linux Development Environment


4.1 Introduction
The laboratory assignments for this course are designed assuming you will be using a Linux (or
UNIX-like) operating system for development. Basic Linux knowledge is essential to successfully
complete this work and a more in-depth understanding enhances productivity. This tutorial offers
a brisk introduction to the Linux operating system for first time users. To follow along with
the tutorial, type the commands without the % character. In addition to working through the
commands in the tutorial, you should also try the more open-ended tasks marked with the ⋆
symbol.
Before you begin, make sure that you have sourced the [source /import/scripts/ece429.cshrc]
script or that you have added it to your /home/.cshrc file, which will then source the script every
time you login. Sourcing the setup script sets up the environment required for this tutorial and for
the rest of the labs.

4.2 The Linux Command Line


In this section, we introduce the basics of working at the Linux command line. Our goal is to get
you comfortable with commands required to complete the laboratory assignments. The shell is the
original Linux user interface which is a text-based command-line interpreter. The default shell on
the ecelinux machines is tcsh. While there are other shells such as sh, csh, and Bash, for this course
we will always assume you are using tcsh.

4.2.1 Hello World


We begin with the ubiquitous “Hello, World” example. To display the message “Hello, World” we
will use the echo command. The echo command simply “echoes” its input to the console.
$ echo " Hello , World "
The string we provide to the echo command is called a command line argument. We use command
line arguments to tell commands what they should operate on. Although simple, the echo com-
mand can very useful for creating simple text files, displaying environment variables, and general
debugging.

⋆ To-Do: Experiment with using the echo command to display different messages.

4.2.2 Manual Pages


You can learn more about any Linux command by using the man command. Try using this to
learn more about the echo command.
$ man echo
You can use the up/down keys to scroll the manual one line at a time, the space bar to scroll down
one page at a time, and the q key to quit viewing the manual. You can even learn about the man
command itself by using man man. As you follow the tutorial, feel free to use the man command
to learn more about the commands we cover.

⋆ To-Do: Use the man command to learn more about the cat command.

4
ECE429 - Fall 2024 Professor: Ken Choi

4.2.3 Create, View, and List Files


We can use the echo command and a feature called command output redirection to create simple
text files. We will discuss command output redirection in more detail later in the tutorial. Command
output redirection uses the > operator to take the output from one command and “redirect” it to
a file. The following commands will create a new file named ece429-lab1.txt that simply contains
the text “Welcome to ECE429 - Intro to VLSI”.
$ echo " Welcome to ECE429 - Intro to VLSI " > ece429 - lab1 . txt
We can use the cat command to quickly display the contents of a file.
$ cat ece429 - lab1 . txt
For larger files, cat will output the entire file to the console so it may be hard to read the file as it
streams past. We can use the less command to show one screen-full of text at a time. You can 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.
$ less ece429 - lab1 . txt
You can use the ls command to list the filenames of the files you have created.
$ ls
We can provide command line options to the ls command to modify the command’s behavior. For
example, we can use the -1 (i.e., a dash followed by the number one) command line option to list
one file per line, and we can we can use the -l (i.e., a dash followed by the letter l) command line
option to provide a longer listing with more information about each file.
$ ls -1
$ ls -l
You should see the newly created ece429-lab1.txt file along with some additional directories or
folders. We will discuss directories in the next section. Use the following commands to create a few
more files using the echo command and command output redirection, and then list the files again.
$ echo " GPU " > ece429 - lab1 - layer1 . txt
$ echo " ASIC " > ece429 - lab1 - layer2 . txt
% ls -1
To-Do: Create a new file named ece429-lab1-layer3.txt which contains the

other families of chips (i.e., FPGA). Use cat and less to verify

4.2.4 Create, Change, and List Directories


Obviously, having all files in a single location would be hard to manage effectively. We can use
directories (also called folders) to logically organize our files, just like one can use physical folders
to organize physical pieces of paper. The mechanism for organizing files and directories is called the
file system. When you first login to an endeavour machine, you will be in your home directory. This
is your own private space on the server that you can use to work on the laboratory assignments and
store your files. You can use the pwd command to print the directory in which you are currently
working, which is known as the current working directory.
$ pwd
/ home / username

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.

4.2.5 Copy, Move, and Remove Files and Directories


We can use the cp command to copy files. The first argument is the name of the file you want to
copy, and the second argument is the new name to give to the copy. The following commands will
make two copies of the files we created in the previous section.
$ cd ~/ ece429 / lab1
$ cp ece429 - lab1 . txt ece429 - lab1 - a . txt
$ cp ece429 - lab1 . txt ece429 - lab1 - b . txt
$ ls -1
We can also copy one or more files into a subdirectory by using multiple source files and a final
destination directory as the arguments to the cp command.
$ cd ~/ ece429 / lab1
$ cp ece429 - lab1 . txt dirA
$ cp ece429 - lab1 - a . txt ece429 - lab1 - b . txt dirA
We can use the -r command line option to enable the cp command to recursively copy an entire
directory.
$ cd ~/ ece429 / lab1
$ ls
$ cp -r dirA dirD
$ ls
If we want to move a file or directory, we can use the mv command. As with the cp command,
the first argument is the name of the file you want to move and the second argument is the new
name of the file.
$ cd ~/ ece429 / lab1
$ mv ece429 - lab1 . txt ece429 - lab1 - c . txt
$ ls -1
Again, similar to the cp command, we can also move one or more files into a subdirectory by
using multiple source files and a final destination directory as the arguments to the mv command.
$ cd ~/ ece429 / lab1
$ ls -l
$ mv ece429 - lab1 - a . txt dirB
$ mv ece429 - lab1 - b . txt ece429 - tut1 - c . txt dirB
$ ls -l
We do not need to use the -r command line option to move an entire directory at once.
$ cd ~/ ece429 / lab1
$ ls -1
$ mv dirD dirE
$ ls -1

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.

4.2.6 Using wget to Download Files


We can use the wget command to download files from the internet. For now, this is a useful way
to retrieve a text file that we can use in the following examples.
$ cd ~/ ece429 / lab1
$ wget http :// www . ece . iit . edu /~ vlsida / ECE429_tutorials / accu_verilog
$ cat accu_verilog

4.2.7 Using grep to Search Files


We can use the grep command to search and display lines of a file that contain a particular pattern.
The grep command can be useful for quickly searching the contents of the source files in your

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

4.2.8 Using find to Find Files


We can use the find command to recursively search a directory hierarchy for files or directories that
match a specified criteria. While the grep command is useful for searching file contents, the find
command is useful for quickly searching the file and directory names in your laboratory assignments.
The find command is very powerful, so we will just show a very simple example. First, we create a
few new files and directories.
$ cd ~/ ece429 / lab1
$ mkdir -p dirB / dirB_1
$ mkdir -p dirB / dirB_2
$ mkdir -p dirC / dirC_1
$ echo " test " > dirA / file0 . txt
$ echo " test " > dirA / file1 . txt
$ echo " test " > dirB / dirB_1 / file0 . txt
$ echo " test " > dirB / dirB_1 / file1 . txt
$ echo " test " > dirB / dirB_2 / file0 . txt
$ ls -1
We will now use the find command to find all files named ”file0.txt”. The find command takes
one command line argument to specify where we should search and a series of command line options
to describe what files and directories we are trying to find. We can also use command line options
to describe what action we would like to take when we find the desired files and directories. In this
example, we use the ––name command line option to specify that we are searching for files with
a specific name. We can also use more complicated patterns to search for all files with a specific
filename prefix or extension.
$ cd ~/ ece429 / lab1
$ find . - name " file0 . txt "
Notice that we are using the special . directory to tell the find command to search the current
working directory and all subdirectories. The find command always searches recursively.

To-Do: Create additional files named "file2.txt" in some of the


⋆ subdirectories we have already created. Use the "find" command to search
for files named "file2.txt".

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

6 Lab Policy, Help and Other Advice


All the labs and projects should be done individually. Discussions are encouraged. However, all the
writings and screenshots should be by yourself. COPY without proper CITATION will be treated
as PLAGIARISM and called for DISCIPLINARY ACTION.
NEVER share your writings/screenshots with others.
The requirement of the lab/project reports with a template can be found on the Canvas site.
We prefer to receive reports electronically as a .pdf file through the Assignments section on the
Canvas site.
Late policy: You get 8 free days without penalty, after that a 20% off per assignment
per day (e.g., late 9 days to submit lab report 2 means a 20% penalty). You cannot
be late by more than 9 days.
If you need help, please feel free to contact the TA. A very important piece of advice is to backup
often.
One of the big problems with many of the tools we will be using is they consume disk space.
This may or may not be a problem. However, if you are nearing your disk quota and you exceed this
value, your design will probably bite dust. Therefore, please check your quota and backup often.
Another suggestion is to communicate between your peers. Do not ask for answers directly,
however, ask for advice or suggestions to get through a problem that perhaps they have encountered.
Your peers are your greatest asset.

12

You might also like