addrs: OutputValue.InModule

Similar to other address types, this wraps the receiver up in its
associated "config" type, binding it to a particular not-yet-expanded
module.
This commit is contained in:
Martin Atkins 2022-06-14 17:13:53 -07:00
parent 209b8de7a5
commit 696b403bf3

View File

@ -32,6 +32,15 @@ func (v OutputValue) Absolute(m ModuleInstance) AbsOutputValue {
}
}
// InModule converts the receiver into a config address within the given
// module.
func (v OutputValue) InModule(m Module) ConfigOutputValue {
return ConfigOutputValue{
Module: m,
OutputValue: v,
}
}
// AbsOutputValue is the absolute address of an output value within a module instance.
//
// This represents an output globally within the namespace of a particular