It seemed like a good idea at the time

Posted on Thu 20 August 2026 in MUPS16 • Tagged with design, control, clock

Sometimes you have what seems like a genius idea that comes back to bite you later. Back in 2022, when I started building the control unit, I had an idea that I thought would both prevent bus contention and simplify debugging.

The Plan

The problem was that when I was …


Continue reading

Debugging the decode board rev. 1.2

Posted on Sun 22 September 2024 in MUPS16 • Tagged with debugging, control, pcb

Some quick notes on debugging the new revision of the decode card:

  • plugging card in prevents reset from making any progress. With the logic analyser it's clear that rst_trig is being triggered every clock cycle. This is because there's a bug in the logic for controlling the control memory daughter …

Continue reading

Changes to PC/IMM/Except design

Posted on Sun 11 August 2024 in MUPS16 • Tagged with control

Following on from last month's musings, over the last couple of months I've done a bit more work on the LLVM backend for the MUPS/16. Whilst implementing support for global symbols (which includes function addresses) I realised I'd made a bit of a mistake with the design of the …


Continue reading

Version 1.1 of the μcode address generator

Posted on Fri 19 July 2024 in MUPS16 • Tagged with control, pcb

Since the first version of the μcode address generator had a few issues, I re-worked it to fix them, and while I was at it I let a bit of feature-creep happen. The 1.1 revision of the board has quite a lot more functionality than the 1.0 one …


Continue reading

Notes on changes and improvements to control

Posted on Fri 12 July 2024 in MUPS16 • Tagged with control, improvements

Random notes on things I've noticed over the last few weeks that could be improved:

PC

I think I made a mistake with the j and jal instructions. They currently work like MIPS, and leave the top 4 bits of PC unchanged, replacing the bottom 12 bits with the 11-bit …


Continue reading

TODOs

Posted on Fri 12 July 2024 in MUPS16 • Tagged with control, improvements

Fixes

  • Either RAM should ignore all read/write requests when reset is low or I need to fix the decode card to not drive memory control lines during reset. Currently RAM read/writes as the memory control ROM is shifted (same problem as on MMU)
  • fix the bad silk screen …

Continue reading

Testing the PC and immediate unit

Posted on Sun 12 May 2024 in MUPS16 • Tagged with control, pcb

I combined the PC and immediate units into one board since the immediate unit has three outputs (data, B bus, and PC), and combining the imm and PC units onto one board saved 16 lines on the backplane for the imm->PC connection. Technically, there's a LUI 'unit' here too …


Continue reading

Testing the μcode address generator

Posted on Mon 06 May 2024 in MUPS16 • Tagged with control, pcb

It's been almost 18 months since I had any time to work on this (life got in the way), but I've started assembling and testing the last batch of boards I designed, and working on the next lot.

The μcode address generator was the simplest piece of the control unit …


Continue reading

First Control Boards Ordered

Posted on Mon 19 September 2022 in MUPS16 • Tagged with control, pcb

I finally decided to stop tweaking the design of the pieces of the control unit that have been mostly complete for almost a year now, and just send them to be manufactured. There are four new boards here:

  • a new lower backplane
  • a new tester board to allow an Arduino …

Continue reading

Thoughts on hardware debugging

Posted on Sun 11 September 2022 in MUPS16 • Tagged with debugging, control

The control lines are designed with a couple of common features:
  • they all have a safe or no-op state when the lines are high. For simple lines, this means that they are active-low. For encoded lines, this means that all ones is a no-op command
  • they all have pullup resistors …

Continue reading

Control Unit Underway

Posted on Sun 16 January 2022 in MUPS16 • Tagged with control

I've finally had a bit of time around work to get back to this. The last major piece to do is the control unit, and since a) I expect this will take several attempts to get right, and b) I only left myself a 14x20cm space for the whole unit …


Continue reading

Rethinking control

Posted on Sat 26 September 2020 in MUPS16 • Tagged with registers, control

Several of the instructions in the current design need a bit of a rethink. In particular, I've been thinking about how this CPU could eventually be pipelined, and as part of that, how to simplify the control unit. I've probably made too much use of the flexibility that microcoding instructions …


Continue reading

Interrupt and syscall handling, redesigned

Posted on Sat 20 June 2020 in MUPS16 • Tagged with interrupts, control

I'm going to just call interrupts, syscalls, page faults, privilege errors etc. exceptions from now on to save typing. Since the current design of exceptions has a few flaws, we need a new design. I'm not keen on redesigning the existing hardware I've made if possible, so that means no …


Continue reading

Interrupt and syscall handling

Posted on Fri 19 June 2020 in MUPS16 • Tagged with interrupts, control

My first attempt at implementing interrupt, syscall and exception handling in MUPS/16 currently has 4 types of traps:

  • interrupts (currently 4, with equal priority)
  • page faults
  • syscalls
  • privilege errors

Syscalls are handled slightly differently as they are completely synchronous, and so can be treated just as another instruction (R-type …


Continue reading