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

cxxrtl: make blackbox commit() possible to override.

This fixes a regression introduced when commit observers were added.
This commit is contained in:
Catherine 2024-02-26 09:52:12 +00:00
parent 84116c9a38
commit 569a6d7fea
2 changed files with 7 additions and 7 deletions

View file

@ -556,7 +556,7 @@ public:
bool record_incremental(ModuleT &module) {
assert(streaming);
struct {
struct : observer {
std::unordered_map<const chunk_t*, spool::ident_t> *ident_lookup;
spool::writer *writer;
@ -569,7 +569,9 @@ public:
void on_update(size_t chunks, const chunk_t *base, const chunk_t *value, size_t index) {
writer->write_change(ident_lookup->at(base), chunks, value, index);
}
} record_observer = { &ident_lookup, &writer };
} record_observer;
record_observer.ident_lookup = &ident_lookup;
record_observer.writer = &writer;
writer.write_sample(/*incremental=*/true, pointer++, timestamp);
for (auto input_index : inputs) {