File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-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,16 @@ 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 self ._config ["chipflow" ]["silicon" ]["debug" ]["heartbeat" ]:
36+ heartbeat_ctr = Signal (23 )
37+ m .d .sync += heartbeat_ctr .eq (heartbeat_ctr + 1 )
38+ m .d .comb += platform .request ("heartbeat" ).o .eq (heartbeat_ctr [- 1 ])
3839
3940 top , interfaces = top_interfaces (self ._config )
4041 for n , t in top .items ():
4142 setattr (m .submodules , n , t )
4243
43- # TODO: heartbeat
4444 return m
4545
4646
You can’t perform that action at this time.
0 commit comments