clash-lang / clash-lang/clash-protocols

`Df.fifo` has unnecessary longer combinational path on ready

Open
#172 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
25
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Df.fifo has an ack/ready that depends on the the state of the fifo and the input to the fifo:

https://github.com/clash-lang/clash-protocols/blob/23869c2345cb9dd296602b0b42b6de85b25c25c8/clash-protocols/src/Protocols/Df.hs#L908

We can make it just depend on the state while remaining protocol compliant, making for a shorter combinational path for complete systems, by doing:

``` haskell
otpAck = amtLeft0 > 0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the linked Df.fifo implementation in clash-protocols/src/Protocols/Df.hs around line 908. Inspect how ack/ready depends on FIFO state and input, then verify that the proposed state-only dependency remains protocol compliant. Done means the combinational path is shortened without changing FIFO behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
embedded-iot
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.