Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions firmware/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export TARGET_DIRS = $(PWD)/targets/RoCEv2_1GbeRudpKcu105Examples \
$(PWD)/targets/RoCEv2_10GbeRudpKcu105Example \
$(PWD)/targets/RoCEv2_Rj45RudpKcu105Example \
$(PWD)/targets/Simple1GbeRudpKcu105Example \
$(PWD)/targets/Simple10GbeRudpKcu105Example \
$(PWD)/targets/SimpleRj45RudpKcu105Example

.PHONY: all build clean

# Default
all: build

# Check variables
test:
@echo TARGET_DIRS:
@echo -e "$(foreach ARG,$(TARGET_DIRS),\t$(ARG)\n)"

# Clean all firmware builds
clean:
for i in $(TARGET_DIRS); do \
cd $$i; make clean; \
done

# Build targets
build:
for i in $(TARGET_DIRS); do \
echo $$i; cd $$i; make clean; rm -rf images; make; \
done
28 changes: 28 additions & 0 deletions firmware/python/rocev2_10gbe_rudp_kcu105_example/_App.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#-----------------------------------------------------------------------------
# This file is part of the 'Simple-10GbE-RUDP-KCU105-Example'. 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 'Simple-10GbE-RUDP-KCU105-Example', including this file, may be
# copied, modified, propagated, or distributed except according to the terms
# contained in the LICENSE.txt file.
#-----------------------------------------------------------------------------

import simple_10gbe_rudp_kcu105_example as baseBoard
import rocev2_10gbe_rudp_kcu105_example as roceBoard

class App(baseBoard.App):
def __init__( self, dispatchBits=24, **kwargs):
super().__init__(**kwargs)

self.add(roceBoard.RoceDispatcher(
offset = 0x0002_0000,
dispatchBits = dispatchBits,
expand = False,
))

self.add(roceBoard.RoceChecker(
offset = 0x0003_0000,
dispatchBits = dispatchBits,
expand = False,
))
38 changes: 38 additions & 0 deletions firmware/python/rocev2_10gbe_rudp_kcu105_example/_RoceChecker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#-----------------------------------------------------------------------------
# This file is part of the 'Simple-10GbE-RUDP-KCU105-Example'. 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 'Simple-10GbE-RUDP-KCU105-Example', 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

class RoceChecker(pr.Device):
def __init__( self,
dispatchBits=24,
**kwargs):
super().__init__(**kwargs)

self.add(pr.RemoteVariable(
name = 'SuccessCounter',
offset = 0xF00,
bitSize = dispatchBits,
mode = 'RO',
))

self.add(pr.RemoteVariable(
name = 'UnsuccessCounter',
offset = 0xF04,
bitSize = dispatchBits,
mode = 'RO',
))

self.add(pr.RemoteVariable(
name = 'ResetCounters',
offset = 0xF08,
bitSize = 1,
mode = 'WO',
))
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#-----------------------------------------------------------------------------
# This file is part of the 'Simple-10GbE-RUDP-KCU105-Example'. 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 'Simple-10GbE-RUDP-KCU105-Example', 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

class RoceDispatcher(pr.Device):
def __init__( self,
dispatchBits=24,
**kwargs):
super().__init__(**kwargs)

self.add(pr.RemoteVariable(
name = 'StartDispatching',
offset = 0xF00,
bitSize = 1,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'DispatchCounter',
offset = 0xF00,
bitSize = dispatchBits,
bitOffset = 1,
disp = '{:d}',
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'Len',
offset = 0xF04,
bitSize = 32,
disp = '{:d}',
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'RKey',
offset = 0xF08,
bitSize = 32,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'LKey',
offset = 0xF0C,
bitSize = 32,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'SQpn',
offset = 0xF10,
bitSize = 24,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'DQpn',
offset = 0xF14,
bitSize = 24,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'RemAddr',
offset = 0xF18,
bitSize = 64,
mode = 'RW',
))

self.add(pr.RemoteVariable(
name = 'AddrWrapCount',
offset = 0xF20,
bitSize = 32,
mode = 'RW',
))
Loading