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

Unstable reads #304

Open
rachitnigam opened this issue Dec 10, 2020 · 1 comment
Open

Unstable reads #304

rachitnigam opened this issue Dec 10, 2020 · 1 comment
Labels
S: Available Can be worked upon Type: Paper cut Spurious or confusing errors Type: Pass Proposal to implement a pass

Comments

@rachitnigam
Copy link
Contributor

rachitnigam commented Dec 10, 2020

A pass that marks ports as stable or unstable depending on where they receive values from. If the value comes from a continuous assignment rooted in stateful elements, the read is stable. Otherwise it is unstable.

component foo(in: 32) -> (out: 32) {
  cells { }
  wires { out = in; }
  control { }
}
component main() -> (out: 32) {
  cells { f = foo; }
  wires {
    out = f.out; // unstable read because f.out depends on f.go and f.in being high.
  }
}
@rachitnigam rachitnigam added Type: Paper cut Spurious or confusing errors Type: Bug Bug in the implementation Type: Pass Proposal to implement a pass and removed Type: Bug Bug in the implementation labels Dec 10, 2020
@rachitnigam
Copy link
Contributor Author

With #715 merged, this can be implemented as a check to propagate and reject invalid uses of @stable ports. If the output port of a component is unconditionally connected to a @stable port then that port is stable. Reads of ports that are not marked @stable from a group/control operator that does not run the corresponding component should be rejected because the port may not be stable.

@rachitnigam rachitnigam added the S: Available Can be worked upon label Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: Available Can be worked upon Type: Paper cut Spurious or confusing errors Type: Pass Proposal to implement a pass
Projects
None yet
Development

No branches or pull requests

1 participant