Skip to content

Commit

Permalink
Merge pull request #970 from slaclab/v4.11.11_rel
Browse files Browse the repository at this point in the history
Update aes-stream-driver to latest version
  • Loading branch information
ruck314 authored Sep 3, 2023
2 parents 66d8961 + 35ded07 commit 9b6a976
Show file tree
Hide file tree
Showing 5 changed files with 470 additions and 602 deletions.
157 changes: 3 additions & 154 deletions .github/workflows/rogue_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on: [push]
jobs:
full_build_test:
name: Full Build Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:

# This step checks out a copy of your repository.
Expand Down Expand Up @@ -90,31 +90,9 @@ jobs:
python -m compileall -f ./python/
#flake8 --count ./python/
# Code Coverage
- name: Code Coverage
run: |
source setup_rogue.sh
codecov
coverage report -m
# Generate Documentation
- name: Generate Documentation
if: github.ref == 'refs/heads/documentation'
run: |
source setup_rogue.sh
cd docs
make html
- name: Deploy Documentation
if: github.ref == 'refs/heads/documentation'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs/build/html

small_build_test:
name: Small Build Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:

# This step checks out a copy of your repository.
Expand All @@ -136,7 +114,7 @@ jobs:
gen_release:
name: Generate Release
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [full_build_test, small_build_test]
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down Expand Up @@ -168,132 +146,3 @@ jobs:
run: |
python ruckus/scripts/releaseGen.py
conda_build:
name: Anaconda Build
needs: [full_build_test, small_build_test]
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/pre-release'
strategy:
matrix:
os:
- ubuntu-latest
- macos-10.15
runs-on: ${{ matrix.os }}
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Setup anaconda
env:
OS_NAME: ${{ matrix.os }}
run: |
cd ${HOME}
if [ $OS_NAME == "macos-10.15" ]
then
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
bash miniconda.sh -b -p ${HOME}/miniconda
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda config --set always_yes yes
conda install conda-build anaconda-client conda-verify
if [ $OS_NAME == "macos-10.15" ]
then
conda install libiconv libarchive -c conda-forge
fi
conda update -q conda conda-build
conda update --all
- name: Setup MacOS
if: matrix.os == 'macos-10.15'
run: |
cd ${HOME}
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz
tar xzf MacOSX10.15.sdk.tar.xz
sudo mkdir -p /opt/
sudo mv MacOSX10.15.sdk /opt/
CONDA_BUILD_SYSROOT=/opt/MacOSX10.15.sdk
CONDA_BUILD=1
echo "CONDA_BUILD_SYSROOT=$CONDA_BUILD_SYSROOT" >> $GITHUB_ENV
echo "CONDA_BUILD=$CONDA_BUILD" >> $GITHUB_ENV
- name: Get Image Information
id: get_image_info
env:
CONDA_UPLOAD_TOKEN_DEV: ${{ secrets.CONDA_UPLOAD_TOKEN_DEV }}
CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }}
OS_NAME: ${{ matrix.os }}
run: |
if [ ${GITHUB_REF} == "refs/heads/pre-release" ]
then
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_DEV
else
echo ::set-output name=token::$CONDA_UPLOAD_TOKEN_TAG
fi
if [ ${OS_NAME} == "macos-10.15" ]
then
echo ::set-output name=os::osx-64
else
echo ::set-output name=os::linux-64
fi
- name: Build And Upload
run: |
export PATH="${HOME}/miniconda/bin:$PATH"
source ${HOME}/miniconda/etc/profile.d/conda.sh
conda build conda-recipe --debug --output-folder bld-dir -c tidair-packages -c conda-forge
anaconda -t ${{ steps.get_image_info.outputs.token }} upload --force bld-dir/${{ steps.get_image_info.outputs.os }}/*.tar.bz2
docker_build:
name: Docker Build
runs-on: ubuntu-latest
needs: [full_build_test, small_build_test]
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/pre-release'
steps:

# This step checks out a copy of your repository.
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get Image Information
id: get_image_info
run: |
echo ::set-output name=tag::`git describe --tags`
echo ::set-output name=branch::`echo ${GITHUB_REF} | awk 'BEGIN { FS = "/" } ; { print $3 }'`
if [ ${GITHUB_REF} == "refs/heads/pre-release" ]
then
echo ::set-output name=name::"rogue-dev"
else
echo ::set-output name=name::"rogue"
fi
# Setup docker build environment
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

# Login to Dockerhub
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: tidair
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Build and push the docker image
- name: Build and push image to Dockerhub
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: tidair/${{ steps.get_image_info.outputs.name }}:${{ steps.get_image_info.outputs.tag }}
build-args: branch=${{ steps.get_image_info.outputs.branch }}

37 changes: 18 additions & 19 deletions include/rogue/hardware/drivers/AxisDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Description:
* Definitions and inline functions for interacting with AXIS driver.
* ----------------------------------------------------------------------------
* This file is part of the aes_stream_drivers package. 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 aes_stream_drivers package, including this file, may be
* copied, modified, propagated, or distributed except according to the terms
* This file is part of the aes_stream_drivers package. 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 aes_stream_drivers package, including this file, may be
* copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
**/
#ifndef __ASIS_DRIVER_H__
#define __ASIS_DRIVER_H__
#include "DmaDriver.h"
Expand All @@ -25,36 +25,35 @@
#ifndef DMA_IN_KERNEL

// Set flags
//static constexpr inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t cont) {
// static constexpr inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t cont) {
// return ( ((cont & 0x1) << 16) | ((luser & 0xFF) << 8) | ((fuser & 0xFF) << 0) );
//}

static inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t cont) {
uint32_t flags;
uint32_t flags;

flags = fuser & 0xFF;
flags += (luser << 8) & 0xFF00;
flags += (cont << 16) & 0x10000;
return(flags);
flags = fuser & 0xFF;
flags += (luser << 8) & 0xFF00;
flags += (cont << 16) & 0x10000;
return (flags);
}

static inline uint32_t axisGetFuser(uint32_t flags) {
return(flags & 0xFF);
return (flags & 0xFF);
}

static inline uint32_t axisGetLuser(uint32_t flags) {
return((flags >> 8) & 0xFF);
return ((flags >> 8) & 0xFF);
}

static inline uint32_t axisGetCont(uint32_t flags) {
return((flags >> 16) & 0x1);
return ((flags >> 16) & 0x1);
}

// Read ACK
static inline void axisReadAck (int32_t fd) {
ioctl(fd,AXIS_Read_Ack,0);
static inline void axisReadAck(int32_t fd) {
ioctl(fd, AXIS_Read_Ack, 0);
}

#endif
#endif

Loading

0 comments on commit 9b6a976

Please sign in to comment.