Skip to content
Snippets Groups Projects
Commit dade1311 authored by Patrick Robbe's avatar Patrick Robbe
Browse files

Add per channel informations in the pll_status script

parent 682c3481
No related branches found
No related tags found
1 merge request!56links
......@@ -600,10 +600,10 @@ class Arria10(object):
status, val2 = mem.read( self.dev , 0x000500E0 )
return ( ( ( val1 & ( 0x1 << i ) ) >> i ) & ( ( val2 & ( 0x1 << i ) ) >> i ) )
def resynchronizeLink(self):
mem.write( self.dev , 0x00050100 , 0x0 )
mem.write( self.dev , 0x00050100 , 0x4 )
mem.write( self.dev , 0x00050100 , 0x0 )
def resynchronizeLink(self, i ):
mem.write( self.dev , 0x00050240 , 0x0 )
mem.write( self.dev , 0x00050240 , 0x1 << i )
mem.write( self.dev , 0x00050240 , 0x0 )
def resetTriggerCounter(self):
mem.write( self.dev , 0x00050100 , 0x0 )
......
......@@ -338,7 +338,7 @@ def draw_menu(stdscr, dev):
win6.box()
win6.addstr(1, 1, "F2: Program PLLs (source = FTSW), F3: Program PLLs (source = Osci.)", CYAN | curses.A_BOLD)
win6.addstr(2, 1, "F4: Clear LOS/OOF/LOL Flag, F5 : Hard reset, F6: Soft reset", CYAN | curses.A_BOLD)
win6.addstr(3, 1, "F8: Resynchronize b2link, F9: Reset trigger counter", CYAN | curses.A_BOLD)
win6.addstr(3, 1, "F7: Reset trigger counter, F8/F9/F10/F11: Resynchronize b2link 0/1/2/3", CYAN | curses.A_BOLD)
win6.refresh()
......@@ -425,26 +425,15 @@ def draw_menu(stdscr, dev):
win1.addstr(line, 1, "..... Done")
line = line + 1
win1.refresh()
elif k== curses.KEY_F7:
y_max, x_max = win1.getmaxyx()
win1.move(2, 1)
win1.clrtobot()
win1.box()
win1.addstr(2, 1, " Initializing INTR masks ", WHITE)
line = 3
col = 1
for i in plls.keys():
plls[i].init_mask_values()
win1.addstr(line, 1, devices[i])
masks = plls[i].read_mask_values()
for mask in sorted(masks.keys()):
win1.addstr(line, col, mask + " : " + str(masks[mask]))
line = line + 1
col = col + x_max / 3
line = 3
elif k== curses.KEY_F8:
fpga.resynchronizeLink()
elif k==curses.KEY_F9:
fpga.resynchronizeLink(0)
elif k== curses.KEY_F9:
fpga.resynchronizeLink(1)
elif k== curses.KEY_F10:
fpga.resynchronizeLink(2)
elif k== curses.KEY_F11:
fpga.resynchronizeLink(3)
elif k==curses.KEY_F7:
fpga.resetTriggerCounter()
# cursor_x = max (0, cursor_x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment