Axi4ChannelInterface constructor

Axi4ChannelInterface({
  1. required String prefix,
  2. required bool main,
  3. int idWidth = 4,
  4. int userWidth = 32,
})

Constructor.

Implementation

Axi4ChannelInterface({
  required this.prefix,
  required this.main,
  this.idWidth = 4,
  this.userWidth = 32,
}) {
  setPorts([
    if (idWidth > 0) Logic.port('${prefix}ID', idWidth),
    if (userWidth > 0) Logic.port('${prefix}USER', userWidth),
    Logic.port('${prefix}VALID'),
  ], [
    if (main) PairDirection.fromProvider else PairDirection.fromConsumer,
  ]);

  setPorts([
    Logic.port('${prefix}READY'),
  ], [
    if (main) PairDirection.fromConsumer else PairDirection.fromProvider,
  ]);
}