3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 17:44:09 +00:00

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

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);
}