|
|
@ -61,20 +61,21 @@ class DelayFile: |
|
|
|
|
|
|
|
|
|
|
|
delays = np.zeros((len(circuit.lines), 2, 2, 3)) # dataset last during construction. |
|
|
|
delays = np.zeros((len(circuit.lines), 2, 2, 3)) # dataset last during construction. |
|
|
|
|
|
|
|
|
|
|
|
for name, iopaths in self.cells.items(): |
|
|
|
with log.limit(50): |
|
|
|
name = name.replace('\\', '') |
|
|
|
for name, iopaths in self.cells.items(): |
|
|
|
if cell := circuit.cells.get(name, None): |
|
|
|
name = name.replace('\\', '') |
|
|
|
for i_pin_spec, o_pin_spec, *dels in iopaths: |
|
|
|
if cell := circuit.cells.get(name, None): |
|
|
|
if i_pin_spec.startswith('(posedge '): i_pol_idxs = [0] |
|
|
|
for i_pin_spec, o_pin_spec, *dels in iopaths: |
|
|
|
elif i_pin_spec.startswith('(negedge '): i_pol_idxs = [1] |
|
|
|
if i_pin_spec.startswith('(posedge '): i_pol_idxs = [0] |
|
|
|
else: i_pol_idxs = [0, 1] |
|
|
|
elif i_pin_spec.startswith('(negedge '): i_pol_idxs = [1] |
|
|
|
i_pin_spec = re.sub(r'\((neg|pos)edge ([^)]+)\)', r'\2', i_pin_spec) |
|
|
|
else: i_pol_idxs = [0, 1] |
|
|
|
if line := cell.ins[tlib.pin_index(cell.kind, i_pin_spec)]: |
|
|
|
i_pin_spec = re.sub(r'\((neg|pos)edge ([^)]+)\)', r'\2', i_pin_spec) |
|
|
|
delays[line, i_pol_idxs] = [d if len(d) > 0 else [0, 0, 0] for d in dels] |
|
|
|
if line := cell.ins[tlib.pin_index(cell.kind, i_pin_spec)]: |
|
|
|
else: |
|
|
|
delays[line, i_pol_idxs] = [d if len(d) > 0 else [0, 0, 0] for d in dels] |
|
|
|
log.warn(f'No line to annotate in circuit: {i_pin_spec} for {cell}') |
|
|
|
else: |
|
|
|
else: |
|
|
|
log.warn(f'No line to annotate in circuit: {i_pin_spec} for {cell}') |
|
|
|
log.warn(f'Name from SDF not found in circuit: {name}') |
|
|
|
else: |
|
|
|
|
|
|
|
log.warn(f'Name from SDF not found in circuit: {name}') |
|
|
|
|
|
|
|
|
|
|
|
return np.moveaxis(delays, -1, 0) |
|
|
|
return np.moveaxis(delays, -1, 0) |
|
|
|
|
|
|
|
|
|
|
|