Skip to content

Commit a03904d

Browse files
committed
Remove unused Heartbeat component
1 parent f075225 commit a03904d

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

chipflow_lib/platforms/silicon.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,6 @@
3131
logger = logging.getLogger(__name__)
3232

3333

34-
def make_hashable(cls):
35-
def __hash__(self):
36-
return hash(id(self))
37-
38-
def __eq__(self, obj):
39-
return id(self) == id(obj)
40-
41-
cls.__hash__ = __hash__
42-
cls.__eq__ = __eq__
43-
return cls
44-
45-
46-
HeartbeatSignature = wiring.Signature({"heartbeat_i": In(1)})
47-
48-
49-
@make_hashable
50-
@dataclass
51-
class Heartbeat(Component):
52-
clock_domain: str = "sync"
53-
counter_size: int = 23
54-
name: str = "heartbeat"
55-
56-
def __init__(self, ports):
57-
super().__init__(HeartbeatSignature)
58-
self.ports = ports
59-
60-
def elaborate(self, platform):
61-
m = Module()
62-
# Heartbeat LED (to confirm clock/reset alive)
63-
heartbeat_ctr = Signal(self.counter_size)
64-
getattr(m.d, self.clock_domain).__iadd__(heartbeat_ctr.eq(heartbeat_ctr + 1))
65-
66-
heartbeat_buffer = io.Buffer(io.Direction.Output, self.ports.heartbeat)
67-
m.submodules.heartbeat_buffer = heartbeat_buffer
68-
m.d.comb += heartbeat_buffer.o.eq(heartbeat_ctr[-1]) # type: ignore
69-
return m
70-
71-
7234
class SiliconPlatformPort(io.PortLike, Generic[Pin]):
7335
def __init__(self,
7436
name: str,

0 commit comments

Comments
 (0)