Well-formedness of done signals
#788
Replies: 1 comment 2 replies
-
|
I agree that both of these examples are clearly examples of mistakes based on our current interpretation of To think about what might be a good condition to put on the code, I think it would be best to reason about the exact correspondence between the static conditions and the dynamic behavior that constitutes a "correct" use of I think the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been a little more deeply about what makes the
donesignal of a group and a component to be well-formed. Here are a few examples ofdoneconditions that don't make sense.Examples
doneconditions:The likely intention of the program is to say that the group is done when both registers
reg0andreg1have set theirdonesignal high once. However, in reality, this says that the group is done in the cycle whenreg0andreg1simultaneously set their done signals high.To encode the intended behavior, we need some state:
doneconditions:Here is a
donecondition I was recently thinking about:This component says that its
donewhencount - in == 10. However, theeqcomponent is combinational which means that when the component is invoked, we'll have something like:Which means that the assignment
eq.leftetc. will have a guard that depends oneq.outcreating a combinational loop.A Well-Formedness Definition
One possible definition for well-formedness is that only signals that have the
@doneannotation or@stableannotation can be assigned as the right hand side of a done condition and logical combinations thereof. Using this definition, we have:&is neither@donenor@stablewhereasoutsignal of registers is@stablewhich means the logical and is also@stable.eq.outis not@stablenor@done.I'm not sure if this definition is actually the right one but it's a start.
Beta Was this translation helpful? Give feedback.
All reactions