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

Transfer clash-cores tests in clash-testsuite to clash-cores #3

Merged
merged 39 commits into from
Aug 26, 2024

Conversation

t-wallet
Copy link
Collaborator

@t-wallet t-wallet commented Aug 26, 2024

Repeat this PR

git remote add temp git@github.com:clash-lang/clash-compiler
git fetch temp
# The hash refers to the commit before "remove clash-cores from clash-testsuite".
git branch temp_branch 280905d3f9754ee9656522d593fed33005f56263
git checkout temp_branch

git subtree split --prefix=tests/shouldfail/Cores -b shouldfail-cores
git subtree split --prefix=tests/shouldwork/Cores -b shouldwork-cores

git checkout transfer-clash-testsuite

git subtree add --prefix=tests/shouldfail/Cores shouldfail-cores
git subtree add --prefix=tests/shouldwork/Cores shouldwork-cores

# Move the tests to their correct location
git mv tests/shouldfail/Cores/* tests/shouldfail/
git mv tests/shouldwork/Cores/* tests/shouldwork/
rmdir tests/shouldfail/Cores
rmdir tests/shouldwork/Cores
git mv tests/* test/
rmdir tests

# Cleanup
git branch -d shouldfail-cores
git branch -d shouldwork-cores
git branch -d temp_branch
git remote remove temp

DigitalBrains1 and others added 30 commits July 6, 2021 15:37
Single-precision floating point addition, realized through instantiation
of the Xilinx Floating-Point LogiCORE IP v7.1.
Single-precision floating point operations, realized through
instantiation of the Xilinx Floating-Point LogiCORE IP v7.1.
Also don't use `MagicHash` since it's not enabled by default for
`clash-testsuite`.
New in `clash-cores`: convert `Unsigned 32` to `Float` with Xilinx IP.
Only a limited number of configurations is supported; see module
documentation.

The Haskell model does not correspond exactly to RTL.

This closes bittide/bittide-hardware#59

Co-authored-by: Martijn Bastiaan <martijn@hmbastiaan.nl>
Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
New in `clash-cores`: convert `Signed 32` to `Float` with Xilinx IP.
PR #2345 made it possible to use multiple build targets in all tools.
This PR leverages that functionality, combining build targets that were
previously split over multiple top entity files.

Not counting Vivado, 90% of `clash-testsuite`'s execution time is spent
on Clash startup costs. These costs are shared between the multiple
build targets, making the test suite a bit quicker.
Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
Before adding the `KEEP` attribute to `vioProbe` ports, clash did
not generate valid VHDL since the types of vioProbe declaration
and instantiation did not match. This has been fixed, but to make
sure these bugs do not occur again the circuits in `shouldwork`
are now loaded in Vivado.

The circuits in `shouldwork` also did not produce valid VHDL, as
the words `in` and `out` are reserved. The names of ports have
been updated to produce valid VHDL.
A design with VIO probes is inspected (through the GUI of the
synthesis tool) when programmed on an FPGA. It therefore makes sense
to give each individual probe a logical name.

The names of in- and output ports should be given as two `Vec`tor of
`Strings`, where the length should match the number of probes.

Co-authored-by: Hidde Moll <hidde@qbaylogic.com>
A design with VIO probes is inspected (through the GUI of the
synthesis tool) when programmed on an FPGA. It therefore makes sense
to give each individual probe a logical name.

The names of in- and output ports should be given as two `Vec`tor of
`Strings`, where the length should match the number of probes.

Co-authored-by: Hidde Moll <hidde@qbaylogic.com>
Co-authored-by: Peter Lebbing <peter@digitalbrains.com>
* The HDL generated incorrectly set DEST_EXT_HSK=0,
   configuring it to generate acks automatically.
   While the exposed API and simulation model assumed external handshaking.
 * The dstStages and srcStages settings were flipped.

This also updates the test so it can detect that first error.
And improves the haddock a bit to clarify what the settings do and relate them to the XPM documentation.
Given a global binder `accum` and an application `f accum`, Clash
now calls the new, specialized binder `f_accum` instead of just
`accum`, provided that both are marked `NOINLINE`/`OPAQUE`. This
more accurately reflects the body of the function and will result
in more sensible file names. For example, previously Clash
would generate a separate file `accum.{v,vhdl}` that contained the
inlined bodies of both `f` and `accum`. After this patch, it will
generate `f_accum.{v,vhdl}`.

Tabulated the new behavior looks like:

| OPAQUE        | Old name for `f g` | New name for `f g` |
|---------------|--------------------|--------------------|
| `f`           | `g`                | `f`                |
| `g`           | `g`                | `g`                |
| `f` and `g`   | `g`                | `f_g`              |
| !`f` and !`g` | `g`                | `f_g`              |

Fixes #2508
leonschoorl and others added 9 commits April 7, 2024 10:26
XpmCdcSingle was using as iots test signal:
  fromList [0..] :: Signal dom (Unsigned 1)
which evaluates to 0 :> 1 :> errorX "finite list".
When that flows though sample . fmap pack . unsafeSynchronizer it turns
into
  [0b0, 0b1, 0b., 0b., 0b., ...

Now we use the random package to generate random test data.
And the seed is also randomly generated via TH on each compile.
So everytime you recompile you get different test data.
Co-authored-by: Martijn Bastiaan <martijn@hmbastiaan.nl>
Combine function names when specializing
…c42f0e5788589c'

git-subtree-dir: tests/shouldfail/Cores
git-subtree-mainline: e205083
git-subtree-split: 4a6a82a
…f30958fac33374'

git-subtree-dir: tests/shouldwork/Cores
git-subtree-mainline: 6e65384
git-subtree-split: 25b6699
@t-wallet t-wallet changed the title Transfer clash-cores tests in clash-testsuite Transfer clash-cores tests in clash-testsuite to clash-cores Aug 26, 2024
@t-wallet t-wallet merged commit 2dee5a3 into main Aug 26, 2024
@t-wallet t-wallet deleted the transfer-clash-testsuite branch August 26, 2024 13:08
@t-wallet t-wallet mentioned this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants