Skip to content

Commit

Permalink
[#37] Refine verbalizing transistor objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Dec 27, 2021
1 parent f59abbd commit a85ad20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/z80sim/z80sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def __init__(self, id, gate, c1, c2):
self.id, self.gate, self.c1, self.c2 = id, gate, c1, c2
self.state = False

def __repr__(self):
return f'{self.id}({self.c1}, {self.gate}, {self.c2})'


class Z80Simulator(object):
def __load_node_names(self):
Expand Down Expand Up @@ -490,7 +493,7 @@ def pc(self):
def dump(self):
with open('z80.dump', mode='w') as f:
for t in sorted(self.__trans.values(), key=lambda t: t.id):
print(f'{t.id}({t.c1}, {t.gate}, {t.c2})', file=f)
print(t, file=f)

# TODO
def do_something(self):
Expand Down

0 comments on commit a85ad20

Please sign in to comment.