3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

booth: Map simple $macc instances too

This commit is contained in:
Martin Povišer 2024-12-01 15:58:01 +01:00
parent 6f3376cbe6
commit 1ded817beb
3 changed files with 50 additions and 10 deletions

View file

@ -228,6 +228,14 @@ struct Macc
return true;
}
bool is_simple_product()
{
return bit_ports.empty() &&
ports.size() == 1 &&
!ports[0].in_b.empty() &&
!ports[0].do_subtract;
}
Macc(RTLIL::Cell *cell = nullptr)
{
if (cell != nullptr)