Axi4StreamInterface constructor

Axi4StreamInterface({
  1. int idWidth = 4,
  2. int dataWidth = 64,
  3. int userWidth = 0,
  4. int destWidth = 0,
})

Construct a new instance of an AXI4 interface.

Default values in constructor are from official spec.

Implementation

Axi4StreamInterface({
  super.idWidth = 4,
  this.dataWidth = 64,
  super.userWidth = 0,
  this.destWidth = 0,
})  : strbWidth = dataWidth ~/ 8,
      super(main: true, prefix: 'T') {
  _validateParameters();

  setPorts([
    if (destWidth > 0) Logic.port('TDEST', destWidth),
    Logic.port('TDATA', dataWidth),
    Logic.port('TSTRB', strbWidth),
    Logic.port('TKEEP', strbWidth),
    Logic.port('TLAST'),
  ], [
    PairDirection.fromProvider,
  ]);
}