3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Merge pull request #2594 from zachjs/func-arg-width

verilog: fix sizing of constant args for tasks/functions
This commit is contained in:
whitequark 2021-02-23 21:46:16 +00:00 committed by GitHub
commit ad2960adb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 124 additions and 47 deletions

View file

@ -263,7 +263,13 @@ namespace AST
bool detect_latch(const std::string &var);
// additional functionality for evaluating constant functions
struct varinfo_t { RTLIL::Const val; int offset; bool is_signed; };
struct varinfo_t {
RTLIL::Const val;
int offset;
bool is_signed;
AstNode *arg = nullptr;
bool explicitly_sized;
};
bool has_const_only_constructs();
bool replace_variables(std::map<std::string, varinfo_t> &variables, AstNode *fcall, bool must_succeed);
AstNode *eval_const_function(AstNode *fcall, bool must_succeed);