close-circle
Close

Even better hardware debugging

A project log for Discrete YASEP

a 16-bits YASEP computer (mostly) made of DIP/SOIC chips like in the 70s and 80s... with 2010's twists!

Yann Guidon / YGDES 10/27/2015 at 05:142 Comments

As I add hardware features that borrow from the software world (at least, they get further than entry level boards from the late 70s), I wonder what new simple feature(s) can still be added to make development more comfortable. The gotcha is of course that no program or programmable logic is used so a fancy alphanumeric LCD is ruled out.

Now the question is "how could I display which opcode is being decoded ?"

The JavaScript YASEP simulator disassembles instructions on the fly to provide some nice display and it's very useful to understand what's going on.

I can't add an alphanumeric display but there are only 64 opcode combinations, as they are presented there http://archives.yasep.org/yasep2013/#!doc/opcodes

Well, with a couple of 74HC138 I can make a 8×8 LED array where one of the LED is on, depending on the opcode on the bus. Silkscreen printing (or stickers) will then say which opcode is being decoded. For unimplemented opcodes, the LED color could be red instead of yellow, for example :-)

OK, the idea is simple but there is just one gotcha : the 74HC138 has a low active level. This is fine but I can't use two directly because when line and column cross, the two lows don't make a high... I need an octuple inverter or something like that.

Is that a coincidence ? Decades ago, I pulled some 74LS640 from a board and I never knew what to do with it. This is for easy prototyping, the SMT version would use 8× small P-FET instead (hopefully cheaper than a weird octuple inverting buffer).


Other visual aid should be provided for the other instruction fields such as the condition field and the post-inc/decrement flags...


Update

A fancier approach would be to use a set of LED dot matrices I found. They are 5×7, or 30×7 in this configuration. Internally, let's round up to 8 lines of 32 bits (4 bytes). Each of the 64 input codes will take 32 bytes, or 2K bytes total. These data could be exported from the JavaScript interface and burned into a small (E)PROM...

At this point, I wonder what's keeping me from doing a totally hardware disassembler. Cost and time ? :-D


Update update (20151106)

I drop the alphanumeric display for the simpler method (8x8 matrix with one LED and the opcode name written on the PCB) because I have discovered (it's never too late !) the 74HC238, which is like the 138 but with positive logic outputs.

I also plan the design of a hardware disassembler/assembler module. It's too early yet but I consider this as a killer feature :-)

Discussions

esot.eric wrote 11/07/2015 at 04:45 point

Whoa, an indicator for each op-code... why not, eh? Cool.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 11/07/2015 at 04:55 point
64 LEDs costs less than 1/2$ and it's a pretty simple circuit : a HC138 drives the lines and a HC238 drives the columns. The LEDs are at each crossing.

  Are you sure? yes | no