Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/rhdl/block_dsl.rb

Instance Method Summary collapse

Instance Method Details

#fanout(check_context, statement) ⇒ Object



27
28
29
30
31
# File 'lib/rhdl/block_dsl.rb', line 27

def fanout(check_context, statement)
  self.each do |x|
    x.fanout(check_context, statement)
  end
end

#generateObject



23
24
25
# File 'lib/rhdl/block_dsl.rb', line 23

def generate
  "{#{self.map{|x| x.generate}.join(', ')}}"
end

#get_output_type(check_context) ⇒ Object



33
34
35
36
# File 'lib/rhdl/block_dsl.rb', line 33

def get_output_type(check_context)
  totalbits = self.flatten.sum{|x| x.get_output_type(check_context).bits}
  DataType.new("uint", totalbits, nil)
end