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

Remove KnowDomain #2589

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft

Remove KnowDomain #2589

wants to merge 27 commits into from

Commits on Oct 11, 2023

  1. Cleanup clash-lib.cabal

    leonschoorl committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    02015b0 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Improve blackbox error message

    This changes the error when using non-existant arguments in blackboxes 
    from:
    
      Blackbox required at least 32 arguments, but only 8 were passed.
    
    to the new error:
    
      Blackbox used "~ISSYNC[31]" , but only 8 arguments were passed.
    leonschoorl committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    930f1ce View commit details
    Browse the repository at this point in the history
  2. Refactor Test.Tasty.Clash

    So it'll be easier to keep the temp directory
    leonschoorl committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    280dec1 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Configuration menu
    Copy the full SHA
    b2d85eb View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Fix prettyElem bugs

    It now correctly "escapes" square brackets in the right places.
    And correctly brackets the second argument of ~SIGD
    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c5f2368 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e7a228 View commit details
    Browse the repository at this point in the history
  3. Add prim-yaml-to-inlineyaml tool

      Utility that can convert blackboxes from clash-lib .primitives.yaml files
      to InlineYamlPrimitive ANNotations.
    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    25f21f2 View commit details
    Browse the repository at this point in the history
  4. Allow blackbox templates to get domain info from Clock,Reset,Enable,etc

    You can now use ~PERIOD, ~ISSYNC, ~ISINITDEFINED and ~ACTIVEEDGE
    on arguments of type Clock,Reset,Enable,ClockN and DiffClock.
    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c6f7316 View commit details
    Browse the repository at this point in the history
  5. Put a KnownDomain constraint inside of Clock and Reset

    This allows the removal of the KnownDomain constraint on
    functions which take a Clock and/or a Reset/
    Which is most of them.
    
    The only functions that still need a KnownDomain constraint
    should be the ones creating Clocks and/or Resets.
    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c08b624 View commit details
    Browse the repository at this point in the history
  6. Add class HasKnownDomain

    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    55b117e View commit details
    Browse the repository at this point in the history
  7. Add ZKnownDomain dummy contraint

     * ZKnownDomain is used only blackboxes, it used to replace the KnownDomain there,
       so we can postpone the renumbering of arguments
    leonschoorl committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    d9b940e View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Remove KnownDomain from clash-lib/prims

    For the more complex ones I've replaced KnownDomain
    with the a dummy ZKnownDomain constraint,
    so the argument numbers stay the same for now.
    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    bfe4968 View commit details
    Browse the repository at this point in the history
  2. Clash.*.ClockGen PLLs

    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    d52aef3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b585e18 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0df8aa5 View commit details
    Browse the repository at this point in the history
  5. Remove now unused KnownDomain constraints

    For some functions we add explicit foralls, so the order of the type 
    arguments stays the same.
    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    1d3e7f7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8d6c648 View commit details
    Browse the repository at this point in the history
  7. Simplify Clash.Primitives.DSL.unsafeToActive[High,Low]

    You don't need to provide a KnownDomain anymore
    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    1902d62 View commit details
    Browse the repository at this point in the history
  8. clash-cores

    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    e98bbe9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    133d6bb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7e352ab View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ed8ade6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5454fee View commit details
    Browse the repository at this point in the history
  13. Move YAML prims with dummy ZKnownDomain constraints into inline yaml

    The conversion was done automatically by running:
      cabal run -- prim-yaml-to-inlineyaml
    Clash.Explicit.BlockRam.blockRamU# Clash.Explicit.BlockRam.blockRam1#
    Clash.Explicit.BlockRam.blockRam#
    Clash.Explicit.BlockRam.Blob.blockRamBlob#
    Clash.Explicit.BlockRam.File.blockRamFile# Clash.Explicit.RAM.asyncRam#
    Clash.Explicit.ROM.rom# Clash.Explicit.ROM.Blob.romBlob#
    Clash.Explicit.ROM.File.romFile# Clash.Explicit.Testbench.assert
    Clash.Explicit.Testbench.assertBitVector Clash.Signal.Internal.delay#
    Clash.Signal.Internal.register# Clash.Signal.Internal.asyncRegister#
    
    Then the annotations were manually moved to be next to their haskell
    definitions.
    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    f08bdc0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c896f21 View commit details
    Browse the repository at this point in the history
  15. Apply CLASH_MULTIPLE_HIDDEN to clash-prelude:doctests

    Current doctest(-parallel) can't pickup such defines automatically, so 
    we have to do it manually.
    
    And also define CLASH_OPAQUE, to prevent a ton of warnings.
    leonschoorl committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    e28b372 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8dae71e View commit details
    Browse the repository at this point in the history