Due date: See Canvas
Execute these command (copy and paste) in the SSH window to make a assignment sub-directory hw1 and copy the prepared file for this assignment:
mkdir ~/cs355/hw1 cp /home/cs355001/Handouts/hw1/* ~/cs355/hw1 |
Verify the result by executing this command in the SSH window:
ls ~/cs355/hw1 |
You should see this file name:
hw1.h - This file contains the circuit that you must make for assignment 1 |
In this assignment, you will design and implement a circuit with 5 inputs a, b, c, d and e and 3 outputs x, y and z that counts the number of one's in the input.
For example, if the input signals are a = 1, b = 0, c = 1, d = 1 and e = 1, then the output signals xyz = 100 representing the number 4 in the binary system.
If the input signals are a = 1, b = 1, c = 1, d = 1 and e = 1, the output signals should also be xyz = 101 (= 5).
And if the input signals are a = 1, b = 1, c = 0, d = 0 and e = 1, then the output signals should be xyz = 011, representing the number 3 in the binary system, and so on.
Here is another example and shows what the ciruit should do when the input signals are a = 1, b = 0, c = 0, d = 1 and e = 1:
Note: if you need a refresher on binary numbers, the CS255 online notes on this subject is here: click here
Write a EDiSim "program" that implement the above circuit.
Put the switches on the left (you will need 5 switches), the probes on the right (you need 3 probes) and the digital circuit between the switches and the probes.
Use the following coordinates for the components:
|
This is what your circuit should look like:
Note:
|
Execute this command: /home/cs355001/bin/add.path Then: (1) Logout (exit your SSH session) and (2) Use a new SSH window to log back in to a CS lab machine (3) Verify the process by running this command in the SSH window after you log in: type cs355sim It should return: cs355sim is a tracked alias for /home/cs355001/bin/cs355sim |
You only need to do this once
(Do these steps after you have SSH/remote login to a lab machine) Execute these command in the SSH session: cd ~/cs355/hw1 (this command will change working directory to "hw1") (You can omit this step if you are already in ~/cs355/hw1) nano hw1.h (this command starts the nano editor on file "hw1.h") (I recommend nano because it's easy to use) (If you are familiar with Linux and have used a diffeent editor, you can use your favorite editor) |
Use nano to write the EDiSim circuit program that implement the circuit describe in assignment 1. When you're done, save your file and run it with the command described below.
I have a brief nano tutorial here to help you learn to use the nano editor: click here
|
DO NOT make any changes to this ! (Or else, we will have a hard time grading your circuit).
To run your circuit use this command (inside the ssh session):
cd ~/cs355/hw1 (this command will change working directory to "hw1") (You only need to execute this command once per SSH session) cs355sim hw1.h (this command runs the circuit simulation) // NOTE: If you get the error message: cs355sim: not found // Use: /home/cs355001/bin/cs355sim hw1.h (Your PATH environment variable is wrong) Tip on how to work on the assignment: Use 2 SSH windows Use 1 window to edit your assignment file hw1.h (with nano) Run the cs355sim command in the other window |
A window will pop up showing the circuit simulation. You can interact with the circuit simulation by toggling the keys '0', '1', '2', '3' and '4' to change the switches value (0 or 1).
Verify correct circuit behavior
/home/cs355001/Solutions/hw1-sol |
cd ~/cs355/hw1 (this command will change working directory to "hw1") /home/cs355001/turnin hw1.h hw1 (this command turns in your assignment file) |
(A 4th extension request will be automatically denied --- personal emergencies and illiness with documentation will receive a "free" extension)
/home/cs355001/req-ext hw1 |
The list of commonly asked questions/answers is accessible through the following hyperlink: click here
Students will be graded partially on the basis of their programming assignments. These programming assignments are to be treated as examinations, and are expected to be your individual work. While discussions with other students in the course may be permitted or encouraged by your instructor, you should write your program yourself. The mathlab representatives are available to explain error messages, discuss briefly technical details with which you may not be familiar, and give short suggestions as to how you might detect logic errors. The reps should not, however be asked to write part or all of your program. Your instructor (and any teaching assistants assigned to the course) will be glad to help you to the extent that he or she feels reasonable.
Submissions based on other students solutions in prior offerings of the course specifically violate these guidelines, as do submissions prepared with the help of an outside "tutor".
You should take precautions to protect the confidentiality of your work: preserve the secrecy of your password, do not make files or directories sharable, pick up your printouts promptly and dispose of printouts where they will not tempt other students. All work should be done either in the class directory of your ITD account (preferred) or in your "priv" directory (only if you do not have a class directory).
All submissions should include a comment statement near the top of the program of the form:
THIS CODE IS MY OWN WORK, IT WAS WRITTEN WITHOUT CONSULTING A TUTOR OR CODE WRITTEN BY OTHER STUDENTS - your name
Cases of apparent plagiarism or collusion will be referred to the Honor Council.