From 3ea9a7561f7aef4a2ca591056eb5268d55cf23a5 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Tue, 1 Oct 2024 08:17:31 -0700 Subject: [PATCH 1/3] adding TxDisable to _Qsfp.py --- python/surf/devices/transceivers/_Qsfp.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/python/surf/devices/transceivers/_Qsfp.py b/python/surf/devices/transceivers/_Qsfp.py index 6ac1caf298..7b07959b99 100644 --- a/python/surf/devices/transceivers/_Qsfp.py +++ b/python/surf/devices/transceivers/_Qsfp.py @@ -124,6 +124,17 @@ def __init__(self,**kwargs): dependencies = [self.TxPwrRaw[2*i+0],self.TxPwrRaw[2*i+1]], )) + for i in range(4): + self.add(pr.RemoteVariable( + name = f'TxDisable[{i}]', + description = 'Tx_Disable bit that allows software disable of transmitters, Writing 1 disables the laser of the channel', + offset = (86 << 2), + bitSize = 1, + bitOffset = i, + mode = 'RW', + base = pr.Bool, + )) + ################ # Upper Page 00h ################ From 56ad103a25060a089807b8577a8af233edefe91e Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Tue, 1 Oct 2024 08:33:18 -0700 Subject: [PATCH 2/3] adding PowerOverride & PowerMode registers --- python/surf/devices/transceivers/_Qsfp.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/python/surf/devices/transceivers/_Qsfp.py b/python/surf/devices/transceivers/_Qsfp.py index 7b07959b99..d1cff17d72 100644 --- a/python/surf/devices/transceivers/_Qsfp.py +++ b/python/surf/devices/transceivers/_Qsfp.py @@ -135,6 +135,26 @@ def __init__(self,**kwargs): base = pr.Bool, )) + self.add(pr.RemoteVariable( + name = 'PowerOverride', + description = '1: allows setting power mode with hardware, 0: allows setting power mode with software', + offset = (93 << 2), + bitSize = 1, + bitOffset = 0, + mode = 'RW', + base = pr.Bool, + )) + + self.add(pr.RemoteVariable( + name = 'PowerMode', + description = 'Power set to low power mode: 1 sets to LP mode if PowerOverride is 0', + offset = (93 << 2), + bitSize = 1, + bitOffset = 1, + mode = 'RW', + base = pr.Bool, + )) + ################ # Upper Page 00h ################ From 8f30131ff7e75902093abcb187609466bb90d53f Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Wed, 2 Oct 2024 11:03:20 -0700 Subject: [PATCH 3/3] Fixed typo --- python/surf/devices/transceivers/_Qsfp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/surf/devices/transceivers/_Qsfp.py b/python/surf/devices/transceivers/_Qsfp.py index d1cff17d72..50f5cf6e39 100644 --- a/python/surf/devices/transceivers/_Qsfp.py +++ b/python/surf/devices/transceivers/_Qsfp.py @@ -137,7 +137,7 @@ def __init__(self,**kwargs): self.add(pr.RemoteVariable( name = 'PowerOverride', - description = '1: allows setting power mode with hardware, 0: allows setting power mode with software', + description = '0: allows setting power mode with hardware, 1: allows setting power mode with software', offset = (93 << 2), bitSize = 1, bitOffset = 0, @@ -147,7 +147,7 @@ def __init__(self,**kwargs): self.add(pr.RemoteVariable( name = 'PowerMode', - description = 'Power set to low power mode: 1 sets to LP mode if PowerOverride is 0', + description = 'Power set to low power mode: 1 sets to LP mode if PowerOverride is 1', offset = (93 << 2), bitSize = 1, bitOffset = 1,