Axi4ChannelInterface constructor
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,
]);
}