问题标签 [bluespec]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
bluespec - Write only once to register in a given cycle?
Background
It has been my understanding of the various BlueSpec presentations and docs that two rules can not be run in the same cycle if they both modify the same register.
For example, I've read from "BSV By Example" (Amazon, other),
Similarly, certain hardware resource constraints, such as the fact that a hardware wire can only be driven with one value in each clock, will preclude some pairs of rules from executing together in a clock because they both need that resource. We call this a "rule resource conflict".
Similarly, Arvind @ MIT seems to say that "double-write errors" are not allowed.
Then
Recently I was reading through lesson "8.6 RWires and atomicity" and encountered code similar to the following:
Running this code results in:
I believe the following Warning (not Error!) message appears to be relevant:
Question
How is it possible that two rules (rule_update_final
and clear_counter
) that modify the same full
register are able to run in the same cycle?