Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
9b936c4
chore: move files to new locations.
bleykauf Jun 2, 2022
6440614
chore: make linien-common installable
bleykauf Jun 2, 2022
61e6a94
chore: make client installable
bleykauf Jun 2, 2022
69d594b
chore: fpga image can be built
bleykauf Jun 2, 2022
ff8a71c
fix: failed import
bleykauf Jun 2, 2022
f5475f9
fix: copy linien.bin to the correct location
bleykauf Jun 2, 2022
8959375
chore: make linien-gui installable
bleykauf Jun 2, 2022
1d081b7
chore: flatten package structure
bleykauf Jun 2, 2022
c5002a6
fix: import errors
bleykauf Jun 2, 2022
9f76cd1
fix: remove import of linien
bleykauf Jun 2, 2022
f0d26ad
chore: make linien-server installable
bleykauf Jun 3, 2022
67f0b1c
chore: suppress warning F401 for unused __version__
bleykauf Jun 9, 2022
f647d39
fix: add linien-common requirements
bleykauf Jun 9, 2022
ba52da8
fix: package name is linien-common
bleykauf Jun 9, 2022
e497363
fix: add to namespace package
bleykauf Jun 9, 2022
d7cfbcb
fix: add file extension to shell script call
bleykauf Jun 9, 2022
2b2a610
fix: register as script in
bleykauf Jun 9, 2022
f0b8a49
fix: remove pth variable from startup script
bleykauf Jun 9, 2022
40c2ece
fix: remove python3 from setup.py call
bleykauf Jun 9, 2022
de839cc
feat: flatten package hierarchy
bleykauf Jun 9, 2022
6ea7d71
fix: version number imports
bleykauf Jun 9, 2022
7b58f8a
fix: relative imports
bleykauf Jun 9, 2022
07ea5f3
fix: file path for linien.bin
bleykauf Jun 9, 2022
1b32ac8
fix: apply isort
bleykauf Jun 9, 2022
e6a00aa
fix: file path for csrmap
bleykauf Jun 20, 2022
f5b8336
feat: use pathlib
bleykauf Jun 20, 2022
5ae1ac3
feat: copy linien.bin with bin2bin
bleykauf Jun 20, 2022
9088d0e
chore: move fpga build scripts to gateware directory
bleykauf Jun 20, 2022
f549c0d
remove sys.path manipulation
bleykauf Jun 20, 2022
04e5adb
chore: update gitignore
bleykauf Jun 20, 2022
65bfde1
chore: update upload script
bleykauf Jun 20, 2022
9a7466b
remove check for VERSION
bleykauf Jun 20, 2022
23aea2d
change fpga build directory
bleykauf Jun 20, 2022
36ad167
fix: relative path
bleykauf Jun 20, 2022
e09e6e4
chore: suppress warning
bleykauf Jun 20, 2022
73a50c8
update pyinstall.spec
bleykauf Jun 20, 2022
b530562
fix: relative imports in gui
bleykauf Jun 20, 2022
12012e0
fix: change gui module name
bleykauf Jun 20, 2022
05751cc
fix: another import
bleykauf Jun 20, 2022
7965fec
fix: linux standalone can be built
bleykauf Jun 21, 2022
7eb4901
turn ui_path into a constant
bleykauf Jun 21, 2022
b5d37e8
fix: remove unneccesary path manipulation
bleykauf Jun 21, 2022
2ff93aa
fix: missing imports
bleykauf Jun 21, 2022
148d8a5
fix: add missing import
bleykauf Jun 21, 2022
58e5ad1
chore: remove unneccesary stuff for windows standalone
bleykauf Jun 21, 2022
77b4ba4
fix: update development requirements
bleykauf Jun 21, 2022
6534a96
chore: remove unneccesary build script
bleykauf Jun 21, 2022
fbc6c67
fix: relative imports for pytest imports
bleykauf Jun 21, 2022
d76b1f8
update pyinstaller
bleykauf Jun 21, 2022
79478df
use find_packages
bleykauf Jun 21, 2022
091fe5f
use find_packages
bleykauf Jun 21, 2022
317840f
use modern strings
bleykauf Jun 21, 2022
22922c3
update version
bleykauf Jun 21, 2022
81a5d08
fix: path to version
bleykauf Jun 21, 2022
029fb3a
simplify start and stop scripts for server
bleykauf Jun 21, 2022
800c574
simplify version string extraction
bleykauf Jun 21, 2022
af248bb
fix: version path
bleykauf Jun 21, 2022
1fb4f11
use pip for remote dev installation
bleykauf Jun 21, 2022
edaedb8
fix: remote path
bleykauf Jun 21, 2022
75b4f79
move peak_voltage_to_dBm
bleykauf Jun 22, 2022
0f107e3
fix: remove scripts from installer
bleykauf Jun 22, 2022
1e0f594
fix: deployment for dev version
bleykauf Jun 22, 2022
e14d766
update requirements
bleykauf Jun 22, 2022
9b73506
remove namespace import
bleykauf Jun 22, 2022
b42f532
remove subclassing of LinienClient
bleykauf Jun 22, 2022
9fdef3d
remove RawRPYClient
bleykauf Jun 22, 2022
8dd5b22
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2022
af5ce9b
fix imports and formatting
bleykauf Oct 9, 2022
f9fac08
deploy server with fabric, remove paramiko
bleykauf Oct 9, 2022
b1cccac
Merge branch 'feature/packaging-refactor' of https://github.com/linie…
bleykauf Oct 9, 2022
f40f7e2
remove uuid dependency
bleykauf Oct 9, 2022
5eb0eb5
use setuptools-scm (server installation broken)
bleykauf Oct 9, 2022
ba600d6
copy .git folder as well, remove unneccesary uninstall
bleykauf Oct 11, 2022
14e4022
Merge pull request #292 from linien-org/feature/use-setuptools-scm
bleykauf Oct 11, 2022
d331cc5
Merge branch 'develop' into feature/packaging-refactor
bleykauf Oct 11, 2022
41c1043
simplify pyinstaller.spec
bleykauf Oct 11, 2022
7ba3159
update pyinstaller-windows workflow
bleykauf Oct 11, 2022
cdb749f
change workflow file name
bleykauf Oct 11, 2022
d542f67
update pyinstaller windows workflow
bleykauf Oct 11, 2022
b882e82
add setuptools_scm as install_requirement for linien-common
bleykauf Oct 11, 2022
789fbe6
rewrite pyinstaller windows action
bleykauf Oct 11, 2022
dfc95ad
fix upload artifact
bleykauf Oct 11, 2022
80549e6
remove requirements.txt installation
bleykauf Oct 11, 2022
e90ba8b
add updated pyinstaller workflow for linux
bleykauf Oct 11, 2022
62e732e
add qt5-default to workflow
bleykauf Oct 11, 2022
5035048
set QT_DEBUG_PLUGINS
bleykauf Oct 11, 2022
94a0659
add libxcb-xinerama0
bleykauf Oct 11, 2022
579ca88
add more possible dependenceis
bleykauf Oct 11, 2022
dc1a7f0
set display env variable
bleykauf Oct 11, 2022
3bc03e9
set fetch-depth to 0 for setuptools_scm to work
bleykauf Oct 11, 2022
cc6353e
remove deployment of development version
bleykauf Nov 2, 2022
b68aa25
prepare for pyrp3 being a pypi package
bleykauf Nov 2, 2022
c0b1eb0
fix line breaks in dialog strings
bleykauf Nov 2, 2022
0393169
fix line length
bleykauf Nov 2, 2022
858f8e3
improve function names and remove special treatment of dev versions
bleykauf Nov 2, 2022
003749a
improve signal names
bleykauf Dec 22, 2022
71c3abf
split off connection thread
bleykauf Dec 22, 2022
6fd5fa9
split up installation and starting
bleykauf Dec 22, 2022
e958c09
remove unneccesary local variable
bleykauf Dec 22, 2022
dcc1988
create installation procedure from gui
bleykauf Dec 22, 2022
a0bd6f9
rename function
bleykauf Dec 22, 2022
5711acd
fix missing imports
bleykauf Dec 22, 2022
acf203e
remove outdated requirements.txt files
bleykauf Jan 25, 2023
636d0eb
update pre-commit hooks
bleykauf Jan 25, 2023
f8dcc8f
simplify dependencies
bleykauf Jan 25, 2023
de0b9fd
fix dependencies
bleykauf Jan 25, 2023
b448dcb
fix entrypoint
bleykauf Jan 25, 2023
55ff2e0
turn server.py into console command
bleykauf Jan 25, 2023
811b164
simplify version string in setup
bleykauf Feb 8, 2023
b105201
Revert "simplify version string in setup"
bleykauf Feb 8, 2023
8213d60
simplify version string in setup.py
bleykauf Feb 8, 2023
efaf881
fix field name
bleykauf Feb 8, 2023
92ea25d
fix arguments and return values of progress widget
bleykauf Feb 8, 2023
9a82248
remove comparison of git hashes and dirty tags
bleykauf Feb 8, 2023
b9ff0d5
fix installation progress widget
bleykauf Feb 8, 2023
5cf7fe2
install pyrp3 via github
bleykauf Feb 8, 2023
8a71dd7
add real installation commands with hard-coded version of linien-server
bleykauf Feb 8, 2023
21eb7d2
make linien-server version dynamic
bleykauf Feb 8, 2023
654487e
do not check matching dev versions
bleykauf Feb 21, 2023
ddb754d
update pre-commit hooks
bleykauf Feb 21, 2023
1ddd20c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2023
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
47 changes: 47 additions & 0 deletions .github/workflows/pyinstaller-linux2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pyinstaller Linux (new)

