예제 #1
0
 def operating_conditions(self):
     for line in myreadline(self.lib_file):
         m = re.match(
             r'^\s*operating_conditions\s*\(\s*\"(\S+)\"\s*\)\s*{\s*', line)
         if m:
             return m.group(1)
     return None
예제 #2
0
 def voltage_map(self):
     voltage_map = {}
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*voltage_map\s*\(\s*(\S+)\s*,\s*(\S+)\s*\)\s*;',
                      line)
         if m:
             voltage_map[m.group(1)] = m.group(2)
         if re.match(r'^\s*cell\s*\(\s*\S+\s*\)\s*', line):
             return voltage_map
     return None
예제 #3
0
 def all_cells(self):
     all_cells = {}
     cell_name = ''
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*cell\s*\(\s*(\S+)\s*\)\s*', line)
         m_area = re.match(r'^\s*area\s*:\s*(\S+)\s*;\s*', line)
         m_footprint = re.match(r'^\s*cell_footprint\s*:\s*"(\S+)"\s*;\s*',
                                line)
         if m:
             cell_name = m.group(1)
             all_cells[cell_name] = {}
         elif m_area:
             all_cells[cell_name]['area'] = m_area.group(1)
         elif m_footprint:
             all_cells[cell_name]['footprint'] = m_footprint.group(1)
     return all_cells
예제 #4
0
 def voltage(self):
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*nom_voltage\s*:\s*(\S+)\s*;', line)
         if m:
             return m.group(1)
     return None
예제 #5
0
 def version(self):
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*\*\s*Version:\s*(\S+)', line)
         if m:
             return m.group(1)
     return None
예제 #6
0
 def process(self):
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*nom_process\s*:\s*(\S+)\s*;', line)
         if m:
             return m.group(1)
     return None
예제 #7
0
 def name(self):
     for line in myreadline(self.lib_file):
         m = re.match(r'^\s*library\s*\(\s*(\S+)\s*\)\s*{\s*', line)
         if m:
             return m.group(1)
     return None