Ignore:
Timestamp:
Apr 13, 2015, 5:34:00 PM (9 years ago)
Author:
alain
Message:

Introducing support for MWR coprocessors in the hard_config.h file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_python/mapping.py

    r546 r560  
    7575                  'GCD',
    7676                  'DCT',
     77                  'CPY',
    7778                 ]
    7879   
     
    723724        seg_ioc_base = 0xFFFFFFFF
    724725        seg_ioc_size = 0
     726        use_ioc_bdv  = False
     727        use_ioc_sdc  = False
     728        use_ioc_hba  = False
    725729
    726730        nb_mmc       = 0
     
    737741        mwr_arg2     = 0
    738742        mwr_arg3     = 0
     743        use_mwr_gcd  = False
     744        use_mwr_dct  = False
     745        use_mwr_cpy  = False
    739746
    740747        nb_nic       = 0
     
    778785        seg_drom_base = 0xFFFFFFFF
    779786        seg_drom_size = 0
    780 
    781         use_bdv = False
    782         use_sdc = False
    783         use_hba = False
    784787
    785788        # get peripherals attributes
     
    817820                    ioc_channels = periph.channels
    818821                    nb_ioc += 1
    819 
    820                     if self.use_ramdisk: continue
    821 
    822                     if   ( periph.subtype == 'BDV' ): use_bdv = True
    823                     elif ( periph.subtype == 'HBA' ): use_hba = True
    824                     elif ( periph.subtype == 'SDC' ): use_sdc = True
     822                    if ( periph.subtype == 'BDV' ): use_ioc_bdv = True
     823                    if ( periph.subtype == 'HBA' ): use_ioc_hba = True
     824                    if ( periph.subtype == 'SDC' ): use_ioc_sdc = True
    825825
    826826                elif ( periph.ptype == 'MMC' ):
     
    839839                    mwr_arg3     = periph.arg3
    840840                    nb_mwr +=1
     841                    if ( periph.subtype == 'GCD' ): use_mwr_gcd = True
     842                    if ( periph.subtype == 'DCT' ): use_mwr_dct = True
     843                    if ( periph.subtype == 'CPY' ): use_mwr_cpy = True
    841844
    842845                elif ( periph.ptype == 'ROM' ):
     
    901904
    902905        # one and only one type of IOC controller
    903         nb_iocs = 0
    904         if use_hba         : nb_iocs += 1
    905         if use_bdv         : nb_iocs += 1
    906         if use_sdc         : nb_iocs += 1
    907         if self.use_ramdisk: nb_iocs += 1
    908         assert ( nb_iocs == 1 )
     906        nb_ioc_types = 0
     907        if use_ioc_hba:       nb_ioc_types += 1
     908        if use_ioc_bdv:       nb_ioc_types += 1
     909        if use_ioc_sdc:       nb_ioc_types += 1
     910        if self.use_ramdisk:  nb_ioc_types += 1
     911        assert ( nb_ioc_types == 1 )
     912
     913        # one and only one type of MWR controller
     914        nb_mwr_types = 0
     915        if use_mwr_gcd:       nb_mwr_types += 1
     916        if use_mwr_dct:       nb_mwr_types += 1
     917        if use_mwr_cpy:       nb_mwr_types += 1
     918        if ( nb_mwr > 0 ) : assert ( nb_mwr_types == 1 )
    909919
    910920        # Compute total number of processors
     
    10121022        s += '\n'
    10131023        s += '#define USE_XCU                %d\n'    % ( nb_xcu != 0 )
     1024        s += '#define USE_DMA                %d\n'    % ( nb_dma != 0 )
     1025        s += '\n'
    10141026        s += '#define USE_IOB                %d\n'    % ( nb_iob != 0 )
    10151027        s += '#define USE_PIC                %d\n'    % ( nb_pic != 0 )
     
    10171029        s += '#define USE_NIC                %d\n'    % ( nb_nic != 0 )
    10181030        s += '\n'
    1019         s += '#define USE_IOC_BDV            %d\n'    % use_bdv
    1020         s += '#define USE_IOC_SDC            %d\n'    % use_sdc
    1021         s += '#define USE_IOC_HBA            %d\n'    % use_hba
     1031        s += '#define USE_IOC_BDV            %d\n'    % use_ioc_bdv
     1032        s += '#define USE_IOC_SDC            %d\n'    % use_ioc_sdc
     1033        s += '#define USE_IOC_HBA            %d\n'    % use_ioc_hba
    10221034        s += '#define USE_IOC_RDK            %d\n'    % self.use_ramdisk
     1035        s += '\n'
     1036        s += '#define USE_MWR_GCD            %d\n'    % use_mwr_gcd
     1037        s += '#define USE_MWR_DCT            %d\n'    % use_mwr_dct
     1038        s += '#define USE_MWR_CPY            %d\n'    % use_mwr_cpy
    10231039        s += '\n'
    10241040        s += '#define FBUF_X_SIZE            %d\n'    % fbf_arg0
Note: See TracChangeset for help on using the changeset viewer.