mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-12 00:53:26 +00:00
kernel/mem: Add a coalesce_inits helper.
While this helper is already useful to squash sequential initializations into one in cxxrtl, its main purpose is to squash overlapping masked memory initializations (when they land) and avoid having to deal with them in cxxrtl runtime.
This commit is contained in:
parent
4379375d89
commit
8bf9cb407d
3 changed files with 84 additions and 1 deletions
|
@ -97,6 +97,13 @@ struct Mem : RTLIL::AttrObject {
|
|||
// Marks all inits as removed.
|
||||
void clear_inits();
|
||||
|
||||
// Coalesces inits: whenever two inits have overlapping or touching
|
||||
// address ranges, they are combined into one, with the higher-priority
|
||||
// one's data overwriting the other. Running this results in
|
||||
// an inits list equivalent to the original, in which all entries
|
||||
// cover disjoint (and non-touching) address ranges.
|
||||
void coalesce_inits();
|
||||
|
||||
// Checks consistency of this memory and all its ports/inits, using
|
||||
// log_assert.
|
||||
void check();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue