diff --git a/Makefile b/Makefile index 1a021efe2..bc102f5e4 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,7 @@ ifeq ($(OS), Haiku) CXXFLAGS += -D_DEFAULT_SOURCE endif -YOSYS_VER := 0.55+46 +YOSYS_VER := 0.55+112 YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1) YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2) YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'.' -f3) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 05621d857..4d8c57ced 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1759,7 +1759,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin break; if (type == AST_GENBLOCK) break; - if (type == AST_CELLARRAY && children[i]->type == AST_CELL) + if (type == AST_CELLARRAY && (children[i]->type == AST_CELL || children[i]->type == AST_PRIMITIVE)) continue; if (type == AST_BLOCK && !str.empty()) break; @@ -2752,6 +2752,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin if (new_cell->type == AST_PRIMITIVE) { input_error("Cell arrays of primitives are currently not supported.\n"); } else { + this->dumpAst(NULL, " "); log_assert(new_cell->children.at(0)->type == AST_CELLTYPE); new_cell->children.at(0)->str = stringf("$array:%d:%d:%s", i, num, new_cell->children.at(0)->str.c_str()); } diff --git a/tests/verilog/bug4785.ys b/tests/verilog/bug4785.ys new file mode 100644 index 000000000..174765983 --- /dev/null +++ b/tests/verilog/bug4785.ys @@ -0,0 +1,9 @@ +logger -expect error "Cell arrays of primitives are currently not supported" 1 +read_verilog <