Module mem
Expand
Utils to instantiate and interact with fixed-latency memories.
Spade provides a built-in memory statement to construct memories with an arbitrary number of
heterogeneous ports.
For example, the following snippet defines a memory containing 4 uint<8> elements. It exposes
two ports: a read-only port named read_port and a write-only named write_port. Both have an
access latency of 1 clock cycle.
memory: [uint<8>: 4] {
read_port: Ro<_, _, 1>,
write_port: Wo<_, _, 1>,
}This mechanism is intentionally permissive: there is no guarantee that any defined memory will be synthesizable.
Structs
- Ro
Read-only memory port.
- Wo
Write-only memory port.
Type Aliases
- Addr
Traits
- Port