Merge branch 'YosysHQ:main' into main

This commit is contained in:
Akash Levy 2025-05-05 15:36:40 -07:00 committed by GitHub
commit 7191be492c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 3 deletions

View File

@ -176,7 +176,7 @@ ifeq ($(OS), Haiku)
CXXFLAGS += -D_DEFAULT_SOURCE
endif
YOSYS_VER := 0.52+137
YOSYS_VER := 0.52+139
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)

View File

@ -1769,7 +1769,7 @@ value<BitsY> shr_uu(const value<BitsA> &a, const value<BitsB> &b) {
template<size_t BitsY, size_t BitsA, size_t BitsB>
CXXRTL_ALWAYS_INLINE
value<BitsY> shr_su(const value<BitsA> &a, const value<BitsB> &b) {
return a.shr(b).template scast<BitsY>();
return a.template scast<BitsY>().shr(b);
}
template<size_t BitsY, size_t BitsA, size_t BitsB>

View File

@ -2249,7 +2249,8 @@ cell_parameter:
node->children.push_back($1);
} |
'.' TOK_ID '(' ')' {
// just ignore empty parameters
// delete unused TOK_ID
delete $2;
} |
'.' TOK_ID '(' expr ')' {
AstNode *node = new AstNode(AST_PARASET);

View File

@ -0,0 +1,24 @@
logger -expect-no-warnings
read_verilog << EOF
module bar (
input portname
);
parameter paramname = 7;
endmodule
module empty (
);
bar #() barinstance ();
endmodule
module implicit (
);
bar #(.paramname()) barinstance (.portname());
endmodule
module explicit (
input a
);
bar #(.paramname(3)) barinstance (.portname(a));
endmodule
EOF