Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of a primitive in tutorial is outdated #2631

Open
DigitalBrains1 opened this issue Dec 21, 2023 · 0 comments
Open

Example of a primitive in tutorial is outdated #2631

DigitalBrains1 opened this issue Dec 21, 2023 · 0 comments

Comments

@DigitalBrains1
Copy link
Member

DigitalBrains1 commented Dec 21, 2023

We have this example. But at a glance there are several things wrong:

  1. It matches on (Clock _) which does not type-check (we have a second argument these days).
  2. It uses NOINLINE. I don't think we should use CLASH_OPAQUE either; I think we should point out people should probably use a relatively recent GHC and OPAQUE for their own primitives. And perhaps point out that if they choose an old GHC nonetheless, they should use NOINLINE.
  3. We enhanced that specific primitive in a number of ways. We should decide whether we simplify the real code, present the real code or present a different primitive altogether to keep the discussion focussed. One of the enhancements that stands out to me is that we reduced the number of formal arguments to improve simulation performance. We also improved handling of XExceptions a lot.

Point 2 will apply to more documentation, by the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant