mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-07 06:33:24 +00:00
kernel/mem: Make the Mem helpers inherit from AttrObject.
This commit is contained in:
parent
009940f56c
commit
c86a79bf0b
1 changed files with 4 additions and 8 deletions
12
kernel/mem.h
12
kernel/mem.h
|
@ -25,9 +25,8 @@
|
||||||
|
|
||||||
YOSYS_NAMESPACE_BEGIN
|
YOSYS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
struct MemRd {
|
struct MemRd : RTLIL::AttrObject {
|
||||||
bool removed;
|
bool removed;
|
||||||
dict<IdString, Const> attributes;
|
|
||||||
Cell *cell;
|
Cell *cell;
|
||||||
int wide_log2;
|
int wide_log2;
|
||||||
bool clk_enable, clk_polarity, ce_over_srst;
|
bool clk_enable, clk_polarity, ce_over_srst;
|
||||||
|
@ -46,9 +45,8 @@ struct MemRd {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MemWr {
|
struct MemWr : RTLIL::AttrObject {
|
||||||
bool removed;
|
bool removed;
|
||||||
dict<IdString, Const> attributes;
|
|
||||||
Cell *cell;
|
Cell *cell;
|
||||||
int wide_log2;
|
int wide_log2;
|
||||||
bool clk_enable, clk_polarity;
|
bool clk_enable, clk_polarity;
|
||||||
|
@ -66,18 +64,16 @@ struct MemWr {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MemInit {
|
struct MemInit : RTLIL::AttrObject {
|
||||||
dict<IdString, Const> attributes;
|
|
||||||
Cell *cell;
|
Cell *cell;
|
||||||
Const addr;
|
Const addr;
|
||||||
Const data;
|
Const data;
|
||||||
MemInit() : cell(nullptr) {}
|
MemInit() : cell(nullptr) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Mem {
|
struct Mem : RTLIL::AttrObject {
|
||||||
Module *module;
|
Module *module;
|
||||||
IdString memid;
|
IdString memid;
|
||||||
dict<IdString, Const> attributes;
|
|
||||||
bool packed;
|
bool packed;
|
||||||
RTLIL::Memory *mem;
|
RTLIL::Memory *mem;
|
||||||
Cell *cell;
|
Cell *cell;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue