3
0
Fork 0
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:
clairexen 2020-06-08 15:27:15 +02:00 committed by GitHub
commit fbd0d8d5f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 546 additions and 330 deletions

View file

@ -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); \