Merge pull request #3854 from povik/abits-wide_log2-assert

This commit is contained in:
N. Engelhardt 2023-07-24 16:20:51 +02:00 committed by GitHub
commit 2bc0d86de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -451,6 +451,7 @@ void Mem::check() {
log_assert(GetSize(port.en) == 1);
log_assert(GetSize(port.arst) == 1);
log_assert(GetSize(port.srst) == 1);
log_assert(GetSize(port.addr) >= port.wide_log2);
log_assert(GetSize(port.data) == (width << port.wide_log2));
log_assert(GetSize(port.init_value) == (width << port.wide_log2));
log_assert(GetSize(port.arst_value) == (width << port.wide_log2));
@ -484,6 +485,7 @@ void Mem::check() {
log_assert(GetSize(port.clk) == 1);
log_assert(GetSize(port.en) == (width << port.wide_log2));
log_assert(GetSize(port.data) == (width << port.wide_log2));
log_assert(GetSize(port.addr) >= port.wide_log2);
for (int j = 0; j < port.wide_log2; j++) {
log_assert(port.addr[j] == State::S0);
}