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

Fix comparison of data types (#5005) #5008

Closed
wants to merge 1 commit into from

Conversation

tastynoob
Copy link
Contributor

No description provided.

@wsnyder
Copy link
Member

wsnyder commented Mar 22, 2024

Need a test case.

@wsnyder wsnyder changed the title fix #5005 Fix comparison of data types (#5005) Mar 22, 2024
@wsnyder wsnyder linked an issue Mar 22, 2024 that may be closed by this pull request
@tastynoob
Copy link
Contributor Author

as i said, is hard to find a small test from my designed CPU, because this bug may occur in complex situations.
(actually i am not familiar with the verilator source code, hard to create a test through reverse analysis)
i can provide my project for testing

@wsnyder
Copy link
Member

wsnyder commented Mar 23, 2024

Without a small test it's likely it will break again.

@wsnyder wsnyder requested a review from RRozak March 26, 2024 00:06
@RRozak
Copy link
Member

RRozak commented Mar 26, 2024

I am not sure if it is correct. I think it is possible that two types that should be considered the same are different AST objects. Generally, types should be compared with similarDType method. If it doesn't work, there is probably a bug.

@tastynoob
Copy link
Contributor Author

I am not sure if it is correct. I think it is possible that two types that should be considered the same are different AST objects. Generally, types should be compared with similarDType method. If it doesn't work, there is probably a bug.

sure, i will try it
but so far i haven't found a small test

@tastynoob
Copy link
Contributor Author

i think i find the real problem
the wavedump's value is not real value
a simple case:

assign a = 0;
assign a = 1;

the wavedump's value is 0, but the real value is 1
this pr will make wavedump's value equal real value and final both equal 0

@tastynoob
Copy link
Contributor Author

this made me misjudge
i think need another way to fix it
this pr can close

@wsnyder wsnyder closed this Apr 1, 2024
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

Successfully merging this pull request may close these issues.

Fix comparison of data types
3 participants