3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-23 07:32:32 +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

@ -95,7 +95,8 @@ struct Mem : RTLIL::AttrObject {
bool packed;
RTLIL::Memory *mem;
Cell *cell;
int width, start_offset, size;
size_t size;
int width, start_offset;
std::vector<MemInit> inits;
std::vector<MemRd> rd_ports;
std::vector<MemWr> wr_ports;
@ -222,7 +223,7 @@ struct Mem : RTLIL::AttrObject {
// in the same clock domain.
void emulate_read_first(FfInitVals *initvals);
Mem(Module *module, IdString memid, int width, int start_offset, int size) : module(module), memid(memid), packed(false), mem(nullptr), cell(nullptr), width(width), start_offset(start_offset), size(size) {}
Mem(Module *module, IdString memid, int width, int start_offset, size_t size) : module(module), memid(memid), packed(false), mem(nullptr), cell(nullptr), size(size), width(width), start_offset(start_offset) {}
};
// MemContents efficiently represents the contents of a potentially sparse memory by storing only those segments that are actually defined