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

Espresso Decoder #1964

Merged
merged 7 commits into from
Jul 14, 2021
Merged

Espresso Decoder #1964

merged 7 commits into from
Jul 14, 2021

Conversation

sequencer
Copy link
Member

@sequencer sequencer commented Jun 16, 2021

1. Implement espresso wrapper.
2. upstream espresso.
3. add espresso CI. #2003
4. merge this PR

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • new feature/API

API Impact

Backend Code Generation Impact

Espresso generated PLA maybe different from QMC generated, for legacy QMC users, including SiFive and RocketChip users.
Decode circuit maybe different, but formally equivalent.

Desired Merge Strategy

  • Rebase: You will rebase the PR onto master and it will be merged with a merge commit.

Release Notes

Add Espresso Decoder

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (3.2.x, 3.3.x, 3.4.x, 3.5.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@jackkoenig
Copy link
Contributor

Can you rebase once #2003 is merged?

@sequencer
Copy link
Member Author

OK I'll rebase this.

@sequencer sequencer force-pushed the decoder branch 2 times, most recently from e15afc2 to eb7433e Compare July 12, 2021 20:56
@sequencer
Copy link
Member Author

@jackkoenig done:)

Comment on lines 66 to 73
case EspressoNotFoundException =>
logger.error(
"""espresso is not found in your PATH, fall back to QMC.
|Quine-McCluskey is a NP complete algorithm, may run forever or run out of memory in large decode tables.
|To get rid of this warning, please use `decoder.qmc` directly, or add espresso to your PATH.
|""".stripMargin
)
qmc(input, truthTable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sort of screwed up in my previous comments--since this is the generic API and we can always fall back to QMC, we should just catch all IOExceptions, but we should forward some of the error message instead of always suppressing and saying "espresso not found".

I think having the EspressoNotFoundException is good, but we also need to catch other java.io.Exceptions, and report a similar error message but perhaps include some information from the Exception in the logged message.

Copy link
Member Author

@sequencer sequencer Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4ecd25f should have implemented this.

@sequencer
Copy link
Member Author

@jackkoenig ask for taking a look again ;p

@jackkoenig jackkoenig merged commit 695864f into master Jul 14, 2021
@sequencer sequencer deleted the decoder branch July 14, 2021 18:41
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.

4 participants