3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-15 13:25:48 +00:00

Improve arith_tree: FMA add, elarith WIP.

This commit is contained in:
nella 2026-05-18 13:39:04 +02:00
parent e87a9bd9a7
commit d6a01d9200
4 changed files with 599 additions and 255 deletions

View file

@ -58,7 +58,7 @@ synth -top my_design -booth
#include "kernel/sigtools.h"
#include "kernel/yosys.h"
#include "kernel/macc.h"
#include "kernel/wallace_tree.h"
#include "kernel/compressor_tree.h"
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
@ -386,7 +386,11 @@ struct BoothPassWorker {
// Later on yosys will clean up unused constants
// DebugDumpAlignPP(aligned_pp);
auto [wtree_a, wtree_b] = wallace_reduce_scheduled(module, aligned_pp, z_sz);
std::vector<CompressorTree::DepthSig> operands;
operands.reserve(aligned_pp.size());
for (auto &s : aligned_pp)
operands.push_back({s, 0});
auto [wtree_a, wtree_b] = CompressorTree::reduce_scheduled(module, std::move(operands), z_sz, CompressorTree::Strategy::FA_ONLY);
// Debug code: Dump out the csa trees
// DumpCSATrees(debug_csa_trees);