google / google/xls

Suggested Documentation Changes to "Tutorial: for expressions"

Open
#1,250 0 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

[doc link](https://google.github.io/xls/tutorials/crc32/)

* Add a link to [dslx_reference/#for-expression](https://google.github.io/xls/dslx_reference/#for-expression)

* The [full implementation](https://github.com/google/xls/blob/main/xls/examples/dslx_intro/crc32_one_byte.x) includes a comment link https://www.hackersdelight.org/hdcodetxt/crc.c.txt, which is now broken; https://web.archive.org/web/20190108202303/http://www.hackersdelight.org/hdcodetxt/crc.c.txt still works. We might want to use a more canonical version, if possible

* Function prototype
* In `The loop signature:` section, numbered bullet items appear inline and should be sub-bullet items

* In `The loop signature:` section, `An (index, ) tuple` should be `An (index,accumulator ) tuple`

* In `The loop body:` section, `In a for loop, this "return" value is either used as the input to the next iteration of the loop (for non-terminal iterations)` this is slightly confusing, since `input` is not well-defined; maybe more clear to say `the "return" value is used as the `_`accumulator`_` value for the next iteration of the loop (for non-terminal iterations)`

* In `The loop body:` section. the example implementation uses `_` for the accumulator but the tutorial uses `i`. Change on to match the other

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.