class BlifUtils::AST::GenericLatch
Attributes
ctrlSig[R]
ctrlType[R]
initValue[R]
input[R]
output[R]
Public Class Methods
new(input, output, initValue: nil, ctrlType: nil, ctrlSig: nil)
click to toggle source
# 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
Public Instance Methods
pretty_print(indent)
click to toggle source
# 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