Skip to content

CS 315-02 Lecture/Lab Meeting Summary — Fall 2025

  • Date: November 13, 2025
  • Time: 02:54 PM Pacific (US and Canada)
  • Zoom ID: 868 6589 0521

Quick Recap

Greg demonstrated: - How to set up a new GitHub repository and directory structure for Project 6. - How to use the autograder and run tests. - How to improve the instruction decoder, including reorganizing immediate handling and control lines. - How to implement new instructions (e.g., MUL, SUB) and adjust code structure (bit counts, control outputs). - An incremental development and testing workflow, encouraging students to add and run targeted unit tests for effective debugging.

Next Steps

  • Instructor (Greg):
  • Post the recording by the evening.
  • Add the Python script to the Week 13 in-class repository.

  • Students:

  • Create the Project 6 directory structure with subdirectories: Part 1, Part 2, Part 3, Final.
  • Clone their Project 6 GitHub repositories.
  • Add the A3 register to meet Project 6 requirements.
  • Update instruction memory with the Project 6 instruction memory from the test directory.
  • Add unit tests for instructions not covered by the provided tests.
  • Implement remaining Project 6 instructions using an incremental development approach.

Detailed Summary

1) GitHub Setup and Instruction Decoder

  • Repository structure: separate directories for Part 1, Part 2, Part 3, and Final.
  • Autograder usage: run in a partial implementation directory using:
  • gray test -P Project06
  • Instruction decoder improvements:
  • Introduced a single immediate output and a selector to choose among immediate types.
  • Reduced the number of wires to the ALU.
  • Spreadsheet updated with a new control line output (IMM Select) and adjusted values for instruction types.

2) Code Structure and Bit Rearrangement

  • Verified bit counts and adjusted control line outputs accordingly.
  • Placed IMM Select to preserve the intended operation order.
  • Modified the splitter configuration to align with new bit placements.
  • Ensured a symmetric and well-aligned circuit layout.

3) Project 6 Memory Update Process

  • Reviewed the process for updating ROM and instruction memory.
  • Steps included modifying the spreadsheet, updating control lines, and preparing for testing.
  • After updating instruction memory with Project 6 data, expected initial failures due to:
  • A new program selector and a changed instruction count.
  • The project now uses a 5-bit selector for a 32-input MUX, expanding instruction capacity from 512 to 1024.

4) Program Selector and MUL Instruction Updates

  • Updated the program selector and splitter; instruction memory and unit tests must be updated accordingly.
  • Addressed an A3 signal issue.
  • Implemented the MUL instruction by copying opcode and func7 values from the reference card.
  • MUL behaves like ADD in this design—no new control lines or data path changes required.
  • Instruction decode ROM updated to include MUL.

5) ROM and Instruction Encoding Updates

  • Implemented a new ROM path to detect MUL instructions and updated the priority encoder.
  • Demonstrated converting ASCII character codes to characters.
  • Encoded instruction names as 32-bit values for on-circuit display.
  • Planned deliverables:
  • A debug circuit for name display.
  • A Python script to generate hex files for instruction names.
  • Advised adding unit tests for any missing instructions and encouraged writing custom tests.

6) INUM and INAM System Implementation

  • Introduced INUM (numeric ID) and INAM (name) systems:
  • Explained how to propagate these through circuits.
  • Organized instruction definitions within a spreadsheet.
  • Emphasized flexibility in instruction ordering:
  • The only constraint is keeping the detection order consistent with the spreadsheet.
  • Suggested optionally displaying the unimp instruction at the top and considering an imp instruction for future work.

7) Circuit Modification for Instruction Detection

  • Demonstrated adding a new Instruction Word (IW) and updating comparators to detect it.
  • Resolved issues encountered during modification and testing.
  • Committed to publishing:
  • A Python script.
  • An INAM-to-ASCII debug circuit in the class repository.
  • Showed how to test by inserting a new row with a different opcode for validation.

8) Subtraction Function (SUB) and Testing

  • Implemented SUB and created a dedicated test file: unit_sub.s.
  • Pushed code to the Beagle board and cloned the Project 6 repository to run tests.
  • Planned to use a Week 10 Python script to generate the ROM file for tests.

9) Project 6 Testing Methodology

  • Reinforced incremental development:
  • Implement one instruction at a time.
  • Write and run targeted tests.
  • Encouraged using unused slots for custom tests.
  • Highlighted the value of combining assembly, digital design, and hardware execution for learning and debugging.