Skip to content

Rewrite history (-fclash-debug-history) recording and/or viewer (clash-term) broken for the I2C example #2132

@leonschoorl

Description

@leonschoorl

First of all -fclash-debug-history is entirely broken on the current master and 1.6 branches since #2034:

$ cabal run -- clash --verilog -iexamples/i2c I2Ctest -fclash-no-cache -fclash-debug-history
[...]
<no location info>: error:
    Other error:
    history.dat: openBinaryFile: resource busy (file is locked)

But this is already fixed in #2074 with some locking.

Ignoring the issue above (by either using the branch from #2074, or before #2034 was merged), something is up with the I2C example specifically:

$ cabal run -- clash -fclash-debug-history -fclash-no-cache --verilog -iexamples/i2c I2Ctest
[...]
$ cabal run -- clash-term history.dat
[...]
clash-term: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
  fromJust, called at src/Types.hs:152:17 in rewrite-inspector-0.1.0.11-fffc36564dd6ac2341484478919726154adfd0c820ddf8acc26956e212321853:Types

This problem seems specific to the I2C example, other examples I tried didn't have this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions