Rox is a programming language aimed at describing hardware. Rox is still in early development.

The source

Rox is free software distributed under the terms of the GNU GPL 3 or any later version. The repository is hosted on GitLab.

The guide

The guide includes installation instructions as well as documentation on the features of Rox.

An example

// Number types can have any size.
// We can alias types for convenience, here u6 is an alias.
u6 = unsigned(6);

// This component has one input and two outputs.
fn component(in: u6) -> (less_15: bit, dec: u6) {
    // A bit can hold the result of a comparison.
    .less_15 = in < 15;
    // We can easily convert from/to signed/unsigned values of
    // different sizes. We don't need to, but let's do it anyway.
    s = in as signed(8);
    // We cannot assign to s again, so we use another identifier.
    // This would be an error: s = s + 0xff;
    sum = s + 0xff;
    // The . before dec says that we are setting a variable outside
    // the current block, otherwise we only create an internal signal,
    // just like s and sum above.
    .dec = sum as u6;