Class: RubyHDL::High::Value

Inherits:
Expression show all
Defined in:
lib/HDLRuby/std/sequencer_sw.rb

Overview

Describes the software implementation of a value.

Instance Attribute Summary collapse

Attributes inherited from Expression

#type

Instance Method Summary collapse

Methods inherited from Expression

#<=, #[], #mux, #sdownto, #seach, #stimes, #supto, #to_expr

Constructor Details

#initialize(type, content) ⇒ Value

Create a new value with +type+ data type and content +content+.



1702
1703
1704
1705
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1702

def initialize(type,content)
  super(type)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



1699
1700
1701
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1699

def content
  @content
end

Instance Method Details

#to_rubyObject

Convert to ruby code.



1713
1714
1715
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1713

def to_ruby
  return @content.to_s
end

#to_valueObject

Compute the expression (convert it to a value).



1708
1709
1710
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1708

def to_value
  return self
end