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

Emit a diagnostic if a reset_less signal is found driven from comb domain #379

Closed
whitequark opened this issue May 5, 2020 · 6 comments
Closed

Comments

@whitequark
Copy link
Member

reset_less does nothing for comb signals, so this is likely indicative of a bug. (Undriven signals are fine; they can end up being used for all sorts of reasons.)

@programmerjake
Copy link
Contributor

This could cause problems for Libre-SOC, since we use reset_less in quite a few places, including tons where the signals are combinatorially driven.

@whitequark
Copy link
Member Author

@programmerjake Could you explain how LibreSOC uses reset_less comb signals? If there isn't a more idiomatic way to do what you need, I'm going to abandon this idea and update the (in-progress) language guide to explain that it's sometimes necessary.

@programmerjake
Copy link
Contributor

In lots of the constructors for different data types, we set reset_less there, those constructors don't have an option to skip setting reset_less. Those data types are then used for both sync and comb logic.

@whitequark
Copy link
Member Author

Do you have a specific example?

@programmerjake
Copy link
Contributor

https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/fpcommon/packdata.py;h=40cd7e1821a5a76495a1e3a104ce59fb488b03a6;hb=HEAD

That's the type used as the output data type of several different pipeline stages, where there's a combinatorial block that assigns the member Signals the correct values, that combinatorial block is then used from a completely generic class that creates more instances of the type and uses them for the pipeline registers, showing you where it's used would be pretty complex because we have multiple layers of generic code.

@whitequark
Copy link
Member Author

OK, that's reasonable. Let's commit to reset_less being ignored on combinatorial signals, then.

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

No branches or pull requests

2 participants