on:
workflow_dispatch:

env:
QT_DEBUG_PLUGINS: 1
DISPLAY: ":99"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"

- name: Install dependencies
run: sudo apt-get install -y qt5-default qttools5-dev-tools binutils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

- run: pip install pyinstaller

- name: Install linien-common
working-directory: linien-common
run: pip install .

- name: Install linien-client
working-directory: linien-client
run: pip install .

- name: Install linien-gui
working-directory: linien-gui
run: pip install .

- run: pyinstaller pyinstaller.spec
working-directory: linien-gui

- uses: actions/upload-artifact@v3
with:
name: linien-gui-linux
path: linien-gui/dist/*
33 changes: 10 additions & 23 deletions .github/workflows/pyinstaller-windows.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,30 @@
name: Pyinstaller Windows

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version_name:
description: "Version name"
required: true

env:
INPUT_VERSION_NAME: ${{ github.event.inputs.version_name }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: create VERSION file
run: echo "$INPUT_VERSION_NAME" > linien/VERSION

# NOTE: we hardcode the version of requirements here because the new pip
# resolver otherwise takes ages
# ANOTHER NOTE: scipy is fixed to 1.4.1 because of problems with pyinstaller
- name: create requirements file
run: cp requirements_gui.txt requirements.txt
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: PyInstaller Windows
uses: JackMcKew/pyinstaller-action-windows@main
with:
path: .
path: linien-gui

- uses: actions/upload-artifact@v2
with:
name: my-exe
path: dist/windows
path: linien-gui/dist/windows
40 changes: 40 additions & 0 deletions .github/workflows/pyinstaller-windows2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Pyinstaller Windows (new)

on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"

- run: pip install pyinstaller

- name: Install linien-common
working-directory: linien-common
run: pip install .

- name: Install linien-client
working-directory: linien-client
run: pip install .

- name: Install linien-gui
working-directory: linien-gui
run: pip install .

- run: pyinstaller pyinstaller.spec
working-directory: linien-gui

- uses: actions/upload-artifact@v3
with:
name: linien-gui-windows
path: linien-gui/dist/*
25 changes: 23 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ __pycache__
/*.v
/dist
.eggs
linien-*

.mypy_cache
.vscode
Expand All @@ -23,4 +22,26 @@ VERSION

# results of pytest-html
tests/*.html
tests/assets/*
tests/assets/*

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

**/_version.py
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
language_version: python3.7
exclude: ^(gateware/logic/|gateware/lowlevel/|linien/server/csrmap.py)

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ Then, you should start the Linien server on your RedPitaya. This can be done by

