Changeset 546


Ignore:
Timestamp:
Apr 5, 2015, 12:02:09 AM (9 years ago)
Author:
alain
Message:

Replace the "SPI" name by "SDC" for the third disk controller type (beside BDV and HBA).

Location:
soft/giet_vm/giet_python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_python/genmap

    r539 r546  
    7474                   help = 'define frame buffer width and heigth' )
    7575
     76parser.add_option( '--ioc', type = 'string', dest = 'ioc_type',
     77                   default = 'BDV',
     78                   help = 'define type of IOC: BDV / HBA / SDC / RDK' )
     79
    7680parser.add_option( '--v', action = 'store_true', dest = 'verbose',
    7781                   default = False,
     
    141145nb_ttys        = options.nb_ttys     # number of TTY channels           
    142146fbf_size       = options.fbf_size    # frame buffer width & heigth
     147ioc_type       = options.ioc_type    # ioc controller type
    143148
    144149verbose        = options.verbose     # report on map.bin generation if True
     
    178183
    179184# build mapping calling the function (function name)
    180 mapping = select.arch( x_size, y_size, nb_procs, nb_ttys, fbf_size )
     185mapping = select.arch( x_size, y_size, nb_procs, nb_ttys, fbf_size, ioc_type )
    181186print '[genmap] platform %s build' % mapping.name
    182187
  • soft/giet_vm/giet_python/mapping.py

    r539 r546  
    6969                  'BDV',
    7070                  'HBA',
    71                   'SPI',
    72                   'NONE',
     71                  'SDC',
    7372                 ]
    7473
     
    101100                  'ISR_MMC',
    102101                  'ISR_DMA',
    103                   'ISR_SPI',
     102                  'ISR_SDC',
    104103                  'ISR_MWR',
    105104                  'ISR_HBA',
     
    111110                  'PTAB',
    112111                  'PERI',
    113                   'MWMR',      # deprecated
    114                   'LOCK',      # deprecated
    115112                  'BUFFER',
    116                   'BARRIER',   # deprecated
    117                   'CONST',     # deprecated
    118                   'MEMSPACE',  # deprecated
    119113                  'SCHED',     
    120114                  'HEAP',
     
    339333            if ( ((prev.vbase + prev.length) > vbase ) and
    340334                 ((vbase + length) > prev.vbase) and
    341                  (prev.name != name) ):
     335                 (prev.name[0:15] != name[0:15]) ):
    342336                print '[genmap error] in addGlobal()'
    343337                print '    global vseg %s overlap %s' % (name, prev.name)
    344                 print '    %s : base = %x / size = %x' %( name, vbase, size )
    345                 print '    %s : base = %x / size = %x' %( prev.name, prev.vbase, prev.size )
     338                print '    %s : base = %x / size = %x' %(name, vbase, length)
     339                print '    %s : base = %x / size = %x' %(prev.name, prev.vbase, prev.length)
    346340                sys.exit(1)
    347341
     
    508502        byte_stream += self.int2bytes(4,  self.total_irqs)
    509503        byte_stream += self.int2bytes(4,  self.total_periphs)
    510         byte_stream += self.str2bytes(32, self.name)
     504        byte_stream += self.str2bytes(64, self.name)
    511505
    512506        if ( verbose ):
     
    786780
    787781        use_bdv = False
    788         use_spi = False
     782        use_sdc = False
    789783        use_hba = False
    790784
     
    828822                    if   ( periph.subtype == 'BDV' ): use_bdv = True
    829823                    elif ( periph.subtype == 'HBA' ): use_hba = True
    830                     elif ( periph.subtype == 'SPI' ): use_spi = True
     824                    elif ( periph.subtype == 'SDC' ): use_sdc = True
    831825
    832826                elif ( periph.ptype == 'MMC' ):
     
    910904        if use_hba         : nb_iocs += 1
    911905        if use_bdv         : nb_iocs += 1
    912         if use_spi         : nb_iocs += 1
     906        if use_sdc         : nb_iocs += 1
    913907        if self.use_ramdisk: nb_iocs += 1
    914908        assert ( nb_iocs == 1 )
     
    10211015        s += '#define USE_PIC                %d\n'    % ( nb_pic != 0 )
    10221016        s += '#define USE_FBF                %d\n'    % ( nb_fbf != 0 )
     1017        s += '#define USE_NIC                %d\n'    % ( nb_nic != 0 )
    10231018        s += '\n'
    10241019        s += '#define USE_IOC_BDV            %d\n'    % use_bdv
    1025         s += '#define USE_IOC_SPI            %d\n'    % use_spi
     1020        s += '#define USE_IOC_SDC            %d\n'    % use_sdc
    10261021        s += '#define USE_IOC_HBA            %d\n'    % use_hba
    10271022        s += '#define USE_IOC_RDK            %d\n'    % self.use_ramdisk
     
    15061501                        sys.exit(1)
    15071502
    1508                     elif ( periph.subtype == 'SPI' ):
    1509 
    1510                         # get irq line index associated to spi
     1503                    elif ( periph.subtype == 'SDC' ):
     1504
     1505                        # get irq line index associated to sdc
    15111506                        irq_in = 0xFFFFFFFF
    15121507                        for irq in irq_tgt.irqs:
    1513                             if ( irq.isrtype == 'ISR_SPI' ): irq_in = irq.srcid
     1508                            if ( irq.isrtype == 'ISR_SDC' ): irq_in = irq.srcid
    15141509                        if ( irq_in == 0xFFFFFFFF ):
    15151510                            print '[genmap error] in netbsd.dts()'
    1516                             print '    ISR_SPI not found'
     1511                            print '    ISR_SDC not found'
    15171512                            sys.exit(1)
    15181513
    15191514                        s += '  %s@0x%x {\n'  % (periph.pseg.name, periph.pseg.base)
    1520                         s += '    device_type = "soclib:spi";\n'
     1515                        s += '    device_type = "soclib:sdc";\n'
    15211516                        s += '    irq = <&{/%s@0x%x} %d>;\n' % (irq_tgt.pseg.name,irq_tgt.pseg.base,irq_in)
    15221517                        s += '    reg = <0x%x  0x%x  0x%x>;\n' % (msb, lsb, size)
Note: See TracChangeset for help on using the changeset viewer.