Class: HDLRuby::High::TypeDef
- Inherits:
-
Low::TypeDef
- Object
- Base::Type
- Low::Type
- Low::TypeDef
- HDLRuby::High::TypeDef
- Includes:
- Htype
- Defined in:
- lib/HDLRuby/hruby_high.rb
Overview
Describes a high-level type definition.
NOTE: type definition are actually type with a name refering to another type (and equivalent to it).
Constant Summary collapse
Constants included from Low::Low2Symbol
Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes inherited from Low::TypeDef
Attributes inherited from Low::Type
Attributes included from Low::Hparent
Instance Method Summary collapse
-
#initialize(name, type) ⇒ TypeDef
constructor
Creates a new type definition named +name+ refering +type+.
-
#to_low(name = self.name) ⇒ Object
Converts the type to HDLRuby::Low and set its +name+.
Methods included from Htype
#[], #binary, #comp_operator, #constant, #define_operator, #each_overload, #htype?, included, #inner, #inout, #input, #left, #name=, #output, #register, #right, #to_type, #typedef, #unary
Methods included from Tprocess
#&, #*, #+, #+@, #-@, #/, #<<, #==, #abs, #lr, #make, #resolve, #slice, #~
Methods inherited from Low::TypeDef
#each_type_deep, #eql?, #hash, #set_def!, #to_c, #to_hdr, #to_high, #to_verilog, #to_vhdl
Methods inherited from Low::Type
#base, #base?, #boolean?, #break_types!, #direction, #each_type_deep, #eql?, #equivalent?, #fixed?, #float?, #hash, #hierarchical?, #leaf?, #max, #min, #range, #range?, #regular?, #set_name!, #signed?, #struct?, #to_c, #to_hdr, #to_high, #to_vector, #to_verilog, #to_vhdl, #types?, #unsigned?, #vector?, #width
Methods included from Low::Low2Symbol
Methods included from Low::Hparent
Methods included from Low::Ltype
Constructor Details
#initialize(name, type) ⇒ TypeDef
Creates a new type definition named +name+ refering +type+.
1715 1716 1717 1718 |
# File 'lib/HDLRuby/hruby_high.rb', line 1715 def initialize(name,type) # Initialize the type structure. super(name,type) end |
Instance Method Details
#to_low(name = self.name) ⇒ Object
Converts the type to HDLRuby::Low and set its +name+.
NOTE: should be overridden by other type classes.
1723 1724 1725 1726 1727 1728 1729 1730 |
# File 'lib/HDLRuby/hruby_high.rb', line 1723 def to_low(name = self.name) # return HDLRuby::Low::TypeDef.new(name,self.def.to_low) typeDefL = HDLRuby::Low::TypeDef.new(name,self.def.to_low) # # For debugging: set the source high object # typeDefL.properties[:low2high] = self.hdr_id # self.properties[:high2low] = typeDefL return typeDefL end |