Skip to content

LanguageDocs

Conner edited this page Feb 22, 2022 · 5 revisions

Chrono


Language Structure

The primary structure of the Chrono language is the module. Each module contains the code for the logic being described. Modules can be placed inside one another to form hierarchies.

A module is declared with a input/output list enclosed with parentheses, followed by a code section enclosed with curly braces.

ModuleName(inputs/output)
{
    code...
}

Control Structures


Signals

wire

The default type of a wire is a uint

reg

The default type of a reg is a uint

tri

A tristate wire signal. The default type of a tri is a uint

Slices

Signals can be bit-vectors/slices of various sizes.


Types

int

This indicates an integer data type. Any real value converted to an int will be truncated.

uint

This indicates an unsigned integer data type. Any negative integer will get interpreted as it's 2s-complement bit representation.

real

Reals store decimal values. These are only able to be used with parameters

fixed

Fixed point values


Literals


Parameters


Keywords

Keywords in alphabetical order

Clone this wiki locally