Skip to content

Commit

Permalink
Merge pull request #18 from slaclab/fixWriterBug
Browse files Browse the repository at this point in the history
Fixed bug with writer cfg stream. Now set to channel 5. Fixed code in…
  • Loading branch information
dawoodalnajjar authored Mar 22, 2024
2 parents 92d8469 + a2d30f5 commit 97ad0cc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
14 changes: 8 additions & 6 deletions firmware/python/ePix320kM/_Root.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ def __init__( self,
self.zmqServer = pyrogue.interfaces.ZmqServer(root=self, addr='127.0.0.1', port=0)
self.addInterface(self.zmqServer)

# Create configuration stream
stream = pyrogue.interfaces.stream.Variable(root=self)

# Create StreamWriter with the configuration stream included as channel 1
self.dataWriter = pyrogue.utilities.fileio.StreamWriter(configStream={1: stream})
self.add(self.dataWriter)
#################################################################

# Create an empty list to be filled
Expand All @@ -101,7 +96,14 @@ def __init__( self,
self.unbatchers = [rogue.protocols.batcher.SplitterV1() for lane in range(self.numOfAsics)]
self.streamUnbatchers = [rogue.protocols.batcher.SplitterV1() for lane in range(self.numOfAsics)]
self._dbg = [dataDebug(name='DataDebug[{}]'.format(lane), size = DDebugSize) for lane in range(self.numOfAsics)]


# Create configuration stream
stream = pyrogue.interfaces.stream.Variable(root=self)

# Create StreamWriter with the configuration stream included as channel 1
self.dataWriter = pyrogue.utilities.fileio.StreamWriter(configStream={5: stream})
self.add(self.dataWriter)

# Check if not VCS simulation
if (not self.sim):

Expand Down
16 changes: 8 additions & 8 deletions software/notebook/fileReader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"pr.addLibraryPath( rootTopLevel )\n",
"import setupLibPaths\n",
"\n",
"import ePix320kM as fpgaBoard\n",
"\n",
"from dataDebug import dataDebug\n",
"\n",
Expand Down Expand Up @@ -73,12 +72,13 @@
"numOfAsics = 4\n",
"readerReceiver = [dataDebug(name = \"readerReceiver[{}]\".format(lane), size = 70000) for lane in range(numOfAsics)]\n",
"filter = [rogue.interfaces.stream.Filter(False, lane) for lane in range(numOfAsics)]\n",
"dataReceiverFilter = [rogue.interfaces.stream.Filter(False, 2) for lane in range(numOfAsics)]\n",
"# not sure what to do this yet\n",
"cfgFilter = rogue.interfaces.stream.Filter(False, 5)\n",
"fread = rogue.utilities.fileio.StreamReader()\n",
"readUnbatcher = [rogue.protocols.batcher.SplitterV1() for lane in range(numOfAsics)]\n",
"\n",
"for i in range(numOfAsics):\n",
" readerReceiver[i] << readUnbatcher[i] << filter[i] << fread\n",
" readerReceiver[i] << readUnbatcher[i] << filter[i]<< fread\n",
" readerReceiver[i].enableDataDebug(True)\n",
" readerReceiver[i].enableDebugPrint(True)\n",
" \n",
Expand Down Expand Up @@ -108,22 +108,22 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Extracted and descrambled 10000 frames\r"
"Extracted and descrambled 4 frames\r"
]
}
],
"source": [
"# Has good performance\n",
"\n",
"ssdPath = \"/u1/ePixHRM320k/measurements/20240306_source/\"\n",
"filename = f\"{ssdPath}/03062024_Fe55_50V_RX000_0.dat\"\n",
"ssdPath = \"/u1/ePixHRM320k/acquisition/\"\n",
"filename = f\"{ssdPath}/data_20240321_222413.dat\"\n",
"\n",
"readFromFile(filename)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 5,
"id": "9f45fa83",
"metadata": {},
"outputs": [
Expand All @@ -132,7 +132,7 @@
"output_type": "stream",
"text": [
"Read ASIC0 (192, 384, 0) Frames\n",
"Read ASIC1 (192, 384, 10000) Frames\n",
"Read ASIC1 (192, 384, 4) Frames\n",
"Read ASIC2 (192, 384, 0) Frames\n",
"Read ASIC3 (192, 384, 0) Frames\n"
]
Expand Down
8 changes: 0 additions & 8 deletions software/script/devGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@
help = "Sets the GUI type (PyDM or None)",
)

parser.add_argument(
"--serverPort",
type = int,
required = False,
default = 9099,
help = "Zeromq server port",
)

parser.add_argument(
"--justCtrl",
type = argBool,
Expand Down

0 comments on commit 97ad0cc

Please sign in to comment.