3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-17 16:52:16 +00:00

Add pmgen finish statement, return number of matches

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2019-08-16 14:16:35 +02:00
parent f45dad8220
commit 20910fd7c8
4 changed files with 108 additions and 74 deletions

View file

@ -41,7 +41,8 @@ code
finally
chain.pop_back();
log_assert(chain.empty());
accept;
if (GetSize(longest_chain) > 1)
accept;
endcode
// ------------------------------------------------------------------
@ -80,7 +81,7 @@ match next
select next->type.in($_AND_, $_OR_, $_XOR_)
index <IdString> next->type === chain.back().first->type
index <SigSpec> port(next, \Y) === port(chain.back().first, chain.back().second)
generate 50
generate 10
SigSpec A = module->addWire(NEW_ID);
SigSpec B = module->addWire(NEW_ID);
SigSpec Y = port(chain.back().first, chain.back().second);