Skip to content

Commit

Permalink
Fix a few more minor issues in documentation.
Browse files Browse the repository at this point in the history
* Correctly stylize a few notes in DSLX std library docs.
* Fix typo in IR overview.

PiperOrigin-RevId: 643128163
  • Loading branch information
mikex-oss authored and Copybara-Service committed Jun 13, 2024
1 parent 586178f commit df600d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions docs_src/dslx_std.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ built-in -- in language implementor parlance it is a *higher order function*.
Implementation note: Functions are not first class values in the DSL, so the
name of the function must be referred to directly.

Note: Novel higher order functions (e.g. if a user wanted to write their own
`map`) cannot currently be written in user-level DSL code.
!!! NOTE
Novel higher order functions (e.g. if a user wanted to write their own
`map`) cannot currently be written in user-level DSL code.

### `zip`

Expand Down Expand Up @@ -590,9 +591,10 @@ I0607 10:11:02.908208 810431 shifty.x:8] y as s8: -1
[...]
```

Note: `trace!` currently exists as a builtin but is in the process of being
removed, as it provided the user with only a "global flag" way of specifying the
desired format for output values -- `trace_fmt!` is more powerful.
!!! NOTE
`trace!` currently exists as a builtin but is in the process of being
removed, as it provided the user with only a "global flag" way of specifying the
desired format for output values -- `trace_fmt!` is more powerful.

### `fail!` / `assert!`: assertion failure

Expand All @@ -613,9 +615,10 @@ assert!(predicate: bool, label: u8[N]) -> ()
These can be thought of as "fatal assertions", and convert to
Verilog/SytemVerilog assertions in generated code.

Note: XLS hopes to permit users to optionally insert fatal-error-signaling
hardware that correspond to these operations. See
https://github.com/google/xls/issues/1352
!!! NOTE
XLS hopes to permit users to optionally insert fatal-error-signaling
hardware that correspond to these operations. See
https://github.com/google/xls/issues/1352

`fail!` indicates a **control path that should not be reachable**, `assert!`
gives a **predicate that should always be true** when the statement is reached.
Expand Down
2 changes: 1 addition & 1 deletion docs_src/ir_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ to be introduced. Specifically:

* XLS has a single IR representation which is used from the front-end down to
the RTL-level. A single representation throughout the compiler enables
maximal resuse of analysis and transformation components. Often compilers
maximal reuse of analysis and transformation components. Often compilers
have different specialized IRs (or "dialects") for different levels of
abstraction which can add complexity and inhibit reusability. However, in
XLS this tradeoff between specialization and reusability is unnecessary
Expand Down

0 comments on commit df600d5

Please sign in to comment.