2015-02-22 17:39:51 -05:00
|
|
|
def main(wb):
|
|
|
|
wb.open()
|
|
|
|
regs = wb.regs
|
|
|
|
###
|
2015-03-03 04:29:28 -05:00
|
|
|
print("sysid : 0x{:04x}".format(regs.identifier_sysid.read()))
|
|
|
|
print("revision : 0x{:04x}".format(regs.identifier_revision.read()))
|
2015-03-04 17:13:14 -05:00
|
|
|
print("frequency : 0x{:04x}MHz".format(int(regs.identifier_frequency.read()/1000000)))
|
2015-02-22 17:39:51 -05:00
|
|
|
SRAM_BASE = 0x02000000
|
|
|
|
wb.write(SRAM_BASE, [i for i in range(64)])
|
|
|
|
print(wb.read(SRAM_BASE, 64))
|
|
|
|
###
|
|
|
|
wb.close()
|