Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Configuration

The [project] section

The first section of Veryl.toml is [project]. The mandatory fields are name and version.

The name field

The project name is used as prefix in the generated codes. So the name must start with alphabet or _, and use only alphanumeric characters or _.

The version field

The project version should follow Semantic Versioning. The version is constructed by the following three numbers.

  • Major – increment at incompatible changes
  • Minor – increment at adding features with backward compatibility
  • Patch – increment at bug fixes with backward compatibility
[project]
version = "0.1.0"

The authors field

The optional authors field lists in an array the people or organizations that are considered the “authors” of the project. The format of each string in the list is free. Name only, e-mail address only, and name with e-mail address included within angled brackets are commonly used.

[project]
authors = ["Fnu Lnu", "anonymous@example.com", "Fnu Lnu <anonymous@example.com>"]

The description field

The description is a short blurb about the project. This should be plane text (not Markdown).

The license field

The license field contains the name of license that the project is released under. The string should be follow SPDX 2.3 license expression.

[project]
license = "MIT OR Apache-2.0"

The repository field

The repository field should be a URL to the source repository for the project.

[project]
repository = "https://github.com/veryl-lang/veryl"

The categories field

The optional categories field lists the categories which the project belongs to. It is used by the Veryl registry to classify the project.

[project]
categories = ["interconnect", "verification"]

The recognized categories are defined by the registry itself, not by the Veryl compiler. A category which the registry doesn’t recognize is reported as a warning by veryl register and ignored.

The [build] section

The [build] section contains the configurations of code generation. Available configurations is here.

The [format] section

The [format] section contains the configurations of code formatter. Available configurations is here.

The [lint] section

The [lint] section contains the configurations of linter. Available configurations is here.

The [test] section

The [test] section contains the configurations of test by RTL simulator. Available configurations is here.

The [publish] section

The [publish] section contains the configurations of publishing. Available configurations is here.

The [synth] section

The [synth] section contains the configurations of the synthesizer. Available configurations is here.

The [properties] section

The [properties] section contains project properties. A project property is a compile time constant which can be referenced from the source code of the project through the $prop namespace.

The name of a property should be a valid identifier of Veryl because it is referenced as an identifier in the source code. The value of a property is an integer or a boolean. The type of a property is decided by the given value, and an integer property has i64 type, and a boolean property has bbool type in the source code.

[properties]
DATA_WIDTH   = 32
ENABLE_DEBUG = false

The value defined here is the default value of the property. It can be overridden by the project which depends on this project. Please see Project Property for the usage in the source code, and Dependencies for overriding.

The [dependencies] section

The [dependencies] section contains library dependencies. Available configurations is here.

The [[components]] entries

A [[components]] entry registers a cargo package of verification components written in Rust. Available configurations is here.