Class: BlifUtils::AST::GenericLatch
- Inherits:
-
Object
- Object
- BlifUtils::AST::GenericLatch
- Defined in:
- lib/blifutils/ast.rb
Instance Attribute Summary collapse
-
#ctrlSig ⇒ Object
readonly
Returns the value of attribute ctrlSig.
-
#ctrlType ⇒ Object
readonly
Returns the value of attribute ctrlType.
-
#initValue ⇒ Object
readonly
Returns the value of attribute initValue.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(input, output, initValue: nil, ctrlType: nil, ctrlSig: nil) ⇒ GenericLatch
constructor
A new instance of GenericLatch.
- #pretty_print(indent) ⇒ Object
Constructor Details
#initialize(input, output, initValue: nil, ctrlType: nil, ctrlSig: nil) ⇒ GenericLatch
Returns a new instance of GenericLatch.
126 127 128 129 130 131 132 |
# File 'lib/blifutils/ast.rb', line 126 def initialize (input, output, initValue: nil, ctrlType: nil, ctrlSig: nil) @input = input @output = output @initValue = initValue @ctrlType = ctrlType @ctrlSig = ctrlSig end |
Instance Attribute Details
#ctrlSig ⇒ Object (readonly)
Returns the value of attribute ctrlSig.
124 125 126 |
# File 'lib/blifutils/ast.rb', line 124 def ctrlSig @ctrlSig end |
#ctrlType ⇒ Object (readonly)
Returns the value of attribute ctrlType.
124 125 126 |
# File 'lib/blifutils/ast.rb', line 124 def ctrlType @ctrlType end |
#initValue ⇒ Object (readonly)
Returns the value of attribute initValue.
124 125 126 |
# File 'lib/blifutils/ast.rb', line 124 def initValue @initValue end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
124 125 126 |
# File 'lib/blifutils/ast.rb', line 124 def input @input end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
124 125 126 |
# File 'lib/blifutils/ast.rb', line 124 def output @output end |
Instance Method Details
#pretty_print(indent) ⇒ Object
134 135 136 137 138 139 140 141 142 |
# File 'lib/blifutils/ast.rb', line 134 def pretty_print (indent) str = ' '*indent + "Latch:\n" str += ' '*(indent+1) + "Input: \"#{@input}\"\n" str += ' '*(indent+1) + "Output: \"#{@output}\"\n" str += ' '*(indent+1) + "Initial value: #{@initValue.nil? ? "undefined" : "\"#{@initValue}\""}\n" str += ' '*(indent+1) + "Type: #{@ctrlType.nil? ? "undefined" : "\"#{@ctrlSig}\""}\n" str += ' '*(indent+1) + "Clock signal: #{@ctrlSig.nil? ? "undefined" : "\"#{@ctrlSig}\""}\n" return str end |