Method: SOCMaker::SOCDef#port_length

Defined in:
lib/soc_maker/soc_def.rb

#port_length(ifc_name, port_name, inst) ⇒ Object

Method to get the port length. All arguments as symbol.

ifc_name

name of the interface

port_name

name of the port

inst

name of the instance



271
272
273
274
275
276
277
278
279
280
# File 'lib/soc_maker/soc_def.rb', line 271

def port_length( ifc_name, port_name, inst )
  if @cores[ inst ] != nil
    return @cores[ inst ].port_length( ifc_name, port_name )
  elsif is_it_me?( inst )
    tmp =  @interfaces[ ifc_name ].ports.select{ |k,v| v.spc_ref == port_name.to_s }
    return tmp.values.first.len
  else
    return nil
  end 
end