forked from jersey99/10gbe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
31 lines (24 loc) · 873 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import time
from litex.tools.litex_client import RemoteClient
def main(args):
wb = RemoteClient()
wb.open()
# print('reset before: ', wb.regs.xgmii_reset.read())
# wb.regs.xgmii_reset.write(1)
# print('reset after: ', wb.regs.xgmii_reset.read())
# time.sleep(5)
# print('reset after: ', wb.regs.xgmii_reset.read())
# wb.regs.xgmii_reset.write(0)
# print('reset after: ', wb.regs.xgmii_reset.read())
print(f'pcs status: {hex(wb.regs.xgmii_pcs_status.read())}')
print('pcs reset: ', wb.regs.xgmii_pcs_config.write(1))
print(f'pcs status: {hex(wb.regs.xgmii_pcs_status.read())}')
for i in range(1):
print(wb.regs.f_sample_value.read()/1e6)
time.sleep(1)
wb.close()
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
args = parser.parse_args()
main(args)