Class: Udb::XlenCondition

Inherits:
Condition show all
Extended by:
T::Sig
Defined in:
lib/udb/condition.rb

Instance Method Summary collapse

Constructor Details

#initialize(xlen)

Parameters:

  • xlen (Integer)


1721
1722
1723
# File 'lib/udb/condition.rb', line 1721

def initialize(xlen)
  @xlen = xlen
end

Instance Method Details

#to_hHash{String => T.untyped}, Boolean

Returns:

  • (Hash{String => T.untyped}, Boolean)


1737
# File 'lib/udb/condition.rb', line 1737

def to_h = { "xlen" => @xlen }

#to_idl(cfg_arch) ⇒ String

Parameters:

Returns:

  • (String)


1740
# File 'lib/udb/condition.rb', line 1740

def to_idl(cfg_arch) = "xlen() == #{@xlen}"

#to_logic_tree_internalLogicNode

Returns:



1726
1727
1728
1729
1730
1731
1732
1733
1734
# File 'lib/udb/condition.rb', line 1726

def to_logic_tree_internal
  if @xlen == 32
    LogicNode::Xlen32
  elsif @xlen == 64
    LogicNode::Xlen64
  else
    raise "unexpected"
  end
end