Class: HDLRuby::High::TypeStruct

Inherits:
Low::TypeStruct show all
Includes:
Htype
Defined in:
lib/HDLRuby/hruby_high.rb

Overview

Describes a structure type.

Constant Summary collapse

High =
HDLRuby::High

Constants included from Low::Low2Symbol

Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable

Instance Attribute Summary

Attributes inherited from Low::Type

#name

Attributes included from Low::Hparent

#parent

Instance Method Summary collapse

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::TypeStruct

#break_types!, #delete_type!, #each, #each_name, #each_type, #each_type_deep, #eql?, #equivalent?, #get_all_types, #get_type, #hash, #initialize, #map_types!, #struct?, #to_c, #to_hdr, #to_high, #to_vhdl, #types?, #width

Methods included from Low::Ltype

included, #ltype?

Methods inherited from Low::Type

#base, #base?, #boolean?, #break_types!, #direction, #each_type_deep, #eql?, #equivalent?, #fixed?, #float?, #hash, #hierarchical?, #initialize, #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

#to_sym

Methods included from Low::Hparent

#hierarchy, #scope

Constructor Details

This class inherits a constructor from HDLRuby::Low::TypeStruct

Instance Method Details

#to_low(name = self.name) ⇒ Object

Converts the type to HDLRuby::Low and set its +name+.



1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
# File 'lib/HDLRuby/hruby_high.rb', line 1893

def to_low(name = self.name)
    # return HDLRuby::Low::TypeStruct.new(name,self.direction,
    #                     @types.map { |name,type| [name,type.to_low] } )
    typeStructL = HDLRuby::Low::TypeStruct.new(name,self.direction,
                        @types.map { |name,type| [name,type.to_low] } )
    # # For debugging: set the source high object 
    # typeStructL.properties[:low2high] = self.hdr_id
    # self.properties[:high2low] = typeStructL
    return typeStructL
end