Skip to content

copilot-bluespec: Flip direction of interface in bluespec #677

@ivanperez-keera

Description

@ivanperez-keera

Description

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.

Further notes

None.

Metadata

Metadata

Assignees

Labels

CR:Status:VerificationAdmin only: Change request that is currently being verifiedCR:Type:FeatureAdmin only: Change request pertaining to new features requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions