Class: HDLRuby::High::TypeTuple
- Inherits:
-
Low::TypeTuple
- Object
- Low::Type
- Low::TypeTuple
- HDLRuby::High::TypeTuple
- Includes:
- Htype
- Defined in:
- lib/HDLRuby/hruby_high.rb,
lib/HDLRuby/hruby_rsim.rb,
lib/HDLRuby/hruby_rcsim.rb
Overview
Extends the TypeTuple class for Ruby simulation.
Constant Summary collapse
Constants included from Low::Low2Symbol
Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes inherited from Low::Type
Attributes included from Low::Hparent
Instance Method Summary collapse
-
#direction=(dir) ⇒ Object
Extends the TypeTuple class for hybrid Ruby-C simulation.
-
#to_low(name = self.name) ⇒ Object
Converts the type to HDLRuby::Low and set its +name+.
-
#to_rcsim ⇒ Object
Generate the C description of the type.
Methods included from Htype
#[], #binary, #comp_operator, #constant, #define_operator, #define_operator_with_context, #each_overload, #htype?, included, #inner, #inout, #input, #left, #name=, #output, #register, #right, #shared, #to_type, #typedef, #unary
Methods included from Tprocess
#&, #*, #+, #+@, #-@, #/, #<<, #==, #abs, #lr, #make, #resolve, #slice, #~
Methods inherited from Low::TypeTuple
#add_type, #base, #base?, #break_types!, #delete_type!, #direction, #each, #each_type, #each_type_deep, #eql?, #equivalent?, #get_all_types, #get_type, #hash, #initialize, #map_types!, #range, #regular?, #to_c, #to_hdr, #to_high, #to_vhdl, #types?, #width
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
Methods included from Low::Hparent
#hierarchy, #no_parent!, #scope
Constructor Details
This class inherits a constructor from HDLRuby::Low::TypeTuple
Instance Method Details
#direction=(dir) ⇒ Object
Extends the TypeTuple class for hybrid Ruby-C simulation. Add the possibility to change the direction.
379 380 381 |
# File 'lib/HDLRuby/hruby_rsim.rb', line 379 def direction=(dir) @direction = dir == :little ? :little : :big end |
#to_low(name = self.name) ⇒ Object
Converts the type to HDLRuby::Low and set its +name+.
2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 |
# File 'lib/HDLRuby/hruby_high.rb', line 2087 def to_low(name = self.name) # typeTupleL = HDLRuby::Low::TypeTuple.new(name,self.direction, # *@types.map do |typ| typ.to_low ) typeTupleL = HDLRuby::Low::TypeTuple.new(name,self.direction) @types.each { |typ| typeTupleL.add_type(typ.to_low) } # # For debugging: set the source high object # typeTupleL.properties[:low2high] = self.hdr_id # self.properties[:high2low] = typeTupleL return typeTupleL end |