diff --git a/src/V3DfgDfgToAst.cpp b/src/V3DfgDfgToAst.cpp index 2cab9eaec..be47278a9 100644 --- a/src/V3DfgDfgToAst.cpp +++ b/src/V3DfgDfgToAst.cpp @@ -54,6 +54,16 @@ Node* makeNode(const Vertex* vtxp, Ops... ops) { //====================================================================== // Vertices needing special conversion +template <> +AstCountOnes* makeNode( // + const DfgCountOnes* vtxp, AstNodeMath* op1) { + AstCountOnes* const nodep = new AstCountOnes{vtxp->fileline(), op1}; + // Set dtype same as V3Width + const int selwidth = V3Number::log2b(nodep->lhsp()->width()) + 1; + nodep->dtypeSetLogicSized(selwidth, VSigning::UNSIGNED); + return nodep; +} + template <> AstExtend* makeNode( // const DfgExtend* vtxp, AstNodeMath* op1) {