Class: Origen::Limits::Limit

Inherits:
Object
  • Object
show all
Defined in:
lib/origen/limits/limit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expr, type, owner, options = {}) ⇒ Limit

Returns a new instance of Limit



6
7
8
9
10
11
# File 'lib/origen/limits/limit.rb', line 6

def initialize(expr, type, owner, options = {})
  @expr = expr
  @owner = owner
  @type = type
  @value = evaluate_expr
end

Instance Attribute Details

#exprObject

Returns the value of attribute expr



4
5
6
# File 'lib/origen/limits/limit.rb', line 4

def expr
  @expr
end

#ownerObject

Returns the value of attribute owner



4
5
6
# File 'lib/origen/limits/limit.rb', line 4

def owner
  @owner
end

#typeObject

Returns the value of attribute type



4
5
6
# File 'lib/origen/limits/limit.rb', line 4

def type
  @type
end

#valueObject

If the value is still a String then it could be due to referencing another LimitSet that is yet to be defined



16
17
18
# File 'lib/origen/limits/limit.rb', line 16

def value
  @value
end

Instance Method Details

#expObject

Backwards compatibility



25
26
27
# File 'lib/origen/limits/limit.rb', line 25

def exp
  @expr
end