OpenCores
URL https://opencores.org/ocsvn/soc_maker/soc_maker/trunk

Subversion Repositories soc_maker

[/] [soc_maker/] [trunk/] [lib/] [soc_maker/] [ifc_spc.rb] - Diff between revs 7 and 8

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 7 Rev 8
Line 80... Line 80...
    verr_if( @version.size == 0,
    verr_if( @version.size == 0,
        "Version has zero length",
        "Version has zero length",
        field: "name" )
        field: "name" )
 
 
    @ports = coder[ 'ports' ] || {}
    @ports = coder[ 'ports' ] || {}
    @ports.each do |pname, port_dir|
    @ports.each do |pname, port|
      verr_if( !port_dir.is_a?( Fixnum ) ||
 
               ( port_dir != 0 && port_dir != 1 ),
      verr_if( !port.is_a?( Hash ),
        "Port direction value is neither 0 nor 1",
        "Port field must be organized as a hash",
        instance: @name,
        instance: @name,
        field:    "ports" )
        field:    "ports" )
 
 
 
      verr_if( !port.has_key?( :dir ),
 
          "No port direction specified for #{pname}",
 
        instance: @name,
 
        field: "ports" )
 
 
 
      verr_if( !port[ :dir ].is_a?( Fixnum ) ||
 
              ( port[ :dir ] != 0 && port[ :dir ] != 1 ),
 
               "Port direction value for #{pname} is neither 0 nor 1",
 
               instance: @name,
 
               field:    "ports" )
 
 
 
      port[ :mandatory ] = true if !port.has_key?( :mandatory )
 
      port[ :default ]   ||= '0'
 
 
    end
    end
 
 
  end
  end
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.