Open kaolpr opened 2 years ago
We are definitely interested in a port of Linien to Sinara hardware! I have personally not used Sinara/Artiq myself but some of my colleagues do and I might do so myself in future projects.
I have planned for some time to separate the different components of Linien more clearly, i.e. having separate packages for server, client and GUI and clearly separating migen/verilog/FPGA related code. I have so far not gotten around of actually doing this (other than some research into python namespace packages) but I think doing this would make porting Linien to other platforms much easier.
We should also consider which parts of the code are actually hardware dependent and separate those in order to avoid diverging codebases.
I believe we could help you with this refactorization while porting to Fast Servo. We will get into the project details and maybe then we could arrange some meeting to go into details and setup a work plan?
That sounds great!
I think I can set aside some time tomorrow to get this started. Also happy to have a meeting once you got an idea about the code.
Started today with the refactor: https://github.com/linien-org/linien/pull/277. This is not yet finished and probably won't work yet, will continue as time permits.
The PR is still WIP but I think I am on a good way and the components of linien are now more clearly separated (did not use a namespace package after all).
There will be 5 packages, linien-common, linien-server, linien-client and linien-gui that will be put on pypi. There is also the gateware which is not a package but is transpiled using migen. All packages and the gateware rely on linien-common.
The easiest way is probably to install packages via pip in editable mode, starting with pip install -e .
from the linien-common
directory and then install the other packages the same way as needed.
As for dependencies: All packages and the gateware rely on linien-common
. linien-gui
depends on linien-client
. linien-server
has some additional dependencies installed via linien_install_requirements.sh
. This includes pyrp3
and mdio-tool
. Specifically, pyrp3
is used in acquisition_process.py
and mdio-tool
is used in the linien_start_server.sh
to turn of ethernet blinking on the RedPitaya. csrmap.py
is generated via the gateware.
What I have tested succesfully:
build_fpga_image.sh
linien-gui
with pyinstaller pyinstaller.spec
on both Linux and Windowslinien-server
on the RedPitaya and connecting to itpytest .
: the linien-
packages need to be installed via pipThings that do not work yet:
.devX
versions according to PEP440 for development versionspip install -e .
so everything behaves the same, independent of whether dev or stable version is usedThis needs to be updated but most things should still be valid: https://github.com/linien-org/linien/wiki/Development
Most notably, each package now has its own _version.py
that has to be changed individually. I did not find a way to unify this.
@kaolpr : Feel free to check out #277 :) The most relevant things for a port should already be clear.
Also note, that on the RP, we are unfortunately limited to use Python 3.5, see https://github.com/RedPitaya/RedPitaya/issues/233
@bleykauf Thank you for quick and extensive action!
We're currently debugging the prototype of FastServo. As soon as we're done with it we'll dive into linien.
@kaolpr just checking in, is this still something you consider? Separation between the different components is now much clearer.
We do have a working prototype. I'll look into it and see when we can submit PR.
At WUT we're developing Sinara Open Hardware ecosystem and recently received prototypes of the board that may be of interest to you. The project is called Fast Servo and is designed in a 3U form factor to be used in crate or standalone. It features 2ch 125 MSPS 16b ADC and 2ch 125 MSPS 14b DAC and is based on Trenz Xilinx Zynq module. After we're done with testing, it will be available for purchase from our industrial partners.
For more information see project Wiki.
If you are interested in using Fast Servo with linien we can contribute and port it to our board.