Ignore:
Timestamp:
Feb 14, 2015, 8:12:29 PM (9 years ago)
Author:
alain
Message:

Fix a bug in the external peripherals physical address computation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/arch.py

    r943 r945  
    110110    ## These segments are only defined in cluster_io
    111111
    112     offset_io = ((x_io << y_width) + y_io) << (paddr_width - x_width - y_width)
    113 
    114     bdv_base  = 0x00B3000000 + offset_io
     112    bdv_base  = 0x00B3000000
    115113    bdv_size  = 0x1000                     # 4kbytes
    116114
    117     tty_base  = 0x00B4000000 + offset_io
     115    tty_base  = 0x00B4000000
    118116    tty_size  = 0x4000                     # 16 Kbytes
    119117
    120     nic_base  = 0x00B5000000 + offset_io
     118    nic_base  = 0x00B5000000
    121119    nic_size  = 0x80000                    # 512 kbytes
    122120
    123     cma_base  = 0x00B6000000 + offset_io
     121    cma_base  = 0x00B6000000
    124122    cma_size  = 0x1000 * 2 * nb_nics       # 4 kbytes * 2 * nb_nics
    125123
    126     fbf_base  = 0x00B7000000 + offset_io
     124    fbf_base  = 0x00B7000000
    127125    fbf_size  = fbf_width * fbf_width     # fbf_width * fbf_width bytes
    128126
    129     pic_base  = 0x00B8000000 + offset_io
     127    pic_base  = 0x00B8000000
    130128    pic_size  = 0x1000                     # 4 Kbytes
    131129
    132     iob_base  = 0x00BE000000 + offset_io
     130    iob_base  = 0x00BE000000
    133131    iob_size  = 0x1000                     # 4 bytes
    134132
    135     rom_base  = 0x00BFC00000 + offset_io
     133    rom_base  = 0x00BFC00000
    136134    rom_size  = 0x4000                     # 16 Kbytes
    137135
     
    235233            if ( (x==x_io) and (y==y_io) ):
    236234
    237                 iob = mapping.addPeriph( 'IOB', base = iob_base, size = iob_size,
     235                iob = mapping.addPeriph( 'IOB', base = iob_base + offset, size = iob_size,
    238236                                         ptype = 'IOB' )
    239237
    240                 bdv = mapping.addPeriph( 'BDV', base = bdv_base, size = bdv_size,
     238                bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size,
    241239                                         ptype = 'IOC', subtype = 'BDV' )
    242240
    243                 tty = mapping.addPeriph( 'TTY', base = tty_base, size = tty_size,
     241                tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
    244242                                         ptype = 'TTY', channels = nb_ttys )
    245243
    246                 nic = mapping.addPeriph( 'NIC', base = nic_base, size = nic_size,
     244                nic = mapping.addPeriph( 'NIC', base = nic_base + offset, size = nic_size,
    247245                                         ptype = 'NIC', channels = nb_nics )
    248246
    249                 cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size,
     247                cma = mapping.addPeriph( 'CMA', base = cma_base + offset, size = cma_size,
    250248                                         ptype = 'CMA', channels = nb_cmas )
    251249
    252                 fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size,
     250                fbf = mapping.addPeriph( 'FBF', base = fbf_base + offset, size = fbf_size,
    253251                                         ptype = 'FBF', arg = fbf_width )
    254252
    255                 rom = mapping.addPeriph( 'ROM', base = rom_base, size = rom_size,
     253                rom = mapping.addPeriph( 'ROM', base = rom_base + offset, size = rom_size,
    256254                                         ptype = 'ROM' )
    257255
    258                 pic = mapping.addPeriph( 'PIC', base = pic_base, size = pic_size,
     256                pic = mapping.addPeriph( 'PIC', base = pic_base + offset, size = pic_size,
    259257                                         ptype = 'PIC', channels = 32 )
    260258
Note: See TracChangeset for help on using the changeset viewer.