7 // InputVariable is the address of an input variable.
8 type InputVariable struct {
13 func (v InputVariable) String() string {
14 return "var." + v.Name
17 // AbsInputVariableInstance is the address of an input variable within a
18 // particular module instance.
19 type AbsInputVariableInstance struct {
21 Variable InputVariable
24 // InputVariable returns the absolute address of the input variable of the
25 // given name inside the receiving module instance.
26 func (m ModuleInstance) InputVariable(name string) AbsInputVariableInstance {
27 return AbsInputVariableInstance{
29 Variable: InputVariable{
35 func (v AbsInputVariableInstance) String() string {
36 if len(v.Module) == 0 {
40 return fmt.Sprintf("%s.%s", v.Module.String(), v.Variable.String())