Skip to content

Commit

Permalink
Add AxiStreamDmaV2FIFO python found in lcls2-pgp-pcie-apps
Browse files Browse the repository at this point in the history
  • Loading branch information
thatweaver committed Jan 16, 2025
1 parent 9ed25bf commit edb7ae4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions firmware/python/cameralink_gateway/_ClinkDevRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(self,
enableDump = False,
enableConfig = True,
pcieBoardType = None,
useDdr = False,
enVcMask = 0xD, # Enable lane mask: Don't connect data stream (VC1) by default because intended for C++ process
zmqSrvEn = True, # Flag to include the ZMQ server
**kwargs):
Expand Down Expand Up @@ -111,6 +112,7 @@ def __init__(self,
enLclsI = enLclsI,
enLclsII = enLclsII,
boardType = pcieBoardType,
useDdr = useDdr,
expand = True,
))

Expand Down
10 changes: 10 additions & 0 deletions firmware/python/cameralink_gateway/_ClinkPcieFpga.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import axipcie as pcie
import lcls2_pgp_fw_lib.shared as shared
import surf.axi as axi

class ClinkPcieFpga(pr.Device):
def __init__(self,
Expand All @@ -20,6 +21,7 @@ def __init__(self,
enLclsI = True,
enLclsII = False,
boardType = None,
useDdr = False,
**kwargs):
super().__init__(**kwargs)

Expand All @@ -31,6 +33,14 @@ def __init__(self,
expand = False,
))

if useDdr:
for i in range(4):
self.add(axi.AxiStreamDmaV2Fifo(
name = f'DmaBuffer[{i}]',
offset = 0x0010_0000+i*0x100,
expand = False,
))

# Application layer
self.add(shared.ApplicationLaneConfigDict(
offset = 0x00C0_0000,
Expand Down
7 changes: 7 additions & 0 deletions software/scripts/devGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ def __call__( self , parser, namespace,values, option_string = None):
help = "Sets the GUI type (PyDM or None)",
)

parser.add_argument(
"--ddr",
action = 'store_true',
help = "Includes on-board DDR support",
)

# Get the arguments
args = parser.parse_args()

Expand Down Expand Up @@ -219,6 +225,7 @@ def __call__( self , parser, namespace,values, option_string = None):
pgp4 = args.pgp4,
seuDumpDir = args.seuDumpDir,
pcieBoardType = args.pcieBoardType,
useDdr = args.ddr,
enVcMask = args.enVcMask,
) as root:

Expand Down

0 comments on commit edb7ae4

Please sign in to comment.