I think I may restructure my ALU a little bit. I originally had an A register and a result register. Writing to the result location puts the databus into the B port of the ALU and then captures the result into the result register. The problem is that the ALU has functions which don't rely on the B port. Like it has an A+1 function. So if I want A+1, I need to do a dummy write to a this register first, and then I can read out A+1. It would be nicer if I could have an A and B register instead, and then just read whichever result I want. So there's no result register - all results are available which are possible on the A and B registers. So if I want to have a simple up counter, I can just move the A+1 output to the A register and it takes one instruction. In the old way, it would take two. This would be a more elegant solution.
However, I would need to put a tri-state buffer on the ALU output which would cost me one more chip. A nice thing about the registers I've chosen is they have built-in tri-state buffers. One goal is to minimize my chip count, so I think I may hold off on this change for now. Sure some things cost me an extra instruction, but maybe that's easier to absorb than an extra chip.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.