lib/origen_verilog/verilog/node.rb
# Returns an array containing all input, output and inout AST nodes.
# Supply analog: true in the options to return only those pins defined as a
# real/wreal type and digital: true to return only the pins without a real/wreal
# type.
Returns an array containing all input, output and inout AST nodes.
Supply analog: true in the options to return only those pins defined as a
real/wreal type and digital: true to return only the pins without a real/wreal
type.
Returns an array containing all input output and inout AST nodes . Supply analog : true in the options to return only those pins defined as a real / wreal type and digital : true to return only the pins without a real / wreal type .
def pins(options = {})
        pins = find_all(:input_declaration, :output_declaration, :inout_declaration)
        if options[:analog] || options[:digital]
          wreals = self.wreals.map { |n| n.to_a.last }
          subset = []
          pins.each do |pin|
            if pin.find(:real) || wreals.include?(pin.to_a.last)
              subset << pin if options[:analog]
            else
              subset << pin if options[:digital]
            end
          end
          subset
        else
          pins
        end
      end
def pins ( options = { } ) pins = find_all ( :input_declaration , :output_declaration , :inout_declaration ) if options [ :analog ] || options [ :digital ] wreals = self . wreals . map { | n | n . to_a . last } subset = [ ] pins . each do | pin | if pin . find ( :real ) || wreals . include? ( pin . to_a . last ) subset << pin if options [ :analog ] else subset << pin if options [ :digital ] end end subset else pins end end
Returns an array containing all input, output and inout AST nodes.
Returns an array containing all input output and inout AST nodes .
options
<not_specific>