3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-12 04:03:45 +00:00

Add missing memory width assert preventing division by zero (#3546)

This commit is contained in:
Emil J 2022-11-09 10:34:25 +01:00 committed by GitHub
parent faa1c2e7fe
commit c75f12a989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -504,6 +504,7 @@ void Mem::check() {
int mask = (1 << max_wide_log2) - 1;
log_assert(!(start_offset & mask));
log_assert(!(size & mask));
log_assert(width != 0);
}
namespace {