class CryoChannels(pr.Device):
def __init__( self,
name = "CryoFrequencyBand",
description = "Note: This module is read-only with respect to sysgen",
hidden = False,
**kwargs):
super().__init__(name=name, description=description, hidden=hidden, **kwargs)
##############################
# Devices
##############################
for i in range(512):
self.add(CryoChannel(
name = (f'CryoChannel[{i}]'),
offset = (i*0x4),
hidden = (i % 16 != 0),
expand = False,
))
@self.command(description="Set all amplitudeScale values",value=0)
def SetAmplitudeScales(self, arg):
# Get a list of all variables with name amplitudeScale below this level
for var in self.find(recurse=True,type=pr.Variable,name="amplitudeScale"):
# Set value but don't synchronously write block
var.setDisp(sValue=arg,write=False)
# Commit blocks with bulk background writes
self.writeBlocks()
# Verify the blocks with background transactions
self.verifyBlocks()
# Check write and verify results
self.checkBlocks()
|