Class: RubyHDL::High::RefName

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

Overview

Describes a SW implementation of a reference by name.

Instance Attribute Summary

Attributes inherited from Expression

#type

Instance Method Summary collapse

Methods inherited from Ref

#final_base, #to_ref

Methods inherited from Expression

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

Constructor Details

#initialize(type, name) ⇒ RefName

Create a new named reference with +type+ data type and +name+ name.



2126
2127
2128
2129
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2126

def initialize(type,name)
  super(type)
  @name = name.to_sym
end

Instance Method Details

#to_python(l = "") ⇒ Object

Convert to Python code.



2140
2141
2142
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2140

def to_python(l = "")
  return to_ruby
end

#to_rubyObject Also known as: to_c

Convert to Ruby code.



2132
2133
2134
# File 'lib/HDLRuby/std/sequencer_sw.rb', line 2132

def to_ruby
  return @name.to_s
end