# mokucli mc

Moku Compile is an offline toolchain that enables you to build, compile, and deploy custom FPGA logic to Moku devices without requiring an internet connection.

# Usage

$ mokucli mc [OPTIONS] COMMAND [ARGS]
1

# Commands

List of available mc subcommands:

  • run: Start a new build
  • history: List build history
  • list: List all available and installed toolchains, showing which is currently active.
  • install: Downloads and installs the specified toolchains version from the server
  • use: Switch to using a specific toolchains version
  • current: Show the currently active toolchains version
  • remove: Remove a specific toolchains version

# mokucli mc run

Start a new build

# Usage

$  mokucli mc run [OPTIONS]
1

# Options

  • --src-dir [PATH]: Source directory containing HDL files (default: current)
  • --hw-version [mokugo|mokupro|mokulab|mokudelta]: Filter by hardware version
  • --slots [INTEGER]: Number of slots to use
  • --interface [custominstrument|custominstrumentinterlaced| customwrapper(legacy)]: Interface type (default: CustomInstrument)
  • --interpolation [TEXT]: Interpolation setting (default: False)
  • --help: Show this message and exit

# Examples

# run scripts for project in path-to-folder for Moku:Go, 2-Slot with custominstrument entity
mokucli mc run --src-dir "path-to-folder" --hw-version mokugo --slots 2 --interface custominstrument
1
2

# Output

# run scripts for project in path-to-folder for Moku:Go, 2-Slot with custominstrument entity
mokucli mc run --src-dir "path-to-folder" --hw-version mokugo --slots 2 --interface custominstrument

ℹ Started build
ℹ   ID: Project_mokugo_2_25021425
ℹ   Hardware: mokugo
ℹ   Slots: 2
ℹ   Toolchain: 4.1.2
ℹ   Output Dir: path-to-folder
ℹ   Bitstreams Dir: path-to-folder
ℹ   Interface: CustomInstrument
ℹ   Interpolation: False
╭──────────────────────── Build Output - Synthesis ────────────────────────╮
│ WARNING: [Runs 36-546] Tool Report Strategy 'Performance Explore         │
│ Reports' from file                                                       │
│ 'C:/Xilinx/Vivado/2022.2/reportstrategies/VRI2021.psg' discarded because │
│ strategy with same name already parsed from                              │
│ 'C:\Xilinx\Vivado\2022.2/reportstrategies/VRI2021.psg'                   │
│ WARNING: [Runs 36-546] Tool Report Strategy 'Timing Closure Reports'     │
│ from file 'C:/Xilinx/Vivado/2022.2/reportstrategies/VRI2021.psg'         │
│                                   ...                                    │
╰──────────────────────────────────────────────────────────────────────────╯

Creating compatible bitstream... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
✓ Build completed successfully
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# mokucli mc history

List build history

# Usage

$ mokucli mc history [OPTIONS]
1

# Options

  • --src-dir [PATH]: Source directory containing HDL files (default: current)
  • --limit [INTEGER]: Number of entries to show (default: 10)
  • --id [TEXT]: Show details of a specific build
  • --help: Show this message and exit

# Examples

# Print the history of the builds in the current directory
$ mokucli mc history

# Print history of the build project_mokugo_2_26020930
$ mokucli mc history --src-dir "path\to\project" --id project_mokugo_2_26020930

# Print history of all builds in the project folder
$ mokucli mc history --src-dir "path\to\project"
1
2
3
4
5
6
7
8

# Output

# Print history of the build project_mokugo_2_26020930
$ mokucli mc history --src-dir "path\to\project" --id project_mokugo_2_26020930
ℹ Showing details for build: project_mokugo_2_26020930
ℹ Step Details:
┏━━━━━━━━━━━┳━━━━━━━━━┓
┃ Step      ┃ Status  ┃
┡━━━━━━━━━━━╇━━━━━━━━━┩
│ IP        │ SUCCESS │
│ Synthesis │ SUCCESS │
│ Route     │ SUCCESS │
│ Bitstream │ SUCCESS │
└───────────┴─────────┘
Files in build project_mokugo_2_26020930
├── Log files
│   ├── output\route.log
│   └── output\synthesis.log
├── Reports
│   ├── output\timing.rpt
│   ├── output\timing_summary.rpt
│   ├── output\utilization.rpt
│   └── output\utilutilization_hier.rpt
└── Bitstreams
    ├── bitstreams\02-255-00.bar
    └── bitstreams\02-255-01.bar
