10 releases (5 breaking)

0.9.0 Feb 16, 2023
0.8.0 Aug 26, 2022
0.7.0 Aug 9, 2022
0.6.0 Jan 21, 2022
0.2.3 Mar 15, 2020

#1426 in Command line utilities

Download history 3/week @ 2024-07-25 47/week @ 2024-09-19 9/week @ 2024-09-26

56 downloads per month

Custom license

755KB
2.5K SLoC

Contains (WOFF font, 190KB) src/doc/html/static/FiraSans-Medium.woff, (WOFF font, 185KB) FiraSans-Regular.woff, (WOFF font, 94KB) SourceSerifPro-Bold.ttf.woff, (WOFF font, 89KB) SourceSerifPro-Regular.ttf.woff, (WOFF font, 56KB) SourceCodePro-Regular.woff, (WOFF font, 56KB) SourceCodePro-Semibold.woff and 1 more.

CI Crate dependency status

Morty

Come on, flip the pickle, Morty, you're not gonna regret it. The payoff is huge. I turned myself into a pickle, Morty!

Morty reads SystemVerilog files and pickles them into a single file for easier handling. Optionally it allows to re-name modules with a common prefix or suffix. This allows for easier management of larger projects (they just become a single file). By making them unique they can also depend on different versions of the same dependency without namespace clashes.

Install

We provide pre-builds for popular operating systems on our releases page.

From Source

Morty is written in Rust. Get the latest stable Rust version:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then install morty using cargo:

cargo install --git https://github.com/pulp-platform/morty.git

Example Usage

To prefix all modules and packages in test/package.sv and test/package_import_2.sv and files with my_little_prefix_ do:

morty test/package.sv test/package_import_2.sv -p my_little_prefix_

Alternatively, if you want to pass more files, morty will also parse manifest files (as generated by bender sources -f). See Bender. For example:

[
  {
    "include_dirs": [
      "/path/to/include/dir/common_cells/include/",
      "/path/to/include/dir/axi/include/"
    ],
    "defines": {
      "DEFINE_TO_BE_SET": "1"
    },
    "files": [
      "/path/to/file_0.sv",
      "/path/to/file_1.sv",
      "/path/to/file_2.sv"
    ]
  },
  {
    "include_dirs": [
      "/path/to/include/dir/deps/include/"
    ],
    "defines": {
      "ANOTHER_DEFINE_TO_BE_SET": "1"
    },
    "files": [
      "/path/to/file_3.sv",
      "/path/to/file_4.sv",
      "/path/to/file_5.sv"
    ]
  }
]

Comments Stripping

Optionally, morty can strip comments (--strip-comments) of the pickled sources.

Dependencies

~11–24MB
~306K SLoC