Skip to content

Commit

Permalink
[nfc] Use EBNF for ABI probe macros, filename
Browse files Browse the repository at this point in the history
Minor cleanup to the ABI section on probes and port lowering ABIs.  Use
EBNF code blocks to make these easier to read.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
  • Loading branch information
seldridge committed Jan 12, 2024
1 parent 49fed0e commit 0bcb4e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,18 @@ module Top(

Ports of aggregate type shall be scalarized according to the "Aggregate Type Lowering" description in the FIRRTL spec.

Ports of ref type on public modules shall, for each public module, be lowered to a Verilog macro of the form `` `define ref_<module name>_<portname> <internal path from module> `` in a file with name `ref_<module name>.sv`.
Ports of ref type on public modules shall, for each public module, be lowered to a Verilog macro with the following format where `module` is the name of the public module, `portname` is the name of the port, and `internalpath` is the hierarchical path name:

``` ebnf
macro = "`define " , "ref_" , module , "_" , portname , " ", internalpath
```

All macros for a public module will be put in a file with name:

``` ebnf
filename = "ref_" , module , ".sv"
```

References to aggregates will be lowered to a series of references to ground types.
This ABI does not specify whether the original aggregate referent is scalarized or not.

Expand Down
1 change: 1 addition & 0 deletions revision-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ revisionHistory:
- Add ABI for public modules and filelist output.
- Changed ABI for group and ref generated files.
These now use the public module and not the circuit.
- Use EBNF to describe probe port macros and filename.
# Information about the old versions. This should be static.
oldVersions:
- version: 3.2.0
Expand Down

0 comments on commit 0bcb4e2

Please sign in to comment.