Home | History | Annotate | Download | only in compat

Lines Matching refs:Layout

9 class Layout(object):
10 def __init__(self, layout, variant=None):
11 self.layout = layout
13 if '(' in layout:
15 # parse a layout(variant) string
16 match = re.match(r'([^(]+)\(([^)]+)\)', layout)
17 self.layout = match.groups()[0]
22 return '{}({})'.format(self.layout, self.variant)
24 return '{}'.format(self.layout)
28 '''Returns a list of two-layout tuples [(layout1, layout2), ...]'''
39 l1 = Layout(groups[0])
40 l2 = Layout(groups[1])
42 l1 = Layout(groups[0], groups[1])
43 l2 = Layout(groups[2], groups[3])
51 dest.write('! model layout = symbols\n')
59 dest.write('! model layout[{}] = symbols\n'.format(number))
62 # +layout(variant):2 ... where the map-to-layout has a proper variant
63 # +layout%(v[2]):2 ... where the map-to-layout does not have a variant
66 # pc+layout(variant)
67 # pc+layout%(v[1])
73 second_layout = str(l2) if l2.variant else '{}%(v[{}])'.format(l2.layout, number)
80 dest.write('! model layout variant = symbols\n')
82 dest.write(' * {} {} = pc+{}\n'.format(l1.layout, l1.variant, l2))
88 dest.write('! model layout[{}] variant[{}] = symbols\n'.format(number, number))
91 # +layout(variant):2
94 # pc+layout(variant)
101 second_layout = str(l2) if l2.variant else '{}%(v[{}])'.format(l2.layout, number)
102 dest.write(' * {} {} = {}+{}{}\n'.format(l1.layout, l1.variant, base, second_layout, suffix))