MemoryModel constructor

MemoryModel(
  1. Logic clk,
  2. Logic reset,
  3. List<DataPortInterface> writePorts,
  4. List<DataPortInterface> readPorts, {
  5. int readLatency = 1,
  6. bool asyncReset = true,
  7. MemoryStorage? storage,
})

Creates a new MemoryModel.

If no storage is provided, a default storage will be created.

Implementation

MemoryModel(
  super.clk,
  super.reset,
  super.writePorts,
  super.readPorts, {
  this.readLatency = 1,
  this.asyncReset = true,
  MemoryStorage? storage,
}) {
  this.storage = storage ??
      SparseMemoryStorage(addrWidth: addrWidth, dataWidth: dataWidth);

  _buildLogic();
}