University of Maine · Electrical & Computer Engineering

ECE 473 Computer Architecture and Organization

Demos and materials for ECE 473, taught by Dr. Prabuddha Chakraborty. Everything here runs in the browser — no install, no account, no network once the page has loaded — so it works equally well on the lecture projector and on a laptop at 2 a.m.

Overview

About these materials

ECE 473 is about how a machine actually executes a program — instruction sets, encodings, datapaths, memory hierarchy and the design trade-offs behind them. The pieces on this page are the parts of that story that are easier to use than to read about: an instruction is easier to understand once you have taken one apart field by field and put it back together, a datapath is easier to understand once you have built it block by block and watched a program flow through it, a pipeline is easier to understand once you have watched five instructions share it and seen exactly where they get in each other’s way, and a cache is easier to understand once you have stepped an address trace through it and counted the hits and misses yourself.

Each demo is a single self-contained HTML file. Open it in any modern browser, press F for fullscreen, ? for the key list, and work through it at your own pace. Nothing is uploaded and nothing is tracked.

Interactive

Course demos

Hosted here and free to use, in this course or any other.

  • RISC-V: decode it

    RISC-V
    Instruction anatomy, encoding formats, and decoding practice

    Type an instruction or a raw hex word and watch it come apart: opcode, funct fields, registers and the immediate, each highlighted in place with the value it carries. Then find out why the fields sit where they do, and practice reading machine words back into assembly with answers you can check.

    • 1 · Anatomy One instruction, bit by bit — hover any field to see what it means.
    • 2 · Formats Why the bits are where they are — step through the encoding design decisions.
    • 3 · Decode Work out what a word means, type the answer, and have it checked.
  • RISC-V: single-cycle datapath

    RISC-V
    Build the datapath, trace every instruction, run a program

    Assemble the single-cycle RV32I datapath one block at a time and learn what each piece is for. Then pick any of the 37 base instructions and watch it light up the wires it uses, with live values and control signals, phase by phase. Finally load a program — or write your own — and step it through the machine one clock cycle at a time, with registers and memory updating as you go.

    • 1 · Build it up Add the datapath one block at a time, with a magnifier to zoom in on the part being added.
    • 2 · Instructions All 37 RV32I instructions on the datapath — isolate fetch, decode, execute, memory or writeback.
    • 3 · Run Assemble a program and step it cycle by cycle, watching registers and memory change.
  • RISC-V: five-stage pipeline

    RISC-V
    Cut the datapath into stages, trace an instruction, run a program with hazards

    Start from the single-cycle datapath and cut it into the classic five stages, adding the pipeline registers one at a time and seeing what has to travel with each instruction. Then send one instruction through, stage by stage, with live values at every boundary. Finally run real programs cycle by cycle on a pipeline with forwarding, load-use stalls, branch flushes and an optional one-bit predictor — toggle each policy and watch the cycle count change.

    • 1 · From single-cycle Insert IF/ID, ID/EX, EX/MEM and MEM/WB, then add the forwarding muxes and the hazard unit.
    • 2 · Instruction Pick an instruction class and move one instruction through the five stages, one at a time.
    • 3 · Run Step a program through the pipeline with a live pipeline diagram, hazard presets and stall and flush counters.
  • Memory hierarchy: caches

    Memory
    Placement, replacement, writes, and what a miss really costs

    Start from the gap between processor and memory speed and the locality that makes a small fast memory worth having. Then split an address into tag, index and offset and step the same trace through a direct-mapped, a fully associative and a set-associative cache, watching each hit and miss land. Finish with live access-time calculators — AMAT, CPU time, a second cache level — and a design sheet that checks your answers.

    • 1 · Why caches The gap, the hierarchy, and spatial and temporal locality.
    • 2 · Direct mapped One slot per block — split an address and step a trace.
    • 3 · Fully associative Any slot, every tag compared — same trace, same size, different placement rule.
    • 4 · Set associative n candidates per set, replacement and write policies, with self-grading practice.
    • 5 · Access time AMAT, CPU time and two-level caches, with calculators that follow every number you change.
    • 6 · Activity The Cache Design Sheet — fields, storage bits, a trace and timing, checked as you go.
Practical notes

Using them

  • In class

    Press F for fullscreen. The type is sized for a projector, and the number keys jump straight to a module.

  • On your own

    Press ? in any demo for its full key list. Arrow keys step through examples, instructions, blocks, stages or slides; Space steps or reveals, depending on the module.

  • Offline

    Save the page and it still works — every demo is one file, with no scripts, fonts or data fetched from anywhere else.

  • Reuse

    Instructors and students elsewhere are welcome to use and share these. A pointer back to this page is appreciated.

Course materials from the Secure and Intelligent Edge Research Lab.

Back to SIEGE Lab