Add evalutaion version for running in mars
This commit is contained in:
@@ -2,6 +2,7 @@ import random
|
||||
|
||||
total_count = random.randint(5, 50)
|
||||
# total_count = 20
|
||||
total_count = 47
|
||||
numbers = list()
|
||||
|
||||
for _ in range(total_count):
|
||||
@@ -30,12 +31,66 @@ for _ in range(total_count):
|
||||
# 0x969A,
|
||||
# ]
|
||||
|
||||
numbers = [
|
||||
0x022C,
|
||||
0x0AA4,
|
||||
0x0E87,
|
||||
0x0F95,
|
||||
0x124C,
|
||||
0x18D0,
|
||||
0x1A04,
|
||||
0x1C49,
|
||||
0x2137,
|
||||
0x2197,
|
||||
0x260B,
|
||||
0x2CC7,
|
||||
0x2E07,
|
||||
0x2F2B,
|
||||
0x3A27,
|
||||
0x3B9F,
|
||||
0x4227,
|
||||
0x4786,
|
||||
0x5E55,
|
||||
0x5F99,
|
||||
0x64CA,
|
||||
0x6E15,
|
||||
0x7345,
|
||||
0x76EE,
|
||||
0x7F32,
|
||||
0x8027,
|
||||
0x80BE,
|
||||
0x9213,
|
||||
0x9477,
|
||||
0x9776,
|
||||
0x9D7D,
|
||||
0x9F23,
|
||||
0xA5E5,
|
||||
0xAA22,
|
||||
0xAAF5,
|
||||
0xABB3,
|
||||
0xC308,
|
||||
0xC5A5,
|
||||
0xC8C3,
|
||||
0xC94D,
|
||||
0xD87C,
|
||||
0xD9CA,
|
||||
0xE060,
|
||||
0xE08B,
|
||||
0xE0D8,
|
||||
0xE996,
|
||||
0xF7FE,
|
||||
]
|
||||
|
||||
with open("gen_num.txt", "w") as fl:
|
||||
fl.writelines(["0x%04X\n" % x for x in numbers])
|
||||
|
||||
with open("gen_num_asm.txt", "w") as fl:
|
||||
fl.write(
|
||||
"""lui $s0, 0x4000\naddi $s0, $s0, 0x60\naddi $s1, $zero, %d\nsw $s1, 0($s0)\n"""
|
||||
% (total_count)
|
||||
)
|
||||
for idx, num in enumerate(numbers):
|
||||
fl.write("addi $s1, $zero, %s\nsw $s1, %d($s0)\n" % (hex(num), 4 * idx))
|
||||
fl.write("addi $s1, $zero, %s\nsw $s1, %d($s0)\n" % (hex(num), 4 * (idx + 1)))
|
||||
|
||||
with open("gen_num_data_mem.txt", "w") as fl:
|
||||
fl.write(
|
||||
|
||||
Reference in New Issue
Block a user