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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
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
A little diagram/schematic would help ... but I'm glad you discover this technique :-)
Are you sure? yes | no