Once the server is up and running, you can connect using python:
```python
from linien.client.connection import LinienClient, MHz, Vpp
from linien_client.connection import LinienClient
from linien_common.common import MHz, Vpp
c = LinienClient(
{'host': 'rp-XXXXXX.local', 'username': 'root', 'password': 'change-it-to-something-else!'},
# starts the server if it is not running
Expand Down Expand Up @@ -288,8 +289,8 @@ The script below shows an example of how to run the autolock using the scripting
import pickle
import numpy as np

from linien.client.connection import LinienClient
from linien.common import FAST_AUTOLOCK
from linien_client.connection import LinienClient
from linien_common.common import FAST_AUTOLOCK

from matplotlib import pyplot as plt
from time import sleep
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions scripts/build_fpga_image.sh → gateware/build_fpga_image.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ fi

export PATH=$VIVADOPATH:$PATH

python3 scripts/fpga_image_helper.py

rm linien/server/linien.bin -f
cp fpga_build/linien.bin linien/server
rm linien-server/linien_server/linien.bin -f
python3 gateware/fpga_image_helper.py
28 changes: 14 additions & 14 deletions scripts/fpga_image_helper.py → gateware/fpga_image_helper.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@

# this file compiles the FPGA image. You shouldn't call it directly though but
# use `build_fpga_image.sh`
import os
import sys
from pathlib import Path

LINIEN_FOLDER = "/".join(os.path.abspath(__file__).split("/")[:-2])


os.chdir(LINIEN_FOLDER)
sys.path.append(LINIEN_FOLDER)
REPO_ROOT_DIR = Path(__file__).resolve().parents[1]

from bit2bin import bit2bin

from gateware.linien import RootModule
from gateware.platform import Platform
from hw_platform import Platform
from linien_module import RootModule


def py_csrconstants(map, fil):
Expand Down Expand Up @@ -66,14 +60,20 @@ def py_csrmap(it, fil):
platform = Platform()
root = RootModule(platform)

with open("linien/server/csrmap.py", "w") as fil:
with open(
REPO_ROOT_DIR / "linien-server" / "linien_server" / "csrmap.py", "w"
) as fil:
py_csrconstants(root.linien.csrbanks.constants, fil)
csr = get_csrmap(root.linien.csrbanks.banks)
py_csrmap(csr, fil)
fil.write("states = {}\n".format(repr(root.linien.state_names)))
fil.write("signals = {}\n".format(repr(root.linien.signal_names)))

platform.add_source_dir("verilog")
build_dir = "fpga_build"
platform.add_source_dir(REPO_ROOT_DIR / "gateware" / "verilog")
build_dir = REPO_ROOT_DIR / "gateware" / "build"
platform.build(root, build_name="top", build_dir=build_dir)
bit2bin("%s/top.bit" % build_dir, "%s/linien.bin" % build_dir, flip=True)
bit2bin(
build_dir / "top.bit",
REPO_ROOT_DIR / "linien-server" / "linien_server" / "linien.bin",
flip=True,
)
4 changes: 2 additions & 2 deletions gateware/platform.py → gateware/hw_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Platform(XilinxPlatform):
def __init__(self):
XilinxPlatform.__init__(self, "xc7z010-clg400-1", _io, toolchain="vivado")
self.toolchain.pre_synthesis_commands.append(
"read_xdc -ref processing_system7_v5_4_processing_system7 ../verilog/system_processing_system7_0_0.xdc"
"read_xdc -ref processing_system7_v5_4_processing_system7 ../verilog/system_processing_system7_0_0.xdc" # noqa: E501
)
self.toolchain.with_phys_opt = True

Expand All @@ -188,7 +188,7 @@ def do_finalize(self, fragment):
)
for i in range(2):
try:
adc = self.lookup_request("adc", i)
_ = self.lookup_request("adc", i)
# self.add_platform_command("set_input_delay "
# "-clock {clk} 3.4 [get_ports {data}]",
# clk=clk125, data=adc[0])
Expand Down
5 changes: 2 additions & 3 deletions gateware/linien.py → gateware/linien_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with Linien. If not, see <http://www.gnu.org/licenses/>.

from linien_common.common import ANALOG_OUT0
from migen import (
Array,
Cat,
Expand All @@ -31,9 +32,7 @@
from misoc.interconnect import csr_bus
from misoc.interconnect.csr import AutoCSR, CSRStatus, CSRStorage

from gateware.logic.autolock import FPGAAutolock
from linien.common import ANALOG_OUT0

from .logic.autolock import FPGAAutolock
from .logic.chains import FastChain, SlowChain, cross_connect
from .logic.decimation import Decimate
from .logic.delta_sigma import DeltaSigma
Expand Down
8 changes: 6 additions & 2 deletions gateware/logic/autolock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with Linien. If not, see <http://www.gnu.org/licenses/>.

from linien_common.common import (
AUTOLOCK_MAX_N_INSTRUCTIONS,
FAST_AUTOLOCK,
ROBUST_AUTOLOCK,
)
from migen import Array, If, Module, Signal, bits_for
from misoc.interconnect.csr import AutoCSR, CSRStatus, CSRStorage

from gateware.logic.autolock_utils import SumDiffCalculator
from linien.common import AUTOLOCK_MAX_N_INSTRUCTIONS, FAST_AUTOLOCK, ROBUST_AUTOLOCK
from .autolock_utils import SumDiffCalculator

ROBUST_AUTOLOCK_FPGA_DELAY = 3

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions linien-client/linien_client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ._version import __version__ # noqa: F401
Loading