Overview
The purpose of this lab is for you to get the different tools we will use throughout the semester set up and working. Note: Labs will generally be done in pairs. However, this one should be completed solo to ensure that everyone has access to the software they will need to be successful in this course.- Preparation
-
- Sign up for a GitHub account if you don't already have one. (We will be using GitHub and GitHub Classroom to manage assignments.)
- Make sure you can access your EOS account. If you don't have an account, or otherwise can't access your account, contact HPC support
before the beginning of lab (
hpcsupport@gvsu.edu
). - Set up a public/private SSH keypair and upload your public key to GitHub. (See this video for instructions.)
- Review basic
git
usage.
- Accessing EOS/Arch Remotely
-
Some of the tools we will use this semester will work only in GVSU's EOS/Arch environment. You can access these machines from anywhere
through your browser at
https://cislab.hpc.gvsu.edu/
. Remember: Select the "RDP" option if you need a GUI environment; select the "SSH" environment if a text-only interface is sufficient. (In this class, you will almost always want the "RDP" option.) - GitHub Classroom
-
GitHub Classroom is a service provided by GitHub that creates a separate
git
repo for each student (or team for team-based assignments). Most assignments that require the submission of a file (including this one) will use GitHub Classroom. This week's lab is an individual assignment. To get started:- Watch this video for an overiew.
- Follow this GitHub Classroom link to generate your personal repository for this week's lab.
- Clone the generated Git repository.
- JLS
-
This semester, we will be using a digital logic simulator called JLS.
All the necessary code is contained in a single
.jar
file.- If you are using
EOS/Arch, you will find
JLS.jar
in/home/kurmasz/public/bin
. The easiest way to run JLS in EOS/Arch is to put this directory in your path. (For most of you, the best way to do this is to add the lineexport PATH=$PATH:/home/kurmasz/public/bin
to the end of your.bashrc
.) There is a script namedjls
in this directory that sets up the java classpath and launches JLS. This directory also contains other scripts that will make your life in this course much easier. If you object to adding this directory to your path, you can also launch JLS with this command:java -jar /home/kurmasz/public/bin/JLS.jar /JLS.jar
. - If you want to run
JLS
on your own machine, you can download thejar
file here. (Please do not email Prof. Poplawski for a copy ofJLS
.)
- Launch
JLS
(either in EOS/Arch or on your own machine), openisPrime.jls
from the new repo, and complete theisPrime
circuit demonstrated in Video 1. Do not modify the names of the input and output.
- If you are using
EOS/Arch, you will find
- DLUnit
-
We will use a tool called DLUnit to run automated tests on your JLS circuits. Specifically,
DLUnit
allows you to write and execute JUnit tests for your circuits.To run
DLUnit
- in EOS/Arch:
- Make sure
/home/kurmasz/public/bin
is in yourPATH
- Use the terminal to
cd
into your repository for this lab. - Compile the test:
dlunit_compile IsPrimeTest.java
- Run
DLUnit
:dlunit isPrime.jls IsPrimeTest.class
.
- Make sure
- on your own machine
- Download DLUnit.jar.
- Use a terminal
cd
into your repository for this lab. - Compile the test:
javac -cp DLUnit.jar IsPrimeTest.java
- Run
java -jar DLUnit.jar isPrime.jls IsPrimeTest.class
- Use
DLUnit
to runIsPrimeTest
againstisPrime.jls
. - Use
DLUnit
to verify that yourisPrime
circuit passes the sample test cases.
IsPrimeTest
does not contain a complete set of tests. Part of your task is to write a complete set of test cases.- Edit
IsPrimeTest.java
and add a test case for each input. (You do not need tests cases for 0 and 1.) - Use
DLUnit
to verify that yourisPrime
circuit is correct. (Fix your circuit if any of your test cases fail.)
- in EOS/Arch:
- Automated Testing in GitHub
-
I will use a GitHub feature called GitHub Actions to run automated tests on your submission. You will not have access to these tests. If my automated tests fail, then your tests are incomplete. You need to add a failing test to your test suite, then fix the bug in your assignment. To run the automated tests:
- Commit and push your repository.
- Click on the "Actions" tab on your repository's web page.
- Click on the link that says "GitHub Classroom Workflow". It will be on the left.
- Look for a blue banner in the middle of the page with a drop-down list that says "Run Workflow". Click on this list, then click on the green button that says "Run Workflow".
- After a delay of a few seconds, you will see a new line under the blue banner with a yellow dot to the left. Wait for the test to complete.
- When the test is complete, the yellow dot will turn into either a green check or a red "X". If you get a red "X", you need to add tests, then fix any bugs in your submission.
- When your project passes your test suite, commit and push your circuit, then run the automated tests. (Fix any bugs as necessary.)
You should be using your tests to test your assignments, not mine. You should not be running the automated tests more than three times per day. Excessive use of GitHub Actions may result in a reduced grade. Attempting to hide/disguise the number of times you've run the autograder is a violation of GVSU's Academic Honesty Policy.
- Submission
- When your circuit passes the Automated tests, make sure your have a passing commit with a commit message
that contains
[Grade Me]
.
Done Early?
If you get done early (if there are 30 minutes or more left in the lab period), I suggest you get started on Lab 2. Specifically,
- Watch the first 7-1/2 minutes of this video, then
- Construct the first circuit described in Lab 2 (the one containing just an LED.)
Updated Thursday, 6 January 2022, 2:20 PM