Constructs by Syntax

This is a list of syntax constructs in Spade with a link to a description of the underlying language construct. The list is split in two parts, constructs which start with a keyword and those which do not.

Keywords

ConstructDescription
assert <condition>;Assertions (in simulation)
entity ...Entity definition
enum ...Enum definition
fn ...Function definition
inst a(...) ...Entity instantiation
inst(<depth>) a(...) ...Pipeline instantiation
letlet binding
pipeline(<depth>) ...Pipeline definition
reg(<clk>) ...;Register definition
reg;Pipeline stage marker
reg * <number>;Pipeline stage marker, repeated
reg[<condition>];Pipeline stage marker, conditional
set ...Set mutable wires
struct ...Struct definition
use ...Importing Libraries / Dependencies

Symbolic

ConstructDescription
<T>Generic parameters, types variables
<#type N>Generic parameters, compile-time values
a(...) ...Function instantiation
inst a(...) ...Entity instantiation
inst(<depth>) a(...) ...Pipeline instantiation
a[<expr>]Array indexing
a[<expr>..<expr>]Array range indexing
a.nTuple indexing