Skip to content

mfkiwl/moore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,648 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moore

Build Status Released API docs Crates.io Crates.io dependency status

Moore is a compiler for hardware description languages that outputs llhd assembly, with a focus on usability, clear error reporting, and completeness. Its goal is to act as a frontend for hardware design tools such as synthesizers, linters, or logical equivalence checkers.

Usage

Installation

You need a working Rust installation. Use cargo to install moore:

cargo install moore

Example

Assume the following input file:

// foo.sv
module hello_world;
endmodule

To compile foo.sv and emit the corresponding LLHD assembly to standard output call moore with the file name and the module to elaborate (-e option):

moore foo.sv -e hello_world

You can use llhd-sim to simulate the compiled module:

moore foo.sv -e hello_world > foo.llhd
llhd-sim foo.llhd

Development

Moore is developed in this repository, but is separated into the following crates:

  • moore: Top-level umbrella crate tying everything together
  • moore-common: Common infrastructure used by SystemVerilog and VHDL
  • moore-derive: Procedural macros
  • moore-svlog: SystemVerilog implementation
  • moore-svlog-syntax: SystemVerilog parser and AST implementation
  • moore-vhdl: VHDL implementation
  • moore-vhdl-syntax: VHDL parser and AST implementation

Some useful commands when working on moore:

git submodule init
git submodule update
cargo check
cargo test --all
cargo run -- foo.sv -e foo
scripts/test.py --debug -v
scripts/test.py --debug -v <path-to-test-case>

Making a new Release

To create a new release, the individual sub-crates of the project have to be released in the reverse order outlined above. Follow this checklist:

  1. Use scripts/release_status.sh to see an overview of moore/llhd crate versions used throughout the project
  2. Update the version in all Cargo.toml files
  3. Use scripts/release_check.sh to ensure that all crates have the same version as the root
  4. Ensure cargo is happy: cargo check
  5. Update the CHANGELOG.md file
  6. Commit: git commit -am "Bump version to X.Y.Z
  7. Tag: git tag vX.Y.Z
  8. Publish all crates using cargo publish in reverse order

About

A hardware compiler based on LLHD.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 84.0%
  • SystemVerilog 13.0%
  • VHDL 2.1%
  • Other 0.9%