3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-14 01:46:16 +00:00

kernel/mem: defer port removal to emit()

This commit is contained in:
Marcelina Kościelnicka 2021-05-22 16:10:18 +02:00
parent 8c734e07b8
commit ff9e0394b8
2 changed files with 38 additions and 18 deletions

View file

@ -25,20 +25,22 @@
YOSYS_NAMESPACE_BEGIN
struct MemRd {
bool removed;
dict<IdString, Const> attributes;
Cell *cell;
bool clk_enable, clk_polarity;
bool transparent;
SigSpec clk, en, addr, data;
MemRd() : cell(nullptr) {}
MemRd() : removed(false), cell(nullptr) {}
};
struct MemWr {
bool removed;
dict<IdString, Const> attributes;
Cell *cell;
bool clk_enable, clk_polarity;
SigSpec clk, en, addr, data;
MemWr() : cell(nullptr) {}
MemWr() : removed(false), cell(nullptr) {}
};
struct MemInit {
@ -63,8 +65,6 @@ struct Mem {
void remove();
void emit();
void remove_wr_port(int idx);
void remove_rd_port(int idx);
void clear_inits();
Const get_init_data() const;
static std::vector<Mem> get_all_memories(Module *module);