Method: VerilogTools.get_seq_par

Defined in:
lib/HDLRuby/verilog_hruby.rb

.get_seq_par(statement) ⇒ Object

Tool for checking if a statement is to be seq or par in HDLRuby



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/HDLRuby/verilog_hruby.rb', line 79

def self.get_seq_par(statement)
  case statement.type
  when :blocking_asignment
    return :seq
  when :non_blocking_assignment
    return :par
  when :statement
    statement.each do |child|
      next unless child.is_a?(AST)
      seq_par = VerilogTools.get_seq_par(child)
      return seq_par if seq_par
    end
    return nil
  else
    return nil
  end
end