Since the processor is nearing completion I've been thinking about programming it. One of my ideas for a program was to have the user specify a binary value, and then have the processor fill every available ram location with that value. This program requires that the value held by the @ resister be dynamic, I.e. the value in the @ register has to come from ram. Now take a look at the block diagram; there is no provision for @ register values to come from ram. That's the problem. Here's my solution, stick a 2:1 4 bit multiplexer between the ram and the incoming values, one of the inputs would be connected to rom, the other input would be coming from ram. the added command: RAM @ would then flip the multiplexer's control bit and the @ register's load bit. Pictures and updated schematics are forthcoming.
-Zaphod out
EDIT:
I've been thinking. specifically I think i found a problem with my solution. imagine a value from RAM is loaded into the @ register. to do so various control bits need to be flipped: the read bit on the RAM, the multiplexer bit, and the load bit on the @ register. at the beginning of the clock cycle the @ register holds the RAM address where the next RAM address is stored, I.E. @=0000 (RAM location zero) RAM0=0110 (value stored in RAM location indicated by the @ register.) when the clock goes high RAM0 is moved to @ (@=0110). now the @ register is pointing at RAM6. all good so far. it goes wrong now because all the control bits are still flipped, so the processes happens again @ is set to RAM6. now it happens again, @ is set to the value in RAM6 and so on... infinitely until the clock goes low, a value stored in a RAM address is also it's address (I.E. RAM16=1111), or something breaks and the magic blue smoke is released. I could rectify this problem by adding a half-clock delay on all of the appropriate control lines, however that produces a lot of hairy combinational logic. I think a better solution would be to replace the RAM @ command with a MIGRATE command. this would move the value in one of the registers to the @ register, side stepping the combinational logic. this solution still requires that I build another mux.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.