3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-22 07:05:51 +00:00

Represent memory size with size_t

This commit is contained in:
Akash Levy 2025-04-04 02:04:34 -07:00
parent 507308d34e
commit bb5f8415af
13 changed files with 60 additions and 35 deletions

View file

@ -201,7 +201,7 @@ struct MemoryMapWorker
int count_static = 0;
for (int i = 0; i < mem.size; i++)
for (size_t i = 0; i < mem.size; i++)
{
int addr = i + mem.start_offset;
int idx = addr & ((1 << abits) - 1);
@ -268,7 +268,7 @@ struct MemoryMapWorker
}
}
log(" created %d %s cells and %d static cells of width %d.\n",
log(" created %zu %s cells and %d static cells of width %d.\n",
mem.size-count_static, formal && (static_only || async_wr) ? "$ff" : "$dff", count_static, mem.width);
int count_dff = 0, count_mux = 0, count_wrmux = 0;
@ -315,7 +315,7 @@ struct MemoryMapWorker
if (!static_only)
{
for (int i = 0; i < mem.size; i++)
for (size_t i = 0; i < mem.size; i++)
{
int addr = i + mem.start_offset;
int idx = addr & ((1 << abits) - 1);