Compare commits
No commits in common. '1b26497e4cd61156532b3bf6f6190a6ccfbcae32' and '51d23a16307b7aa50a8e38d6094158468458d257' have entirely different histories.
1b26497e4c
...
51d23a1630
@ -1,20 +0,0 @@
|
|||||||
.data
|
|
||||||
my_data:
|
|
||||||
.word 0x11223344, 0x55667788, 0x9900aabb, 0xccddeeff
|
|
||||||
|
|
||||||
.text
|
|
||||||
main:
|
|
||||||
// load base address into t0
|
|
||||||
la t0, my_data
|
|
||||||
// begin loading words and printing them
|
|
||||||
lw a0, 0(t0)
|
|
||||||
print.uhex a0
|
|
||||||
lw a0, 4(t0)
|
|
||||||
print.uhex a0
|
|
||||||
lw a0, 8(t0)
|
|
||||||
print.uhex a0
|
|
||||||
lw a0, 12(t0)
|
|
||||||
print.uhex a0
|
|
||||||
// exit
|
|
||||||
li a7, 93
|
|
||||||
ecall
|
|
@ -1,19 +0,0 @@
|
|||||||
from .instruction_set import InstructionSet, Instruction
|
|
||||||
|
|
||||||
|
|
||||||
class RV_Debug(InstructionSet):
|
|
||||||
def instruction_print(self, ins: Instruction):
|
|
||||||
reg = ins.get_reg(0)
|
|
||||||
print("register {} contains value {}".format(reg, self.regs.get(reg)))
|
|
||||||
|
|
||||||
def instruction_print_uint(self, ins: Instruction):
|
|
||||||
reg = ins.get_reg(0)
|
|
||||||
print("register {} contains value {}".format(reg, self.regs.get(reg).unsigned_value))
|
|
||||||
|
|
||||||
def instruction_print_hex(self, ins: Instruction):
|
|
||||||
reg = ins.get_reg(0)
|
|
||||||
print("register {} contains value {}".format(reg, hex(self.regs.get(reg))))
|
|
||||||
|
|
||||||
def instruction_print_uhex(self, ins: Instruction):
|
|
||||||
reg = ins.get_reg(0)
|
|
||||||
print("register {} contains value {}".format(reg, hex(self.regs.get(reg).unsigned_value)))
|
|
Loading…
Reference in New Issue