-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathreset_chip.py
More file actions
24 lines (20 loc) · 802 Bytes
/
reset_chip.py
File metadata and controls
24 lines (20 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Script to RESET a chip"""
import argparse
from nirram import NIRRAM
# Get arguments
parser = argparse.ArgumentParser(description="RESET a chip.")
parser.add_argument("chipname", help="chip name for logging")
parser.add_argument("--start-addr", type=int, default=0, help="start address")
parser.add_argument("--end-addr", type=int, default=65536, help="end address")
parser.add_argument("--step-addr", type=int, default=1, help="address stride")
args = parser.parse_args()
# Initialize NI system
nisys = NIRRAM(args.chipname)
nisys.settings["PINGPONG"]["VWL_RESET_START"] = 3
# Do operation across cells
for addr in range(args.start_addr, args.end_addr, args.step_addr):
nisys.set_addr(addr)
reset = nisys.dynamic_reset(1e5)
print(f"Address {addr}: {reset}")
# Shutdown
nisys.close()