Example #1
0
 def col_str(self):
     """return a 4 string column for this region [name, range, size, meta]"""
     meta_str = (str(self.meta), '')[self.meta is None]
     return [
         self.name,
         ': %08x %08x' % (self.adr, self.end),
         util.memsize(self.size), meta_str
     ]
Example #2
0
File: soc.py Project: deadsy/pycs
 def cmd_map(self, ui, args):
   """display memory map"""
   clist = []
   for p in self.peripheral_list():
     start = p.address
     size = p.size
     if size is None:
       region = ': %08x' % start
     else:
       region = ': %08x %08x %s' % (start, start + size - 1, util.memsize(size))
     clist.append([p.name, region, p.description])
   ui.put('%s\n' % util.display_cols(clist, [0,0,0]))
Example #3
0
 def cmd_map(self, ui, args):
   """display memory map"""
   clist = []
   for p in self.peripheral_list():
     start = p.address
     size = p.size
     if size is None:
       region = ': %08x' % start
     else:
       region = ': %08x %08x %s' % (start, start + size - 1, util.memsize(size))
     clist.append([p.name, region, p.description])
   ui.put('%s\n' % util.display_cols(clist, [0, 0, 0]))
Example #4
0
def _bootprot_fmt(x):
    return '%s' % util.memsize((1 << (15 - x), 0)[x == 7])
Example #5
0
def _eeprom_fmt(x):
    return '%s' % util.memsize((1 << (14 - x), 0)[x == 7])
Example #6
0
def _tcmcr_SZ_format(x):
    return (util.memsize((4 << 10) << (x - 3)), 'No TCM implemented')[x == 0]
Example #7
0
File: atmel.py Project: deadsy/pycs
def _bootprot_fmt(x):
  return '%s' % util.memsize((1 << (15-x),0)[x == 7])
Example #8
0
File: atmel.py Project: deadsy/pycs
def _eeprom_fmt(x):
  return '%s' % util.memsize((1 << (14-x),0)[x == 7])
Example #9
0
File: mem.py Project: deadsy/pycs
 def col_str(self):
   """return a 4 string column for this region [name, range, size, meta]"""
   meta_str = (str(self.meta), '')[self.meta is None]
   return [self.name, ': %08x %08x' % (self.adr, self.end), util.memsize(self.size), meta_str]
Example #10
0
def _ncb_size_format(x):
  return '(%s)' % util.memsize(x)
Example #11
0
def _boot_data_length_format(x):
  return '(%s)' % util.memsize(x)