From fb5211fee393125a118d5ce4efc0e0a4d8967deb Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 17 Nov 2023 08:55:34 -0800 Subject: [PATCH] removing cameralink_gateway/_Application.py and using lcls2-pgp-fw-lib/_Application.py instead --- .../python/cameralink_gateway/_Application.py | 58 ------------------- .../cameralink_gateway/_ClinkPcieFpga.py | 3 +- .../python/cameralink_gateway/__init__.py | 1 - firmware/submodules/lcls2-pgp-fw-lib | 2 +- software/setup_env_slac.sh | 3 +- 5 files changed, 3 insertions(+), 64 deletions(-) delete mode 100644 firmware/python/cameralink_gateway/_Application.py diff --git a/firmware/python/cameralink_gateway/_Application.py b/firmware/python/cameralink_gateway/_Application.py deleted file mode 100644 index 9499f84..0000000 --- a/firmware/python/cameralink_gateway/_Application.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 -#----------------------------------------------------------------------------- -# This file is part of the 'Camera link gateway'. It is subject to -# the license terms in the LICENSE.txt file found in the top-level directory -# of this distribution and at: -# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -# No part of the 'Camera link gateway', including this file, may be -# copied, modified, propagated, or distributed except according to the terms -# contained in the LICENSE.txt file. -#----------------------------------------------------------------------------- - -import pyrogue as pr - -import surf.protocols.batcher as batcher - -class AppLane(pr.Device): - def __init__( self, - name = "AppLane", - description = "PCIe Application Lane Container", - **kwargs): - super().__init__(name=name, description=description, **kwargs) - - ####################################### - # SLAVE[INDEX=0][TDEST=0] = XPM Trigger - # SLAVE[INDEX=0][TDEST=1] = XPM Event Transition - # SLAVE[INDEX=1][TDEST=2] = Camera Image - # SLAVE[INDEX=2][TDEST=3] = XPM Timing - ####################################### - self.add(batcher.AxiStreamBatcherEventBuilder( - name = 'EventBuilder', - offset = 0x0_0000, - numberSlaves = 3, # Total number of slave indexes (not necessarily same as TDEST) - tickUnit = '156.25MHz', - expand = True, - )) - - self.add(pr.RemoteVariable( - name = 'XpmPauseThresh', - description = 'Threshold in unit of AXIS words (8 bytes per word). The XPM is 48byte message. So setting this register to 0x7 would NOT back pressure until there is two message in the pipeline', - offset = 0x1_0100, - bitSize = 9, - mode = 'RW', - )) - -class Application(pr.Device): - def __init__( self, - name = "Application", - description = "PCIe Lane Container", - laneConfig = {0: 'Opal1000'}, - **kwargs): - super().__init__(name=name, description=description, **kwargs) - - for i in laneConfig: - self.add(AppLane( - name = f'AppLane[{i}]', - offset = (i*0x0008_0000), - expand = True, - )) diff --git a/firmware/python/cameralink_gateway/_ClinkPcieFpga.py b/firmware/python/cameralink_gateway/_ClinkPcieFpga.py index eb06b27..dd3a957 100644 --- a/firmware/python/cameralink_gateway/_ClinkPcieFpga.py +++ b/firmware/python/cameralink_gateway/_ClinkPcieFpga.py @@ -11,7 +11,6 @@ import pyrogue as pr import axipcie as pcie -import cameralink_gateway as clDev import lcls2_pgp_fw_lib.shared as shared class ClinkPcieFpga(pr.Device): @@ -33,7 +32,7 @@ def __init__(self, )) # Application layer - self.add(clDev.Application( + self.add(shared.ApplicationLaneConfigDict( offset = 0x00C0_0000, laneConfig = laneConfig, expand = True, diff --git a/firmware/python/cameralink_gateway/__init__.py b/firmware/python/cameralink_gateway/__init__.py index 427f6f7..cc801e0 100644 --- a/firmware/python/cameralink_gateway/__init__.py +++ b/firmware/python/cameralink_gateway/__init__.py @@ -11,6 +11,5 @@ import os sys.path.append(os.path.dirname(os.path.realpath(__file__))) -from cameralink_gateway._Application import * from cameralink_gateway._ClinkPcieFpga import * from cameralink_gateway._ClinkDevRoot import * diff --git a/firmware/submodules/lcls2-pgp-fw-lib b/firmware/submodules/lcls2-pgp-fw-lib index 826f76e..9b29a8f 160000 --- a/firmware/submodules/lcls2-pgp-fw-lib +++ b/firmware/submodules/lcls2-pgp-fw-lib @@ -1 +1 @@ -Subproject commit 826f76e8cd5ad37a930f084cd5b13618f38607e5 +Subproject commit 9b29a8fce98b84a19010a8b0ed08987130a561db diff --git a/software/setup_env_slac.sh b/software/setup_env_slac.sh index 06e6022..eece82b 100644 --- a/software/setup_env_slac.sh +++ b/software/setup_env_slac.sh @@ -6,5 +6,4 @@ source /afs/slac.stanford.edu/g/reseng/vol31/anaconda/anaconda3/etc/profile.d/co ################################## # Activate Rogue conda Environment ################################## -conda activate rogue_v5.10.0 -#conda activate rogue_v5.18.4 +conda activate rogue_v5.18.4