You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
copilot-bluespec: Flip direction of interface in bluespec #677
The current Bluespec backend leads to Verilog code that requires manual manipulations in order to work correctly. Specifically, Copilot externs, which are inputs to the Copilot monitoring system, are treated as /outputs/ in Verilog, and Copilot triggers, which can be considered outputs of the monitoring system, are treated as /inputs/. This is the opposite of the interface that we would like users to work with, and of what other backends generate (e.g., C99).
Type
Feature: Update backend to generate code that matches other backends and requires no changes.
Additional context
None.
Requester
Sukhman Kahlon (NASA).
Method to check presence of bug
Not applicable (not a bug).
Expected result
Externs in Copilot are translated into Bluespec code that, when compiled, become inputs in Verilog. Conversely, triggers (and trigger arguments) are translated into Bluespec code that, when compiled, become outputs in Verilog.
Desired result
Externs in Copilot are translated into Bluespec code that, when compiled, become inputs in Verilog. Conversely, triggers (and trigger arguments) are translated into Bluespec code that, when compiled, become outputs in Verilog.
Proposed solution
Modify the existing Bluespec backend to perform the necessary changes in how the interface is generated, as well as any additional definitions (wires, etc.) needed. Modify the definition of the generated Bluespec interface files to match the intention.
Adjusts tests to match the updated interface.
Adjust documentation of the Bluespec backend to match.
The solution proposed produces the expected result. Details:
The following Dockerfile checks that the existing FPGA example can be compiled, executed, and that the execution matches the expectation for the first 10 lines of output, both in the Bluespec simulator and in iverilog without any changes to the Verilog code, and it checks the same for an additional example that produces the Fibonacci sequence, after which it prints the message "Success":
Command (substitute variables based on new path after merge):
$ docker run -e REPO=https://github.com/GaloisInc/copilot-1 -e NAME=copilot-1 -e COMMIT=dab5669f4459bcea5a624b4357c46552c8f40c49 copilot-verify-677
Implementation is documented. Details:
The new code includes comments, and the DESIGN.md document is updated to match new implementation.
Change history is clear.
Commit messages are clear.
Changelogs are updated.
Examples are updated. Details:
The existing example is tested by the Dockerfile; the documentation will need to be updated to reflect the new, simpler linking process.
Required version bumps are evaluated. Details:
Bump required; change modifies interface of the code produced by Bluespec backend.
Activity
ivanperez-keera commentedon Nov 2, 2025
Change Manager: Confirmed that the issue exists.
ivanperez-keera commentedon Nov 2, 2025
Technical Lead: Confirmed that the issue should be addressed.
ivanperez-keera commentedon Nov 2, 2025
Technical Lead: Issue scheduled for fixing in Copilot 4.6.
Fix assigned to: @RyanGlScott .
13 remaining items
copilot-bluespec: Flip direction of interface inputs and outputs in B…
copilot-bluespec: Update Copilot.Compile.Bluespec.Compile to reflect …
copilot-bluespec: Update test suite to match new input/output order. …
copilot-bluespec: Update DESIGN.md to reflect new input/output order.…
copilot-bluespec: Document changes in CHANGELOG. Refs Copilot-Languag…
copilot-bluespec: Update Copilot.Compile.Bluespec.Compile to reflect …
copilot-bluespec: Update test suite to match new input/output order. …
copilot-bluespec: Update DESIGN.md to reflect new input/output order.…
copilot-bluespec: Document changes in CHANGELOG. Refs Copilot-Languag…
ivanperez-keera commentedon Nov 8, 2025
Change Manager: Verified that:
Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/276773685
The following Dockerfile checks that the existing FPGA example can be compiled, executed, and that the execution matches the expectation for the first 10 lines of output, both in the Bluespec simulator and in
iverilogwithout any changes to the Verilog code, and it checks the same for an additional example that produces the Fibonacci sequence, after which it prints the message "Success":The new code includes comments, and the
DESIGN.mddocument is updated to match new implementation.The existing example is tested by the Dockerfile; the documentation will need to be updated to reflect the new, simpler linking process.
Bump required; change modifies interface of the code produced by Bluespec backend.
ivanperez-keera commentedon Nov 8, 2025
Change Manager: Implementation ready to be merged.
Merge branch 'develop-hardware-friendly-bluespec'. Close Copilot-Lang…