Changeset 546 for trunk/tools/arch_info


Ignore:
Timestamp:
Sep 21, 2018, 10:23:16 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Make hard_config.h generate from params-hard IOC_TYPE

Location:
trunk/tools/arch_info
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/arch_info/arch_classes.py

    r542 r546  
    363363
    364364    ######################################################################
    365     def hard_config( self ):     # compute string for hard_config.h file
     365    def hard_config( self, ioc_type ):     # compute string for hard_config.h file
    366366                                 # required by
    367367                                 # - top.cpp compilation
     
    557557
    558558        # one and only one IOC controller
    559         assert ( nb_ioc == 1 )
     559        # assert ( nb_ioc == 1 )
    560560
    561561        # compute rdk_base and rdk_size
     
    623623        s += '#define USE_DMA                %d\n'    % ( nb_dma != 0 )
    624624        s += '\n'
    625         s += '#define USE_IOC_BDV            %d\n'    % use_ioc_bdv
    626         s += '#define USE_IOC_SDC            %d\n'    % use_ioc_sdc
    627         s += '#define USE_IOC_HBA            %d\n'    % use_ioc_hba
    628         s += '#define USE_IOC_SPI            %d\n'    % use_ioc_spi
     625        s += '#define USE_IOC_BDV            %d\n'    % (use_ioc_bdv and ioc_type == "IOC_BDV")
     626        s += '#define USE_IOC_SDC            %d\n'    % (use_ioc_sdc and ioc_type == "IOC_SDC")
     627        s += '#define USE_IOC_HBA            %d\n'    % (use_ioc_hba and ioc_type == "IOC_HBA")
     628        s += '#define USE_IOC_SPI            %d\n'    % (use_ioc_spi and ioc_type == "IOC_SPI")
    629629        s += '#define USE_IOC_RDK            %d\n'    % use_ioc_rdk
    630630        s += '\n'
  • trunk/tools/arch_info/genarch.py

    r279 r546  
    167167    pathname = hard_path + '/hard_config.h'
    168168    f = open ( pathname, 'w' )
    169     f.write( archinfo.hard_config() )
     169    f.write( archinfo.hard_config( ioc_type ) )
    170170    print '[genarch] %s generated' % pathname
    171171
Note: See TracChangeset for help on using the changeset viewer.