Ignore:
Timestamp:
Feb 8, 2015, 2:42:47 PM (10 years ago)
Author:
alain
Message:

Cosmetic

File:
1 edited

Legend:

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

    r492 r497  
    170170        self.signature      = MAPPING_SIGNATURE
    171171        self.name           = name
     172        self.name           = name
    172173        self.paddr_width    = paddr_width
    173174        self.coherence      = coherence
     
    217218                size ):                # pseg length (bytes)
    218219
    219         # computes coordinates from the base address extension
     220        # computes cluster index and coordinates from the base address
    220221        paddr_lsb_width = self.paddr_width - self.x_width - self.y_width
    221222        cluster_xy = base >> paddr_lsb_width
    222         x = cluster_xy >> (self.y_width);
    223         y = cluster_xy & ((1 << self.y_width) - 1)
     223        x          = cluster_xy >> (self.y_width);
     224        y          = cluster_xy & ((1 << self.y_width) - 1)
     225        cluster_id = (x * self.y_size) + y
    224226
    225227        assert (base & VPN_ANTI_MASK) == 0
     
    230232
    231233        assert ( size == self.ram_size )
    232 
    233         cluster_id = (x * self.y_size) + y
    234234
    235235        # add one pseg in the mapping
     
    251251                   arg      = 0 ):     # optional argument (semantic depends on ptype)
    252252
    253         # check cluster coordinates (obtained from the base address)
     253        # computes cluster index and coordinates from the base address
    254254        cluster_xy = base >> (self.paddr_width - self.x_width - self.y_width)
    255         x = cluster_xy >> (self.y_width);
    256         y = cluster_xy & ((1 << self.y_width) - 1)
     255        x          = cluster_xy >> (self.y_width);
     256        y          = cluster_xy & ((1 << self.y_width) - 1)
     257        cluster_id = (x * self.y_size) + y
    257258
    258259        assert (x < self.x_size) and (y < self.y_size)
     
    263264
    264265        assert subtype in PERIPHSUBTYPES
    265 
    266         cluster_id = (x * self.y_size) + y
    267266
    268267        # add one pseg into mapping
     
    10911090        if self.use_ramdisk:
    10921091            for vseg in self.globs:
    1093                 if ( vseg.name == 'seg_rdk' ):
     1092                if ( vseg.name == 'seg_ramdisk' ):
    10941093                    seg_rdk_base  = vseg.vbase
    10951094                    seg_rdk_size  = vseg.vobjs[0].length
Note: See TracChangeset for help on using the changeset viewer.