::std::mem::

Entity clocked_memory

pub extern entity clocked_memory<#uint NumElements, #uint WritePorts, #uint AddrWidth, D>(clk: clock, writes: [(bool, uint<AddrWidth>, D); WritePorts]) -> Memory<D, NumElements>
Expand

Define a memory where values are written on the rising edge of the clock. Reads can occur asynchronously with the read_mem function. If Clocked reads should be used, the read result should be placed in a register

The write array defines all the write ports to the memory. It consists of a write enable, address and data field. When WE is enabled, data is written to address. Otherwise no change takes effect NOTE: We when possible, we should make compute AddrWidth from NumElements