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

Moved D/I internals to new core package #2488

Merged
merged 2 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/src/main/scala/chisel3/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ package experimental {

package internal {
import chisel3.experimental.BaseModule
import chisel3.experimental.hierarchy.{Clone, IsInstantiable, Proto}
import chisel3.experimental.hierarchy.core.{Clone, IsInstantiable, Proto}

object BaseModule {

Expand Down Expand Up @@ -392,11 +392,11 @@ package internal {

package experimental {

import chisel3.experimental.hierarchy.{IsInstantiable, Proto}
import chisel3.experimental.hierarchy.core.{IsInstantiable, Proto}

object BaseModule {
implicit class BaseModuleExtensions[T <: BaseModule](b: T) {
import chisel3.experimental.hierarchy.{Definition, Instance}
import chisel3.experimental.hierarchy.core.{Definition, Instance}
def toInstance: Instance[T] = new Instance(Proto(b))
def toDefinition: Definition[T] = new Definition(Proto(b))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package chisel3.experimental.hierarchy

import chisel3.experimental.hierarchy.core.Underlying
import scala.annotation.implicitNotFound

@implicitNotFound("These functions are only for building hierarchy-compatible Chisel libraries! Users beware!")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

import scala.language.experimental.macros
import chisel3._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

import chisel3._
import scala.collection.mutable.{HashMap, HashSet}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

import scala.collection.mutable.{ArrayBuffer, HashMap}
import scala.language.experimental.macros
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

/** While this is public, it is not recommended for users to extend directly.
* Instead, use the [[@instantiable]] annotation on your trait or class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

/** A User-extendable trait to mark metadata-containers, e.g. parameter case classes, as valid to return unchanged
* from an instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

import chisel3.experimental.BaseModule
import chisel3.internal.sourceinfo.SourceInfo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

package chisel3.experimental.hierarchy
package chisel3.experimental.hierarchy.core

import chisel3.internal.BaseModule.IsClone

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@ package object hierarchy {
* }}}
*/
class public extends chisel3.internal.public

type Instance[P] = core.Instance[P]
val Instance = core.Instance
type Definition[P] = core.Definition[P]
val Definition = core.Definition
type Hierarchy[P] = core.Hierarchy[P]
val Hierarchy = core.Hierarchy
type IsInstantiable = core.IsInstantiable
type IsLookupable = core.IsLookupable
}
2 changes: 1 addition & 1 deletion core/src/main/scala/chisel3/internal/Builder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.util.DynamicVariable
import scala.collection.mutable.ArrayBuffer
import chisel3._
import chisel3.experimental._
import chisel3.experimental.hierarchy.{Clone, Instance}
import chisel3.experimental.hierarchy.core.{Clone, Instance}
import chisel3.internal.firrtl._
import chisel3.internal.naming._
import _root_.firrtl.annotations.{CircuitName, ComponentName, IsMember, ModuleName, Named, ReferenceTarget}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/aop/Select.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import chisel3.internal.{HasId}
import chisel3.experimental.BaseModule
import chisel3.experimental.FixedPoint
import chisel3.internal.firrtl.{Definition => DefinitionIR, _}
import chisel3.experimental.hierarchy._
import chisel3.experimental.hierarchy.core._
import chisel3.internal.PseudoModule
import chisel3.internal.BaseModule.ModuleClone
import firrtl.annotations.ReferenceTarget
Expand Down