diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-05-27 11:42:10 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-05-27 11:42:10 +0200 |
commit | 34417ce55f1b1d71ac11dfdfecfffc7a3340b6cb (patch) | |
tree | c34b2325cec46c2bce83b23a47baf1e1d51c7cdc /frontends/ast/ast.h | |
parent | 2058c7c53bed0d2536b6962855271cd7229fbd52 (diff) | |
download | yosys-34417ce55f1b1d71ac11dfdfecfffc7a3340b6cb.tar.gz yosys-34417ce55f1b1d71ac11dfdfecfffc7a3340b6cb.tar.bz2 yosys-34417ce55f1b1d71ac11dfdfecfffc7a3340b6cb.zip |
Added support for unsized constants, fixes #1022
Includes work from @sumit0190 and @AaronKel
Diffstat (limited to 'frontends/ast/ast.h')
-rw-r--r-- | frontends/ast/ast.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/ast/ast.h b/frontends/ast/ast.h index 281cbe086..f90e683ad 100644 --- a/frontends/ast/ast.h +++ b/frontends/ast/ast.h @@ -173,7 +173,7 @@ namespace AST // node content - most of it is unused in most node types std::string str; std::vector<RTLIL::State> bits; - bool is_input, is_output, is_reg, is_logic, is_signed, is_string, range_valid, range_swapped, was_checked; + bool is_input, is_output, is_reg, is_logic, is_signed, is_string, range_valid, range_swapped, was_checked, is_unsized; int port_id, range_left, range_right; uint32_t integer; double realvalue; @@ -262,6 +262,7 @@ namespace AST // helper functions for creating AST nodes for constants static AstNode *mkconst_int(uint32_t v, bool is_signed, int width = 32); + static AstNode *mkconst_bits(const std::vector<RTLIL::State> &v, bool is_signed, bool is_unsized); static AstNode *mkconst_bits(const std::vector<RTLIL::State> &v, bool is_signed); static AstNode *mkconst_str(const std::vector<RTLIL::State> &v); static AstNode *mkconst_str(const std::string &str); @@ -269,6 +270,7 @@ namespace AST // helper function for creating sign-extended const objects RTLIL::Const bitsAsConst(int width, bool is_signed); RTLIL::Const bitsAsConst(int width = -1); + RTLIL::Const bitsAsUnsizedConst(int width); RTLIL::Const asAttrConst(); RTLIL::Const asParaConst(); uint64_t asInt(bool is_signed); |