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

Documentation and minor plugin changes. #1573

Merged
merged 5 commits into from
Sep 14, 2020
Merged

Conversation

azidar
Copy link
Contributor

@azidar azidar commented Aug 29, 2020

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?
  • N/A 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

  • bug fix
  • documentation
  • code refactoring

API Impact

Moves the plugin API to a separate package, rather than being in experimental. Should only affect the release candidate, but since its a new API there is no backwards compatibility issues.

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference.

Release Notes

Added documentation for the new Chisel naming plugin, viewable on our website!

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.0, 3.5.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@azidar azidar requested a review from a team as a code owner August 29, 2020 00:30
@azidar azidar requested review from chick and removed request for a team August 29, 2020 00:30
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

Some thoughts and suggestions. Some comments are more musings than actual suggestions.

core/src/main/scala/chisel3/plugin/package.scala Outdated Show resolved Hide resolved
docs/src/cookbooks/naming.md Show resolved Hide resolved
docs/src/cookbooks/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Show resolved Hide resolved
docs/src/explanations/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Show resolved Hide resolved
docs/src/cookbooks/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mwachs5 mwachs5 left a comment

Choose a reason for hiding this comment

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

drive by comment :) 👍

docs/src/explanations/naming.md Outdated Show resolved Hide resolved
docs/src/explanations/naming.md Outdated Show resolved Hide resolved

### All this prefixing is annoying, how do I fix it?

You can use the `noPrefix { ... }` to strip the prefix from all signals generated in that scope.
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that noPrefix only strips the 1 level of prefix, it doesn't remove all prefixes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure that's true? I think it clears all prefixes?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it does:

def buzz(arg: UInt) = {
  val x = c + arg
  b + x
}

def fizz(arg: UInt) = {
  val y = buzz(arg)
  a + y
}

import chisel3.experimental.prefix
import chisel3.experimental.noPrefix

val foo = prefix("jack")(fizz(3.U))
val bar = noPrefix(fizz(128.U))

out := foo + bar

gives

wire [7:0] foo_jack_y_x = c + 8'h3;
wire [7:0] foo_jack_y = b + foo_jack_y_x;
wire [7:0] foo = a + foo_jack_y;
wire [7:0] y_x = c + 8'h80;
wire [7:0] y = b + y_x;
wire [7:0] bar = a + y;
assign out = foo + bar;

@azidar azidar added this to the 3.4.0 milestone Sep 14, 2020
@azidar azidar added the Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. label Sep 14, 2020
@mergify mergify bot merged commit 69e27b2 into master Sep 14, 2020
jackkoenig added a commit that referenced this pull request Feb 28, 2023
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@jackkoenig jackkoenig deleted the write-naming-documentation branch June 9, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants