:3 It's a pretty cool way of handling registers imo, but it also means you can't have input buffers.
I'm using a 9 tick dataloop so there shouldn't be any problems there though.
What isn't mentioned in the IS is the amount of time the operations will take. I'm going for a VERY fast regSel instruction which will hopefully be 3-5 ticks.
Here's the port mappings I've come up with:
I'm finding that the immediate port would be the best way to put imms in my dataloop. I could load imms like this using this setup:
(r=register, p=port, i=imm)
e.g. the imm port just takes what's normally used as the address immediate and sends it directly to the specified register.
(I did regSelect first, as it isn't dependent on the immediate loads. I'd recommend coding like this to take advantage of DIO 2's ability to execute different instructions simultaneously)
I had a spare port to mess with anyways, and I could still map a portWrite to a different location.
having a dedicated imm instruction would bloat my IS too much anyways. It is already getting pretty full.
(If I have space i may change this, as the portRead method with an imm is a double width instruction)
I'm using a 9 tick dataloop so there shouldn't be any problems there though.
What isn't mentioned in the IS is the amount of time the operations will take. I'm going for a VERY fast regSel instruction which will hopefully be 3-5 ticks.
Here's the port mappings I've come up with:
Code:
000: RAM
001: Stack
010: Pointers
011: immediate
100: Port 1
101: Port 2
110: Port 3
111: Port 4
I'm finding that the immediate port would be the best way to put imms in my dataloop. I could load imms like this using this setup:
(r=register, p=port, i=imm)
Code:
regSelect r000 r001
portRead p011 r000 i00000001
portRead p011 r001 i00000001
#loopStart
add r000
add r001
jump $loopStart
(I did regSelect first, as it isn't dependent on the immediate loads. I'd recommend coding like this to take advantage of DIO 2's ability to execute different instructions simultaneously)
I had a spare port to mess with anyways, and I could still map a portWrite to a different location.
having a dedicated imm instruction would bloat my IS too much anyways. It is already getting pretty full.
(If I have space i may change this, as the portRead method with an imm is a double width instruction)