Browse Source

tweak repr, doc

devel
Stefan Holst 2 years ago
parent
commit
1a9cb396bf
  1. 2
      src/kyupy/circuit.py
  2. 2
      src/kyupy/sim.py

2
src/kyupy/circuit.py

@ -82,6 +82,8 @@ class Node:
def __repr__(self): def __repr__(self):
ins = ' '.join([f'<{line.index}' if line is not None else '<None' for line in self.ins]) ins = ' '.join([f'<{line.index}' if line is not None else '<None' for line in self.ins])
outs = ' '.join([f'>{line.index}' if line is not None else '>None' for line in self.outs]) outs = ' '.join([f'>{line.index}' if line is not None else '>None' for line in self.outs])
ins = ' ' + ins if len(ins) else ''
outs = ' ' + outs if len(outs) else ''
return f'{self.index}:{self.kind}"{self.name}"{ins}{outs}' return f'{self.index}:{self.kind}"{self.name}"{ins}{outs}'
def remove(self): def remove(self):

2
src/kyupy/sim.py

@ -237,7 +237,7 @@ class SimOps:
self.level_starts = np.asarray(level_starts, dtype='int32') self.level_starts = np.asarray(level_starts, dtype='int32')
self.level_stops = np.asarray(level_starts[1:] + [len(self.ops)], dtype='int32') self.level_stops = np.asarray(level_starts[1:] + [len(self.ops)], dtype='int32')
# state allocation table. maps line and interface indices to self.state memory locations # combinational signal allocation table. maps line and interface indices to self.c memory locations
self.c_locs = np.full((self.c_locs_len,), -1, dtype=np.int32) self.c_locs = np.full((self.c_locs_len,), -1, dtype=np.int32)
self.c_caps = np.zeros((self.c_locs_len,), dtype=np.int32) self.c_caps = np.zeros((self.c_locs_len,), dtype=np.int32)

Loading…
Cancel
Save