3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 05:43:40 +00:00

Assign from rvalue via temporary register in nowrshmsk CASE

Avoid repeating complex rvalue expressions for each condition.
This commit is contained in:
Dag Lem 2023-12-08 20:47:43 +01:00
parent dbec704b49
commit 1a2b4759e8
3 changed files with 35 additions and 3 deletions

View file

@ -321,6 +321,9 @@ namespace AST
static AstNode *mkconst_str(const std::vector<RTLIL::State> &v);
static AstNode *mkconst_str(const std::string &str);
// helper function to create an AST node for a temporary register
AstNode *mktemp_logic(const std::string &name, AstNode *mod, bool nosync, int range_left, int range_right, bool is_signed);
// helper function for creating sign-extended const objects
RTLIL::Const bitsAsConst(int width, bool is_signed);
RTLIL::Const bitsAsConst(int width = -1);