Close

Pointers

A project log for One-instruction TTL Computer

A breadboard-able computer which uses only a single instruction - MOVE

justin-davisJustin Davis 04/27/2017 at 19:262 Comments

I realized it's much easier to do the pointer register than I thought. The logic is just:

If destination register = Pointer-Data-Address then

destination bus = Pointer-Address

else

destination bus = destination register

Or in VHDL:

dstAddr <= ptrReg when dstRegOut=PTR_DATA_ADDR else dstRegOut;

So it won't cost me a clock cycle to execute this function which is great because modifying the constant 2-clock execute cycle would be a pain. All instructions executing in 2 clock cycles is elegant and I'd prefer to keep it that way.

Discussions

Justin Davis wrote 04/28/2017 at 00:44 point

Ya I've been putting together a block diagram, but it's not quite ready.  But this circuit is really just an 8-bit 2:1 MUX.  The control is a simple combinational circuit between the destination address register and a constant which is the address value for the pointer.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/27/2017 at 20:12 point

A little diagram/schematic would help ... but I'm glad you discover this technique :-)

  Are you sure? yes | no