From 9821f1b69050fc428125e7f26e090533729c5e06 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Thu, 7 Sep 2023 09:52:40 -0700 Subject: [PATCH 01/18] Try to fix fixed-point get/set --- src/rogue/interfaces/memory/Block.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 9e12443ae..5e3a106e5 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -1824,7 +1824,8 @@ double rim::Block::getFixed(rim::Variable* var, int32_t index) { if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { fPoint = fPoint - (1 << var->valueBits_); } // Convert to float - tmp = (double)fPoint / pow(2, var->binPoint_); + tmp = (double)fPoint; + tmp = tmp / pow(2, var->binPoint_); return tmp; } From 0a3b4b8e3248acbb0c002a3f86c7f5d5df480b62 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Thu, 7 Sep 2023 09:53:44 -0700 Subject: [PATCH 02/18] Fix debug string --- src/rogue/protocols/packetizer/ControllerV2.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index ee680e2aa..3e8bbed63 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -235,7 +235,8 @@ void rpp::ControllerV2::transportRx(ris::FramePtr frame) { tranFrame_[tmpDest]->setLastUser(tmpLuser); transSof_[tmpDest] = true; tranCount_[tmpDest] = 0; - if (app_[tmpDest]) { app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } + if (app_[tmpDest]) { + app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } tranFrame_[tmpDest].reset(); // Detect SSI error @@ -259,6 +260,8 @@ void rpp::ControllerV2::applicationRx(ris::FramePtr frame, uint8_t tDest) { struct timeval currTime; struct timeval endTime; + log_->debug("Entered applicationRx()") + gettimeofday(&startTime, NULL); timeradd(&startTime, &timeout_, &endTime); @@ -358,7 +361,7 @@ void rpp::ControllerV2::applicationRx(ris::FramePtr frame, uint8_t tDest) { fUser, tDest, segment, - data[7], + data[7]>>7, lUser, data[size - 7], last); From e7a86db4cde0680c92baac3dcc8608173f9a3579 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Thu, 7 Sep 2023 09:55:43 -0700 Subject: [PATCH 03/18] Remove debug --- src/rogue/protocols/packetizer/ControllerV2.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index 3e8bbed63..84b4019af 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -260,8 +260,6 @@ void rpp::ControllerV2::applicationRx(ris::FramePtr frame, uint8_t tDest) { struct timeval currTime; struct timeval endTime; - log_->debug("Entered applicationRx()") - gettimeofday(&startTime, NULL); timeradd(&startTime, &timeout_, &endTime); From 9c952d5006ba387e7d58f94bcd6704f440c63fec Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Wed, 13 Sep 2023 12:17:39 -0700 Subject: [PATCH 04/18] Formatting --- python/pyrogue/_Variable.py | 19 +++- src/rogue/interfaces/memory/Variable.cpp | 109 ++++++++++++----------- 2 files changed, 72 insertions(+), 56 deletions(-) diff --git a/python/pyrogue/_Variable.py b/python/pyrogue/_Variable.py index 26983dde4..637806a9e 100644 --- a/python/pyrogue/_Variable.py +++ b/python/pyrogue/_Variable.py @@ -1042,9 +1042,22 @@ def __init__(self, *, listData = VariableListData(numValues,valueBits,valueStride) # Setup C++ Base class - rim.Variable.__init__(self,self._name,self._mode,self._minimum,self._maximum, - offset, bitOffset, bitSize, overlapEn, verify, - self._bulkOpEn, self._updateNotify, self._base, listData, retryCount) + rim.Variable.__init__( + self, + self._name, + self._mode, + self._minimum, + self._maximum, + offset, + bitOffset, + bitSize, + overlapEn, + verify, + self._bulkOpEn, + self._updateNotify, + self._base, + listData, + retryCount) ############################## diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index cfb92dc56..01934be9b 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -43,65 +43,68 @@ namespace bp = boost::python; #endif //! Class factory which returns a pointer to a Variable (VariablePtr) -rim::VariablePtr rim::Variable::create(std::string name, - std::string mode, - double minimum, - double maximum, - uint64_t offset, - std::vector bitOffset, - std::vector bitSize, - bool overlapEn, - bool verify, - bool bulkOpEn, - bool updateNotify, - uint32_t modelId, - bool byteReverse, - bool bitReverse, - uint32_t binPoint, - uint32_t numValues, - uint32_t valueBits, - uint32_t valueStride, - uint32_t retryCount) { - rim::VariablePtr v = std::make_shared(name, - mode, - minimum, - maximum, - offset, - bitOffset, - bitSize, - overlapEn, - verify, - bulkOpEn, - updateNotify, - modelId, - byteReverse, - bitReverse, - binPoint, - numValues, - valueBits, - valueStride, - retryCount); +rim::VariablePtr rim::Variable::create( + std::string name, + std::string mode, + double minimum, + double maximum, + uint64_t offset, + std::vector bitOffset, + std::vector bitSize, + bool overlapEn, + bool verify, + bool bulkOpEn, + bool updateNotify, + uint32_t modelId, + bool byteReverse, + bool bitReverse, + uint32_t binPoint, + uint32_t numValues, + uint32_t valueBits, + uint32_t valueStride, + uint32_t retryCount) { + rim::VariablePtr v = std::make_shared( + name, + mode, + minimum, + maximum, + offset, + bitOffset, + bitSize, + overlapEn, + verify, + bulkOpEn, + updateNotify, + modelId, + byteReverse, + bitReverse, + binPoint, + numValues, + valueBits, + valueStride, + retryCount); return (v); } // Setup class for use in python void rim::Variable::setup_python() { #ifndef NO_PYTHON - bp::class_("Variable", - bp::init()) + bp::class_( + "Variable", + bp::init()) .def("_varBytes", &rim::Variable::varBytes) .def("_offset", &rim::Variable::offset) .def("_shiftOffsetDown", &rim::Variable::shiftOffsetDown) From ee4a0abf66a09e9b8e751e18a7aa1b633ac22bb4 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Wed, 13 Sep 2023 12:17:51 -0700 Subject: [PATCH 05/18] Fix np array compare --- python/pyrogue/_Block.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/pyrogue/_Block.py b/python/pyrogue/_Block.py index 57720f163..cb167c233 100644 --- a/python/pyrogue/_Block.py +++ b/python/pyrogue/_Block.py @@ -12,10 +12,12 @@ # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- import threading +import numpy as np import pyrogue as pr import rogue.interfaces.memory as rim + def startTransaction(block, *, type, forceWr=False, checkEach=False, variable=None, index=-1, **kwargs): """ Helper function for calling the startTransaction function in a block. This helper @@ -228,10 +230,12 @@ def set(self, var, value, index=-1): """ with self._lock: - if index < 0 and (isinstance(value, list) or isinstance(value,dict)): + if index < 0 and (isinstance(value, list) or isinstance(value, dict)): changed = True elif index >= 0: changed = self._value[index] != value + elif isinstance(value, np.ndarray): + changed = np.array_equal(self._value, value) else: changed = self._value != value From 655649a83e6bcf96691e793b59cd199f8d17b972 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 19:39:08 -0700 Subject: [PATCH 06/18] Add rate test --- tests/test_rate.py | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index f761c2e6b..0701a211b 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -20,6 +20,14 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) +MinRate = { 'remoteSetRate' : 100000, + 'remoteSetNvRate' : 100000, + 'remoteGetRate' : 100000, + 'localSetRate' : 100000, + 'localGetRate' : 100000, + 'linkedSetRate' : 100000, + 'linkedGetRate' : 100000 } + class TestDev(pr.Device): def __init__(self,**kwargs): @@ -103,52 +111,55 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.set(i) - remoteSetRate = 1/((time.time()-stime) / count) + result['remoteSetRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestRemoteNoVerify.set(i) - remoteSetNvRate = 1/((time.time()-stime) / count) + result['remoteSetNvRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.get() - remoteGetRate = 1/((time.time()-stime) / count) + result['remoteGetRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.set(i) - localSetRate = 1/((time.time()-stime) / count) + result['localSetRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.get() - localGetRate = 1/((time.time()-stime) / count) + result['localGetRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestLink.set(i) - linkedSetRate = 1/((time.time()-stime) / count) + result['linkedSetRate'] = 1/((time.time()-stime) / count) stime = time.time() with root.updateGroup(): for i in range(count): root.TestDev.TestLink.get(i) - linkedGetRate = 1/((time.time()-stime) / count) + result['linkedGetRate'] = 1/((time.time()-stime) / count) + + passed = True + + for k,v in MinRate.items(): + + print(f"{k} target {v} result {result[k]}") - print(f"Remote Set Rate = {remoteSetRate:.0f}") - print(f"Remote Set Nv Rate = {remoteSetNvRate:.0f}") - print(f"Remote Get Rate = {remoteGetRate:.0f}") - print(f"Local Set Rate = {localSetRate:.0f}") - print(f"Local Get Rate = {localGetRate:.0f}") - print(f"Linked Set Rate = {linkedSetRate:.0f}") - print(f"Linked Get Rate = {linkedGetRate:.0f}") + if result[k] < v: + passed = False + if passed is False: + raise AssertionError('Rate check failed') if __name__ == "__main__": test_rate() From 5d388ff30d73a23b412dccc371ce50ee61ade688 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 19:43:05 -0700 Subject: [PATCH 07/18] Fix bug --- tests/test_rate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_rate.py b/tests/test_rate.py index 0701a211b..2830c89e4 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -106,6 +106,7 @@ def test_rate(): with DummyTree() as root: count = 100000 + result = {} stime = time.time() with root.updateGroup(): From 41ddae0ff967d6e0f82d13c19771476f438317dc Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 20:14:45 -0700 Subject: [PATCH 08/18] Update rate comparison --- tests/test_rate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index 2830c89e4..967f41bdd 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -20,13 +20,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MinRate = { 'remoteSetRate' : 100000, - 'remoteSetNvRate' : 100000, - 'remoteGetRate' : 100000, - 'localSetRate' : 100000, - 'localGetRate' : 100000, - 'linkedSetRate' : 100000, - 'linkedGetRate' : 100000 } +MinRate = { 'remoteSetRate' : 42000, + 'remoteSetNvRate' : 46000, + 'remoteGetRate' : 54000, + 'localSetRate' : 36000, + 'localGetRate' : 55000, + 'linkedSetRate' : 36000, + 'linkedGetRate' : 45000 } class TestDev(pr.Device): From 6774789a8033fdb7c6a62699dba5b0ab1276b7b9 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 20:57:35 -0700 Subject: [PATCH 09/18] Add cpu cycles counter --- pip_requirements.txt | 1 + tests/test_rate.py | 52 +++++++++++++++++++++++++++++--------------- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/pip_requirements.txt b/pip_requirements.txt index 1179b662b..e3f5afab4 100644 --- a/pip_requirements.txt +++ b/pip_requirements.txt @@ -19,3 +19,4 @@ gitpython pygithub pydm matplotlib +hwcounter diff --git a/tests/test_rate.py b/tests/test_rate.py index 967f41bdd..fdf809ec0 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -14,19 +14,20 @@ import pyrogue.interfaces.simulation import rogue.interfaces.memory import time +import hwcounter #rogue.Logging.setLevel(rogue.Logging.Debug) #import logging #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MinRate = { 'remoteSetRate' : 42000, - 'remoteSetNvRate' : 46000, - 'remoteGetRate' : 54000, - 'localSetRate' : 36000, - 'localGetRate' : 55000, - 'linkedSetRate' : 36000, - 'linkedGetRate' : 45000 } +MaxCycles = { 'remoteSetRate' : 42000, + 'remoteSetNvRate' : 46000, + 'remoteGetRate' : 54000, + 'localSetRate' : 36000, + 'localGetRate' : 55000, + 'linkedSetRate' : 36000, + 'linkedGetRate' : 45000 } class TestDev(pr.Device): @@ -106,57 +107,72 @@ def test_rate(): with DummyTree() as root: count = 100000 - result = {} + resultRate = {} + resultCycles = {} stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.set(i) - result['remoteSetRate'] = 1/((time.time()-stime) / count) + resultCycles['remoteSetRate'] = hwcounter.count_end() - scount + resultRate['remoteSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestRemoteNoVerify.set(i) - result['remoteSetNvRate'] = 1/((time.time()-stime) / count) + resultCycles['remoteSetNvRate'] = hwcounter.count_end() - scount + resultRate['remoteSetNvRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.get() - result['remoteGetRate'] = 1/((time.time()-stime) / count) + resultCycles['remoteGetRate'] = hwcounter.count_end() - scount + resultRate['remoteGetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.set(i) - result['localSetRate'] = 1/((time.time()-stime) / count) + resultCycles['localSetRate'] = hwcounter.count_end() - scount + resultRate['localSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.get() - result['localGetRate'] = 1/((time.time()-stime) / count) + resultCycles['localGetRate'] = hwcounter.count_end() - scount + resultRate['localGetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestLink.set(i) - result['linkedSetRate'] = 1/((time.time()-stime) / count) + resultCycles['linkedSetRate'] = hwcounter.count_end() - scount + resultRate['linkedSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() + scount = hwcounter.count() with root.updateGroup(): for i in range(count): root.TestDev.TestLink.get(i) - result['linkedGetRate'] = 1/((time.time()-stime) / count) + resultCycles['linkedGetRate'] = hwcounter.count_end() - scount + resultRate['linkedGetRate'] = int(1/((time.time()-stime) / count)) passed = True - for k,v in MinRate.items(): + for k,v in MaxCycles.items(): - print(f"{k} target {v} result {result[k]}") + print(f"{k} cyles {resultCycles[k]}, maximum {v}, rate {resultRate[k]}") - if result[k] < v: + if resultCycles[k] > v: passed = False if passed is False: From 57eeb339e289972390b5b39e0db25f5ed2506ccc Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 21:05:53 -0700 Subject: [PATCH 10/18] Show rate as float --- tests/test_rate.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index fdf809ec0..6e6c110bb 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -21,13 +21,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MaxCycles = { 'remoteSetRate' : 42000, - 'remoteSetNvRate' : 46000, - 'remoteGetRate' : 54000, - 'localSetRate' : 36000, - 'localGetRate' : 55000, - 'linkedSetRate' : 36000, - 'linkedGetRate' : 45000 } +MaxCycles = { 'remoteSetRate' : 4.2e4, + 'remoteSetNvRate' : 4.6e4, + 'remoteGetRate' : 5.4e4, + 'localSetRate' : 3.6e4, + 'localGetRate' : 5.5e4, + 'linkedSetRate' : 3.6e4, + 'linkedGetRate' : 4.5e4 } class TestDev(pr.Device): @@ -115,7 +115,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.set(i) - resultCycles['remoteSetRate'] = hwcounter.count_end() - scount + resultCycles['remoteSetRate'] = float(hwcounter.count_end() - scount) resultRate['remoteSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -123,7 +123,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestRemoteNoVerify.set(i) - resultCycles['remoteSetNvRate'] = hwcounter.count_end() - scount + resultCycles['remoteSetNvRate'] = float(hwcounter.count_end() - scount) resultRate['remoteSetNvRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -131,7 +131,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestRemote.get() - resultCycles['remoteGetRate'] = hwcounter.count_end() - scount + resultCycles['remoteGetRate'] = float(hwcounter.count_end() - scount) resultRate['remoteGetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -139,7 +139,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.set(i) - resultCycles['localSetRate'] = hwcounter.count_end() - scount + resultCycles['localSetRate'] = float(hwcounter.count_end() - scount) resultRate['localSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -147,7 +147,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestLocal.get() - resultCycles['localGetRate'] = hwcounter.count_end() - scount + resultCycles['localGetRate'] = float(hwcounter.count_end() - scount) resultRate['localGetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -155,7 +155,7 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestLink.set(i) - resultCycles['linkedSetRate'] = hwcounter.count_end() - scount + resultCycles['linkedSetRate'] = float(hwcounter.count_end() - scount) resultRate['linkedSetRate'] = int(1/((time.time()-stime) / count)) stime = time.time() @@ -163,14 +163,14 @@ def test_rate(): with root.updateGroup(): for i in range(count): root.TestDev.TestLink.get(i) - resultCycles['linkedGetRate'] = hwcounter.count_end() - scount + resultCycles['linkedGetRate'] = float(hwcounter.count_end() - scount) resultRate['linkedGetRate'] = int(1/((time.time()-stime) / count)) passed = True for k,v in MaxCycles.items(): - print(f"{k} cyles {resultCycles[k]}, maximum {v}, rate {resultRate[k]}") + print(f"{k} cyles {resultCycles[k]:.2e}, maximum {v:.2e}, rate {resultRate[k]}") if resultCycles[k] > v: passed = False From 335289cf76929d247b7abc9e06f4b8343db59dac Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 21:15:56 -0700 Subject: [PATCH 11/18] Update max cycles --- tests/test_rate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index 6e6c110bb..f46130301 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -21,13 +21,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MaxCycles = { 'remoteSetRate' : 4.2e4, - 'remoteSetNvRate' : 4.6e4, - 'remoteGetRate' : 5.4e4, - 'localSetRate' : 3.6e4, - 'localGetRate' : 5.5e4, - 'linkedSetRate' : 3.6e4, - 'linkedGetRate' : 4.5e4 } +MaxCycles = { 'remoteSetRate' : 5.0e9, + 'remoteSetNvRate' : 4.5e9, + 'remoteGetRate' : 4.0e9, + 'localSetRate' : 5.9e9, + 'localGetRate' : 3.8e9, + 'linkedSetRate' : 6.0e9, + 'linkedGetRate' : 4.8e9 } class TestDev(pr.Device): From 2d15f59f8ce4e79895cc5d5e80a2dbf390ad531b Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 21:59:31 -0700 Subject: [PATCH 12/18] Add warning --- python/pyrogue/_DataReceiver.py | 1 - python/pyrogue/_Variable.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index a671d7202..d7af352ca 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -54,7 +54,6 @@ def __init__(self, self.add(pr.LocalVariable(name='Data', typeStr=typeStr, - disp='', value=value, hidden=hideData, description='Data Frame Container')) diff --git a/python/pyrogue/_Variable.py b/python/pyrogue/_Variable.py index 637806a9e..06ea016c9 100644 --- a/python/pyrogue/_Variable.py +++ b/python/pyrogue/_Variable.py @@ -814,10 +814,14 @@ def _setDict(self,d,writeEach,modes,incGroups,excGroups,keys): for val,i in zip(s,idxSlice): self.setDisp(val.strip(), write=writeEach, index=i) + else: + self._log.warning(f"Skipping set for Entry {self.name} with mode {self._mode}. Enabled Modes={modes}.") # Standard set elif self._mode in modes: self.setDisp(d,writeEach) + else: + self._log.warning(f"Skipping set for Entry {self.name} with mode {self._mode}. Enabled Modes={modes}.") def _getDict(self, modes=['RW', 'RO', 'WO'], incGroups=None, excGroups=None, properties=False): """ From 63f4cf2d63a120c85504da51f08566bba2dfbb0b Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 22:01:29 -0700 Subject: [PATCH 13/18] Fix incorrect compare --- tests/test_rate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index f46130301..ec11bcc1f 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -21,13 +21,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MaxCycles = { 'remoteSetRate' : 5.0e9, - 'remoteSetNvRate' : 4.5e9, - 'remoteGetRate' : 4.0e9, - 'localSetRate' : 5.9e9, - 'localGetRate' : 3.8e9, - 'linkedSetRate' : 6.0e9, - 'linkedGetRate' : 4.8e9 } +MaxCycles = { 'remoteSetRate' : 5.9e9, + 'remoteSetNvRate' : 5.5e9, + 'remoteGetRate' : 4.8e9, + 'localSetRate' : 6.8e9, + 'localGetRate' : 4.6e9, + 'linkedSetRate' : 6.9e9, + 'linkedGetRate' : 5.5e9 } class TestDev(pr.Device): From 893669b2c1ba48b98166319bdb6f11ca4b258204 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 22:19:04 -0700 Subject: [PATCH 14/18] Update workflow to avoid deprecated set-output command --- .github/workflows/rogue_ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rogue_ci.yml b/.github/workflows/rogue_ci.yml index be54ad1b6..81487af53 100644 --- a/.github/workflows/rogue_ci.yml +++ b/.github/workflows/rogue_ci.yml @@ -140,7 +140,7 @@ jobs: - name: Get Image Information id: get_image_info run: | - echo ::set-output name=tag::`git describe --tags` + echo tag=`git describe --tags` >> ${GITHUB_OUTPUT} - name: Get Ruckus run: | @@ -192,8 +192,7 @@ jobs: env: CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }} run: | - echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_TAG - echo ::set-output name=os::linux-64 + echo token=${CONDA_UPLOAD_TOKEN_TAG} >> ${GITHUB_OUTPUT} - name: Build run: | @@ -222,8 +221,8 @@ jobs: - name: Get Image Information id: get_image_info run: | - echo ::set-output name=tag::`git describe --tags` - echo ::set-output name=branch::`echo ${GITHUB_REF} | awk 'BEGIN { FS = "/" } ; { print $3 }'` + echo tag=`git describe --tags` >> ${GITHUB_OUTPUT} + echo branch=`echo ${GITHUB_REF} | awk 'BEGIN { FS = "/" } ; { print $3 }'` >> ${GITHUB_OUTPUT} # Setup docker build environment - name: Set up Docker Buildx From b6b068e60aeca3cffc2ea9b69d74037c562ca3f7 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 22:23:00 -0700 Subject: [PATCH 15/18] Update rates --- tests/test_rate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index ec11bcc1f..07ddc043f 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -21,13 +21,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MaxCycles = { 'remoteSetRate' : 5.9e9, - 'remoteSetNvRate' : 5.5e9, - 'remoteGetRate' : 4.8e9, - 'localSetRate' : 6.8e9, - 'localGetRate' : 4.6e9, - 'linkedSetRate' : 6.9e9, - 'linkedGetRate' : 5.5e9 } +MaxCycles = { 'remoteSetRate' : 6.5e9, + 'remoteSetNvRate' : 5.8e9, + 'remoteGetRate' : 5.0e9, + 'localSetRate' : 7.0e9, + 'localGetRate' : 4.8e9, + 'linkedSetRate' : 7.2e9, + 'linkedGetRate' : 6.5e9 } class TestDev(pr.Device): From 07fca5db5658db87eef206112e4ef4171de74c0c Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Tue, 19 Sep 2023 22:37:35 -0700 Subject: [PATCH 16/18] Update rates --- tests/test_rate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_rate.py b/tests/test_rate.py index 07ddc043f..ffbb00a97 100644 --- a/tests/test_rate.py +++ b/tests/test_rate.py @@ -21,13 +21,13 @@ #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) -MaxCycles = { 'remoteSetRate' : 6.5e9, - 'remoteSetNvRate' : 5.8e9, - 'remoteGetRate' : 5.0e9, - 'localSetRate' : 7.0e9, - 'localGetRate' : 4.8e9, - 'linkedSetRate' : 7.2e9, - 'linkedGetRate' : 6.5e9 } +MaxCycles = { 'remoteSetRate' : 8.0e9, + 'remoteSetNvRate' : 7.0e9, + 'remoteGetRate' : 6.0e9, + 'localSetRate' : 8.0e9, + 'localGetRate' : 6.0e9, + 'linkedSetRate' : 9.0e9, + 'linkedGetRate' : 8.0e9 } class TestDev(pr.Device): From f306e71d37b662b15abd399e23e0995f7361ad11 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 20 Sep 2023 12:04:43 -0700 Subject: [PATCH 17/18] Fix bug --- python/pyrogue/_DataReceiver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index d7af352ca..8740d769a 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -54,6 +54,8 @@ def __init__(self, self.add(pr.LocalVariable(name='Data', typeStr=typeStr, + disp='', + groups=['NoState'], value=value, hidden=hideData, description='Data Frame Container')) From d782772f23ab7a84aa302b64624603be1b6c5128 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 20 Sep 2023 12:40:42 -0700 Subject: [PATCH 18/18] Update --- python/pyrogue/_DataReceiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index 8740d769a..39e284e2b 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -55,7 +55,7 @@ def __init__(self, self.add(pr.LocalVariable(name='Data', typeStr=typeStr, disp='', - groups=['NoState'], + groups=['NoState','NoStream'], value=value, hidden=hideData, description='Data Frame Container'))