CsrBlock constructor
- CsrBlockConfig config,
- Logic clk,
- Logic reset,
- DataPortInterface fdw,
- DataPortInterface fdr,
Create the CsrBlock from a configuration.
Implementation
factory CsrBlock(
CsrBlockConfig config,
Logic clk,
Logic reset,
DataPortInterface fdw,
DataPortInterface fdr,
) {
final csrs = <Csr>[];
for (final reg in config.registers) {
csrs.add(Csr(reg));
}
return CsrBlock._(
config: config,
csrs: csrs,
clk: clk,
reset: reset,
fdw: fdw,
fdr: fdr,
);
}