From 8de2e863af4233aca0a0ca0eef4477d216f7a227 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Fri, 12 Feb 2021 14:25:34 -0500 Subject: verilog: support recursive functions using ternary expressions This adds a mechanism for marking certain portions of elaboration as occurring within unevaluated ternary branches. To enable elaboration of the overall ternary, this also adds width detection for these unelaborated function calls. --- frontends/ast/ast.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'frontends/ast/ast.h') diff --git a/frontends/ast/ast.h b/frontends/ast/ast.h index d8818df31..8cc7b474f 100644 --- a/frontends/ast/ast.h +++ b/frontends/ast/ast.h @@ -270,6 +270,9 @@ namespace AST bool is_simple_const_expr(); std::string process_format_str(const std::string &sformat, int next_arg, int stage, int width_hint, bool sign_hint); + bool is_recursive_function() const; + std::pair get_tern_choice(); + // create a human-readable text representation of the AST (for debugging) void dumpAst(FILE *f, std::string indent) const; void dumpVlog(FILE *f, std::string indent) const; -- cgit v1.2.3