Skip to content

Commit

Permalink
Refactor mod_context -> UserModule
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky64 committed Jan 31, 2017
1 parent 2f3bb1c commit b499bb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chiselFrontend/src/main/scala/chisel3/core/BiConnect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ object BiConnect {
* during the recursive decent and then rethrow them with extra information added.
* This gives the user a 'path' to where in the connections things went wrong.
*/
def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Data, right: Data, context_mod: BaseModule): Unit =
def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Data, right: Data, context_mod: UserModule): Unit =
(left, right) match {
// Handle element case (root case)
case (left_e: Element, right_e: Element) => {
Expand Down Expand Up @@ -109,7 +109,7 @@ object BiConnect {

// This function checks if element-level connection operation allowed.
// Then it either issues it or throws the appropriate exception.
def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Element, right: Element, context_mod: BaseModule): Unit = {
def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, left: Element, right: Element, context_mod: UserModule): Unit = {
import Direction.{Input, Output} // Using extensively so import these
// If left or right have no location, assume in context module
// This can occur if one of them is a literal, unbound will error previously
Expand Down
4 changes: 2 additions & 2 deletions chiselFrontend/src/main/scala/chisel3/core/Data.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ abstract class Data extends HasId {
Binding.checkSynthesizable(this, s"'this' ($this)")
Binding.checkSynthesizable(that, s"'that' ($that)")
try {
MonoConnect.connect(sourceInfo, connectCompileOptions, this, that, Builder.forcedModule)
MonoConnect.connect(sourceInfo, connectCompileOptions, this, that, Builder.forcedUserModule)
} catch {
case MonoConnect.MonoConnectException(message) =>
throwException(
Expand All @@ -155,7 +155,7 @@ abstract class Data extends HasId {
Binding.checkSynthesizable(this, s"'this' ($this)")
Binding.checkSynthesizable(that, s"'that' ($that)")
try {
BiConnect.connect(sourceInfo, connectCompileOptions, this, that, Builder.forcedModule)
BiConnect.connect(sourceInfo, connectCompileOptions, this, that, Builder.forcedUserModule)
} catch {
case BiConnect.BiConnectException(message) =>
throwException(
Expand Down
4 changes: 2 additions & 2 deletions chiselFrontend/src/main/scala/chisel3/core/MonoConnect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object MonoConnect {
* during the recursive decent and then rethrow them with extra information added.
* This gives the user a 'path' to where in the connections things went wrong.
*/
def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Data, source: Data, context_mod: BaseModule): Unit =
def connect(sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Data, source: Data, context_mod: UserModule): Unit =
(sink, source) match {
// Handle element case (root case)
case (sink_e: Element, source_e: Element) => {
Expand Down Expand Up @@ -102,7 +102,7 @@ object MonoConnect {

// This function checks if element-level connection operation allowed.
// Then it either issues it or throws the appropriate exception.
def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Element, source: Element, context_mod: BaseModule): Unit = {
def elemConnect(implicit sourceInfo: SourceInfo, connectCompileOptions: CompileOptions, sink: Element, source: Element, context_mod: UserModule): Unit = {
import Direction.{Input, Output} // Using extensively so import these
// If source has no location, assume in context module
// This can occur if is a literal, unbound will error previously
Expand Down

0 comments on commit b499bb9

Please sign in to comment.