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

Unexpected inversion when using inverted registered outputs #12

Open
and3rson opened this issue Nov 25, 2023 · 3 comments
Open

Unexpected inversion when using inverted registered outputs #12

and3rson opened this issue Nov 25, 2023 · 3 comments

Comments

@and3rson
Copy link

I've originally posted this issue in GALasm repo (daveho/GALasm#16 (comment)), but I can also reproduce this behavior in galette.

TL;DR: Consider the following equations:

/Q1.R = A * B
Q2.R = Q1

When assembled with galasm (or galette) and then disassembled with jed2eqn, I get the following equations:

/Q1 := A * B
Q2 := /Q1

This seems completely wrong, since Q2 clearly should be equal to Q1. Any thoughts?

@and3rson and3rson changed the title Unexpected inversion when defining equations Unexpected inversion when using inverted registered outputs Nov 25, 2023
@and3rson
Copy link
Author

FYI - GALasm maintainers confirmed that this is indeed a bug (see link in the previous post.)

@simon-frankau
Copy link
Owner

Hi. Sorry for not getting back to you earlier - I was off github for a while.

I'm slightly nervous about changing the behaviour if anyone's relying on it, even if it's wrong, but given that galasm has applied a fix, I reckon I can change this behaviour without worrying about breaking bug compatibility.

I will fix this when I have a moment.

Thanks!

simon-frankau added a commit that referenced this issue Mar 7, 2024
As pointed out in #12 ,
the GAL22V10 in registered mode is unusual - the feedback value is
always inverted, even if the output pin value is not. This was not
captured correctly in the code. This is hopefully fixed, along with
some new tests to keep an eye on this annoying corner case.
@simon-frankau
Copy link
Owner

I believe this should now be fixed in b1be5ae . If you have a moment to take a look, I'd appreciate it. If you see any issues, please do let me know. Cheers.

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

2 participants