ℹ Build Manifest:
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key                  ┃ Value                                                      ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ XILINX_PATH          │ C:\Xilinx\Vivado\2022.2                                    │
│ XILINXD_LICENSE_FILE │ C:\Users\indir\AppData\Roaming\XilinxLicense\Xilinx.lic    │
│ HW_VER               │ mokugo                                                     │
│ SLOTS                │ 2                                                          │
│ SRC_DIR              │ path\to\project                                            │
│ OUT_DIR              │ path\to\project\mc_builds\project_mokugo_2_26020930\output │
└──────────────────────┴────────────────────────────────────────────────────────────┘
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

# mokucli mc list

List all available and installed toolchains, showing which is currently active.

# Usage

$ mokucli mc list [OPTIONS]
1

# Options

  • --server [TEXT]: Server to list features from (e.g. 'dev', 'toolchains') (default: default)
  • --help: Show this message and exit

# Examples

# Print the available and installed toolchains
$ mokucli mc list
1
2

# Output

# Print the available and installed toolchains
$ mokucli mc list
ℹ Getting available Moku Compile toolchain versions...
┏━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Version ┃ Installed ┃ Is Active ┃ Download Access ┃
┡━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ 4.1.1   │ Yes       │ No        │ Allowed         │
│ 4.1.2   │ Yes       │ Yes       │ Allowed         │
└─────────┴───────────┴───────────┴─────────────────┘
1
2
3
4
5
6
7
8
9

# mokucli mc install

Downloads and installs the specified toolchains version from the server. Logging in is required for to run mokucli mc install VERSION. Log in with mokucli login

# Usage

$ mokucli mc install [OPTIONS] VERSION
1

# Arguments

  • version [TEXT]: Version of toolchains to install (e.g. '4.0.1') [required]

# Options

  • --server [TEXT]: Server to list features from (e.g. 'dev', 'toolchains') (default: toolchains server)
  • --force -f: Force reinstallation if version already exists
  • --hw-version [mokugo|mokupro|mokulab|mokudelta]: Filter by hardware version
  • --help: Show this message and exit

# Examples

# Download and install the MokuOS 4.1.2 toolchains for the default Moku device
$ mokucli mc install 4.1.2

# Download and install the MokuOS 4.1.2 toolchains for Moku:Go
$ mokucli mc install 4.1.2 --hw-version mokugo

# Force re-download and install the MokuOS 4.1.2 toolchains for Moku:Go
$ mokucli mc install 4.1.2 --hw-version mokugo --force
1
2
3
4
5
6
7
8

# Output

# Force re-download and install the MokuOS 4.1.2 toolchains for Moku:Go
$ mokucli mc install 4.1.2 --hw-version mokugo --force

! Force reinstalling toolchains version 4.1.2 and hardware mokugo...
  Downloading toolchain 4.1.2 ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
✓ Downloaded toolchain 4.1.2
ℹ Setting up toolchains version 4.1.2...
✓ Set mc.build.toolchain = 4.1.2
✓ Configuration saved successfully!
✓ Successfully installed toolchains version 4.1.2
1
2
3
4
5
6
7
8
9
10

# mokucli mc use

Switch to using a specific toolchains version

# Usage

$ mokucli mc use [OPTIONS] VERSION
1

# Arguments

  • version [TEXT]: Version of toolchains to install (e.g. '4.0.1') [required]

# Options

  • --help: Show this message and exit

# Examples

# Switch to use MokuOS 4.1.2 toolchains
$ mokucli mc use 4.1.2
1
2

# Output

# Switch to use MokuOS 4.1.2 toolchains
$ mokucli mc use 4.1.2

✓ Set mc.build.toolchain = 4.1.2
✓ Configuration saved successfully!
✓ Now using toolchains version 4.1.2
1
2
3
4
5
6

# mokucli mc current

Show the currently active toolchains version

# Usage

$ mokucli mc current [OPTIONS]
1

# Options

  • --help: Show this message and exit

# Examples

# Print the currently active toolchains version
$ mokucli mc current
1
2

# Output

# Print the currently active toolchains version
$ mokucli mc current

Current toolchains version: 4.1.2
1
2
3
4

# mokucli mc remove

Remove a specific toolchains version

# Usage

$ mokucli mc remove [OPTIONS] VERSION
1

# Arguments

  • version [TEXT]: Version of toolchains to install (e.g. '4.0.1') [required]

# Options

  • --help: Show this message and exit

# Examples

# Remove MokuOS 4.1.2 toolchains
$ mokucli mc remove 4.1.2
1
2

# Output

# Remove MokuOS 4.1.2 toolchains
$ mokucli mc remove 4.1.2

✓ Set mc.build.toolchain = None
✓ Configuration saved successfully!
✓ Removed toolchains version 4.1.2
1
2
3
4
5
6