Fixes #5974. Co-authored-by: Maksim Fonarev <fonarickm@yandex.ru>
This commit is contained in:
parent
49716995fa
commit
94f8181cff
1
Changes
1
Changes
|
|
@ -46,6 +46,7 @@ Verilator 5.047 devel
|
|||
* Fix recursive default assignment for sub-arrays (#4589) (#7202). [Julian Carrier]
|
||||
* Fix shift width mismatch in constraint solver SMT emission (#5420) (#7265). [Yilou Wang]
|
||||
* Fix randomize size+element queue constraints (#5582) (#7225). [Rahul Behl, Testorrent USA, Inc.]
|
||||
* Fix null assignment to virtual interfaces (#5974) (#5990). [Maxim Fonarev]
|
||||
* Fix lambda coroutines (#6106) (#7135). [Nick Brereton]
|
||||
* Fix super constructor calls with local variables (#6214) (#6933). [Igor Zaworski, Antmicro Ltd.]
|
||||
* Fix false recursive definition error (#6769) (#7118). [Alex Zhou]
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ Mateusz Gancarz
|
|||
Matt Stroud
|
||||
Matthew Ballance
|
||||
Max Wipfli
|
||||
Maxim Fonarev
|
||||
Michael Bedford Taylor
|
||||
Michael Bikovitsky
|
||||
Michael Killough
|
||||
|
|
|
|||
|
|
@ -1931,7 +1931,10 @@ public:
|
|||
|
||||
struct VlNull final {
|
||||
operator bool() const { return false; }
|
||||
bool operator==(const void* ptr) const { return !ptr; }
|
||||
template <class T>
|
||||
operator T*() const {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
inline bool operator==(const void* ptr, VlNull) { return !ptr; }
|
||||
|
||||
|
|
|
|||
|
|
@ -8676,7 +8676,9 @@ class WidthVisitor final : public VNVisitor {
|
|||
= VN_CAST(expDTypep->skipRefp(), IfaceRefDType)) {
|
||||
const AstIfaceRefDType* underIfaceRefp
|
||||
= VN_CAST(underp->dtypep()->skipRefp(), IfaceRefDType);
|
||||
if (!underIfaceRefp) {
|
||||
if (VN_IS(underp, Const) && VN_AS(underp, Const)->num().isNull()) {
|
||||
// '= null' is ok
|
||||
} else if (!underIfaceRefp) {
|
||||
underp->v3error(ucfirst(parentp->prettyOperatorName())
|
||||
<< " expected " << expIfaceRefp->ifaceViaCellp()->prettyNameQ()
|
||||
<< " interface on " << side << " but " << underp->prettyNameQ()
|
||||
|
|
|
|||
|
|
@ -34,10 +34,21 @@ module t;
|
|||
Clsgen #(virtual PBus) gen;
|
||||
|
||||
initial begin
|
||||
if (va != null) $stop;
|
||||
if (null != va) $stop;
|
||||
va = null;
|
||||
if (va != null) $stop;
|
||||
if (null != va) $stop;
|
||||
va = ia;
|
||||
vb = ia;
|
||||
|
||||
if (va == null) $stop;
|
||||
if (null == va) $stop;
|
||||
va = null;
|
||||
if (va != null) $stop;
|
||||
if (null != va) $stop;
|
||||
va = ia;
|
||||
if (va != ia) $stop;
|
||||
|
||||
vb = ia;
|
||||
|
||||
$display("va==vb? %b", va == vb);
|
||||
$display("va!=vb? %b", va != vb);
|
||||
|
|
|
|||
Loading…
Reference in New Issue