I have created a very simple processor in logisim that should be able to handle bitwise and, bitwise or, addition, subtraction, and also beq (branch if equals) instructions.
It's basically finished, however, the main problem seems to be that PC doesn't change with the clock cycles, keeping the processor stuck on the first instruction.
I've actually been ripping my hair for weeks about this, because even though I've found some very helpful guides on how to put together the data path, I have been unable to find the source of the problem. To me it looks like I'm doing it the same way.
For example:
https://www.youtube.com/watch?v=Ngu1UbRAeqQ
and
https://www.cise.ufl.edu/~mssz/CompOrg/CDA-proc.html
Here is an image of the data path:
(I wasn't able to open this, so in case it doesnt work for you either I have also incuded it in the folder below)
_________________________________________________________________________________________________________________
Here is a jumpshare folder with the full file including all components in case you would like to open it (also contains the image of the datapath and test.asm):
http://jmp.sh/9yAiccw
__________________________________________________________________________________________________________________
Just in case here is the little mips code I'm using to test the processor:
.text
addi $a0,$0,4 # set $a0 to 4
addi $v0,$a0,2 # test addi, set $v0
add $v0,$v0,$a0 # start of counter. Should be 10
loop:
beq $v0,$a0,done # test, jump to done.
addi $v0,$v0,-3 # decrement. Loops twice.
beq $0,$0,loop # emulating an unconditional jump
done:
add $0,$0,$0 # NOP
It's basically finished, however, the main problem seems to be that PC doesn't change with the clock cycles, keeping the processor stuck on the first instruction.
I've actually been ripping my hair for weeks about this, because even though I've found some very helpful guides on how to put together the data path, I have been unable to find the source of the problem. To me it looks like I'm doing it the same way.
For example:
https://www.youtube.com/watch?v=Ngu1UbRAeqQ
and
https://www.cise.ufl.edu/~mssz/CompOrg/CDA-proc.html
Here is an image of the data path:
(I wasn't able to open this, so in case it doesnt work for you either I have also incuded it in the folder below)
_________________________________________________________________________________________________________________
Here is a jumpshare folder with the full file including all components in case you would like to open it (also contains the image of the datapath and test.asm):
http://jmp.sh/9yAiccw
__________________________________________________________________________________________________________________
Just in case here is the little mips code I'm using to test the processor:
.text
addi $a0,$0,4 # set $a0 to 4
addi $v0,$a0,2 # test addi, set $v0
add $v0,$v0,$a0 # start of counter. Should be 10
loop:
beq $v0,$a0,done # test, jump to done.
addi $v0,$v0,-3 # decrement. Loops twice.
beq $0,$0,loop # emulating an unconditional jump
done:
add $0,$0,$0 # NOP