mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Merge pull request #2105 from whitequark/split-flatten-off-techmap
Split `flatten` from `techmap` and simplify it
This commit is contained in:
commit
fbd0d8d5f0
5 changed files with 546 additions and 330 deletions
|
@ -1885,6 +1885,18 @@ RTLIL::Cell *RTLIL::Module::addCell(RTLIL::IdString name, const RTLIL::Cell *oth
|
|||
return cell;
|
||||
}
|
||||
|
||||
RTLIL::Memory *RTLIL::Module::addMemory(RTLIL::IdString name, const RTLIL::Memory *other)
|
||||
{
|
||||
RTLIL::Memory *mem = new RTLIL::Memory;
|
||||
mem->name = name;
|
||||
mem->width = other->width;
|
||||
mem->start_offset = other->start_offset;
|
||||
mem->size = other->size;
|
||||
mem->attributes = other->attributes;
|
||||
memories[mem->name] = mem;
|
||||
return mem;
|
||||
}
|
||||
|
||||
#define DEF_METHOD(_func, _y_size, _type) \
|
||||
RTLIL::Cell* RTLIL::Module::add ## _func(RTLIL::IdString name, const RTLIL::SigSpec &sig_a, const RTLIL::SigSpec &sig_y, bool is_signed, const std::string &src) { \
|
||||
RTLIL::Cell *cell = addCell(name, _type); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue