Skip to main content

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.

Installation

pip install pymoku-sdk docker

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymoku_sdk-0.4.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymoku_sdk-0.4-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file pymoku_sdk-0.4.tar.gz.

File metadata

  • Download URL: pymoku_sdk-0.4.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for pymoku_sdk-0.4.tar.gz
Algorithm Hash digest
SHA256 163c34c8d208032bedb66e647a2aed8f2c697c267aeb4bdbd728cf5839a66e93
MD5 3a41d7eff867aee0c8235a6c2627d04d
BLAKE2b-256 2fc63c327b75e42e6bcba66f244365d681ef593a5fb19217ebeaed4ef48ce897

See more details on using hashes here.

File details

Details for the file pymoku_sdk-0.4-py3-none-any.whl.

File metadata

  • Download URL: pymoku_sdk-0.4-py3-none-any.whl
  • Upload date:
  • Size: 48.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for pymoku_sdk-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 541ee176e37442eea781de31d3b7c4921937de194c3e54e3ddfbfebb99dd61d3
MD5 b086d508f531fe28e3d52c6308ab2fcc
BLAKE2b-256 5c199e371e5610b2526e382717e6c7bf40b82f713b52adc8b7121c21e78724e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page