CIS 351

Introduction to JLS

Fall 2021

The objective for this lab is to

You are encouraged to work in teams of two on this assignment.

Begin by following this GitHub Classroom link to create the GitHub repository for this assignment. You will be asked to select or create a team name. The team you create is valid for this assignment only. You may switch teammates between assignments if you like.

Intro to JLS

This semester we will be using a digital logic simulator called JLS.

All the necessary code is contained in a single .jar file.

This video demonstrates how to use wires, subcircuits, and parallel gates in JLS.

Build an Adder

Use JLS to build an circuit that adds two 16-bit unsigned integers. You can use any design you like (ripple-carry, carry-lookahead, etc.). A ripple-carry adder is the simplest; but, building a faster, more complex adder will give you a head start on Project 1. (To be specific, to get full credit on Project 1, you ned an adder that is faster than 225.)

The starter code contains a .jls file named "UnsignedAdder_16bit". Your solution must go in this file (the auto-grader won't find it otherwise). Also, you must not change the names of the inputs and outputs. (Again, doing so will break the autograder.)

To keep the design manageable, you may want to use one or more sub-circuits (e.g., connect four 4-bit adders, or two 8-bit adders). If you do use sub-circuits, notice that you can unbundle buses into arbitrary groups. For example, you can take a 16-bit bus and split it into 0-3, 4-7, 8-11, and 12-15. In the "Create unbundler" dialog, select "Group bits" instead of "Single bits". (See the "Sign Extender" tutorial built into JLS.)

You may not use the built-in JLS adder. You must create your own full adder. Remember, you can save your full adder as a separate file and import it (using "File -> Import").

Testing

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

Test your circuit using SampleUnsigned16BitAdderTest.java. If the test script doesn't work without modification, then you either named your circuit, inputs, or outputs incorrectly. Note, however, that SampleUnsigned16BitAdderTest will not completely test your circuit. Add as many tests as necessary to be confident your circuit works.

JLS Shortcuts

This video demonstrates several helpful JLS shortcuts. Remember, JLS was designed specifically with these projects in mind. If you find a task highly repetitive/tedious, you are probably overlooking a shortcut.

Also, you can create and import subcircuits (analogous to writing a function in code). Go to "File -> Import" to import a saved subcircuit.

Deliverables

When your circuits passes the autograder tests:


Updated Thursday, 16 September 2021, 10:33 PM

W3c Validation