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+.



1798
1799
1800
1801
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1798

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

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



1795
1796
1797
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1795

def content
  @content
end

Instance Method Details

#to_rubyObject Also known as: to_c

Convert to Ruby code.



1809
1810
1811
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1809

def to_ruby
  return @content.to_s
end

#to_valueObject

Compute the expression (convert it to a value).



1804
1805
1806
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 1804

def to_value
  return self
end