ucb-bar / ucb-bar/berkeley-hardfloat

MulAddRecFN infinite loops in Chisel elaboration if called with the wrong inputs (expWidth, sigWidth)

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
393
Forks
111
PR merge metrics
No merged PRs in 30d

Description

There needs to be some enforcement/requirements on the inputs into the hardfloat units (e.g., MulAddRecFN) to catch infinite loops during Chisel elaboration before they occur.

In my particular use-case, the order of the input parameters expWidth and sigWidth had swapped, so I was unknowingly setting expWidth = 52, sigWidth = 12. I am directly instantiating rocket.FPUFMAPipe, which also swapped these parameters, so I never noticed the changes made to hardfloat (the changes to the recoding units was less problematic, since the function name also changed).

I believe the particular infinite loop occurs within MulAddRecFN_postMul, but it's not immediately obvious how.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading MulAddRecFN and MulAddRecFN_postMul, then compare their expWidth and sigWidth parameters with the direct rocket.FPUFMAPipe instantiation described in the issue. Trace the elaboration path for expWidth = 52 and sigWidth = 12; done means invalid widths are rejected before elaboration can enter an infinite loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.