CLI tool to create pymoku projects
Project description
Getting Started
Prerequisites
Simulation
Simulations are run in a docker container with the image li-cocotb-pymoku.
You will need a docker environment with access to this image (currently unpublished).
The resulting wave.ghw files can be viewed with GtkWave or Surfer.
Building bitstreams
Vivado
Bitstreams require a local verision of Vivado (>= 2024.2 recommended) installed with appropriate licences configured.
TODO
Parts can be exteneded to package build context for a remote worker, avoiding the need for a local Vivado installation.
Keys
Creating barfiles that can be deployed on a Moku require them to be signed by Liquid Instruments or with developer keys that have been enabled on the target Moku.
See below for generating keys; these must be signed by Liquid Instruments to enable specific devices.
(interim) Installation
These are the current instructions until these packages are publicly available. It does require access to the LI internal GitLab.
Put these in requirements.txt
pymoku @ git+https://git.liquidinstruments.com/pymoku/pymoku.git
pymoku-parts @ git+https://git.liquidinstruments.com/pymoku/pymoku-parts.git
pymoku-sdk @ git+https://git.liquidinstruments.com/pymoku/pymoku-sdk.git
docker
create a virtual environment
python -m virtualenv venv
source venv/bin/activate
and then run
pip install -r requirements.txt
Generate a signing key
This only needs to be done once, and the key will be stored in the user home directory.
pymokusdk keys create my-key
The resulting public key will need to be signed by Liquid Instruments.
Create a new project
pymokusdk new MySlot --hw mokugo
cd myslot
Run the simulaition
parts tests
Results will available in the build/test-slot folder. Of interest will be
wave.ghw and stdout.log. Build failures in the VHDL will be printed to the
console, but errors during execution will be stdout.log.
Run a build
parts mokugo python --stats
The resulting barfiles will be in output/.
Deploying from Python
import pymoku
pymoku.plugins.DEV_CACHE = './output' # reference our local output
moku = pymoku.connect('10.0.0.1')
moku.deploy_platform('pymoku:platform_2') # deploy a platform (only needed once)
myslot = moku.deploy('custom:myslot') # this name should match the specific id used in parts.def
The myslot object will be created dynamically from your custom python plugin
and attached to the slot instance on the Moku.
Deploying from the GUI
First you will need to have installed pymoku[extras] to include GUI support.
Then run pymoku with reference to your local output folder
pymoku --dev output/
This will launch the GUI. After connecting to a Moku and deploying a platform, your custom implementation will be available from the functions palette (assuming it was built for the deployed platform).
Launching the slot instance will open the applet defined by your custom python plugin. The default will appear as a python console.
TODO
- 'clean' targets
- Create barfiles for checkpoints to use as platforms
- Don't use GPG for signatures
- Use personal signing keys to sign manifests
- Generate signing keys
- Auto generate "custom wrapper"
- Bitstream encryption
- Sanity check environment
- Fetch checkpoints from cloud
- Plugin versions (or lack of) break pymoku prioritisation
- API deployment
- If Git on PATH or CLI arg, add .gitignore and init repo
- Auto generate top/test bench with new generics and custom number of Ain/Aout
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymoku_sdk-0.3.tar.gz.
File metadata
- Download URL: pymoku_sdk-0.3.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b8485e1a33262838fcefa0ae24468c641b3890e0c4b0e336bc2e6f933e692a3
|
|
| MD5 |
a93a60b476668a093ef69d76ad002e1f
|
|
| BLAKE2b-256 |
d9d4cb98fd01d17a21efee4f29fbe733bcaf59ab2073d31bc302cb442223c852
|
File details
Details for the file pymoku_sdk-0.3-py3-none-any.whl.
File metadata
- Download URL: pymoku_sdk-0.3-py3-none-any.whl
- Upload date:
- Size: 48.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
524a35d38e33d682a6b5f34717992b9ff2c776f6b942d4e9a67046a4f87f33c9
|
|
| MD5 |
feb7a259fa14b12f76e7507977dc86ce
|
|
| BLAKE2b-256 |
6f6a41d0c4abaa0fcab4338b8e8d702159e2544641cdeab882658363b0d5d0d1
|