File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1- import importlib
1+ import importlib . metadata
22import jsonschema
33import os
44import sys
@@ -87,6 +87,12 @@ def _ensure_chipflow_root():
8787 },
8888 "pads" : {"$ref" : "#/$defs/pin" },
8989 "power" : {"$ref" : "#/$defs/pin" },
90+ "debug" : {
91+ "type" : "object" ,
92+ "properties" : {
93+ "heartbeat" : {"type" : "boolean" }
94+ }
95+ }
9096 },
9197 },
9298 },
Original file line number Diff line number Diff line change @@ -31,16 +31,17 @@ def elaborate(self, platform: SiliconPlatform):
3131
3232 platform .instantiate_ports (m )
3333
34- # TODO: heartbeat led (to confirm clock/reset alive)
35- # heartbeat_ctr = Signal(23)
36- # m.d.sync += heartbeat_ctr.eq(heartbeat_ctr + 1)
37- # m.d.comb += platform.request("heartbeat").o.eq(heartbeat_ctr[-1])
34+ # heartbeat led (to confirm clock/reset alive)
35+ if ("config" in self ._config ["chipflow" ]["silicon" ] and
36+ self ._config ["chipflow" ]["silicon" ]["debug" ]["heartbeat" ]):
37+ heartbeat_ctr = Signal (23 )
38+ m .d .sync += heartbeat_ctr .eq (heartbeat_ctr + 1 )
39+ m .d .comb += platform .request ("heartbeat" ).o .eq (heartbeat_ctr [- 1 ])
3840
3941 top , interfaces = top_interfaces (self ._config )
4042 for n , t in top .items ():
4143 setattr (m .submodules , n , t )
4244
43- # TODO: heartbeat
4445 return m
4546
4647
You can’t perform that action at this time.
0 commit comments