-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from slaclab/pre-release
v3.1.1 release candidate
- Loading branch information
Showing
9 changed files
with
447 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import rogue | ||
from collections import defaultdict | ||
|
||
def createAxiPcieMemMap(driverPath, host='localhost', port=8000): | ||
"""Provides BAR0 access to AxiPcieCore""" | ||
if driverPath != 'sim': | ||
return rogue.hardware.axi.AxiMemMap(driverPath) | ||
else: | ||
return rogue.interfaces.memory.TcpClient(host, port) | ||
|
||
def createAxiPcieDmaStreams(driverPath, streamMap, host='localhost', basePort=8000): | ||
"""Provides DMA stream access for AxiPcieCore""" | ||
d = defaultdict(dict) | ||
for lane, dests in streamMap.items(): | ||
for dest in dests: | ||
if driverPath != 'sim': | ||
d[lane][dest] = rogue.hardware.axi.AxiStreamDma(driverPath, (0x100*lane)|dest, True) | ||
else: | ||
d[lane][dest] = rogue.interfaces.stream.TcpClient(host, (basePort+2)+(512*lane)+2*dest) | ||
return d | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import axipcie as pcie | ||
|
||
import pyrogue as pr | ||
import rogue | ||
|
||
class AxiPcieRoot(pr.Root): | ||
def __init__(self, dev, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
memMap = rogue.hardware.axi.AxiMemMap(dev) | ||
|
||
self.add(pcie.AxiPcieCore( | ||
memBase = memMap, | ||
useBpi = True, | ||
useSpi = True)) |
Oops, something went wrong.