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
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
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
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
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
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
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