Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d ?= dx or d ?= du - Both are always FALSE. #750

Closed
JimLewis opened this issue Sep 29, 2021 · 1 comment
Closed

d ?= dx or d ?= du - Both are always FALSE. #750

JimLewis opened this issue Sep 29, 2021 · 1 comment
Milestone

Comments

@JimLewis
Copy link

In https://github.com/VUnit/vunit/blob/master/examples/vhdl/array_axis_vcs/src/fifo.vhd#L44
assert always (not rst and wr -> not (d ?= dx or d ?= du))@rising_edge(clkw)
report "wrote X|U to FIFO";

With "?=" when one operand is an 'X' or a 'U' it only returns '1' when the other value is a '-', otherwise, it returns 'X' or 'U'. Probably not what you want

I think you need a regular "="

@tmeissner
Copy link
Contributor

tmeissner commented Oct 23, 2021

I don't like or use these VHDL-08 operators anyway, as they aren't that transparent for me. Now I would write something like this:

assert always (not rst and wr ->  to_x01(or d) /= 'X')@rising_edge(clkw) report "wrote X|U to FIFO";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants