AddressedMemoryImage<DataType extends Object> constructor
Creates an addressed-memory image.
Implementation
AddressedMemoryImage({
required this.depth,
required this.dataWidth,
required Map<int, DataType> entries,
}) : entries = Map.unmodifiable(entries) {
if (depth <= 0 || dataWidth <= 0) {
throw ArgumentError('Memory depth and data width must be positive.');
}
if (this.entries.keys.any((address) => address < 0 || address >= depth)) {
throw ArgumentError(
'Memory entries must address words within the depth.');
}
}