DataPortInterface constructor

DataPortInterface(
  1. int dataWidth,
  2. int addrWidth
)

Constructs a new interface of specified dataWidth and addrWidth for interacting with a memory in either the read or write direction.

Implementation

DataPortInterface(this.dataWidth, this.addrWidth) {
  setPorts([
    Port('en'),
    Port('addr', addrWidth),
  ], [
    DataPortGroup.control
  ]);

  setPorts([
    Port('data', dataWidth),
  ], [
    DataPortGroup.data
  ]);
}