Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
adkian-sifive committed Jul 21, 2022
1 parent ea028f9 commit ab0d499
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/chisel3/RawModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ abstract class RawModule(implicit moduleCompileOptions: CompileOptions) extends
case MemoryPortBinding(_, _) =>
id.forceName(default = "MPORT", _namespace)
case PortBinding(_) =>
id.forceName(None, default = "PORT", _namespace, true, x => ModuleIO(this, x))
id.forceName(default = "PORT", _namespace, true, x => ModuleIO(this, x))
case RegBinding(_, _) =>
id.forceName(default = "REG", _namespace)
case WireBinding(_, _) =>
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/scala/chisel3/internal/Builder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,13 @@ private[chisel3] trait HasId extends InstanceId {
// Will not do any naming if the reference already assigned.
// (e.g. tried to suggest a name to part of a Record)
private[chisel3] def forceName(
prefix: Option[String],
default: => String,
namespace: Namespace,
errorIfDup: Boolean = false,
refBuilder: String => Arg = Ref(_)
): Unit =
if (_ref.isEmpty) {
val candidate_name = _computeName(prefix, Some(default).filterNot(_ => errorIfDup)).get
val candidate_name = _computeName(Some(default).filterNot(_ => errorIfDup)).get
val available_name = namespace.name(candidate_name)
println(s"candidate: $candidate_name, available: $available_name")
if (errorIfDup && (available_name != candidate_name)) {
Expand Down

0 comments on commit ab0d499

Please sign in to comment.