|
@@ -31,6 +31,8 @@ try:
|
|
|
except FileNotFoundError:
|
|
except FileNotFoundError:
|
|
|
METADATA = {"profile": "source", "commit": "WORKTREE", "bitstream_sha256": "NOT_BUILT"}
|
|
METADATA = {"profile": "source", "commit": "WORKTREE", "bitstream_sha256": "NOT_BUILT"}
|
|
|
WIRE = CONTRACT["wire"]
|
|
WIRE = CONTRACT["wire"]
|
|
|
|
|
+UART_WIRE = WIRE.get("uart", WIRE)
|
|
|
|
|
+I2C_WIRE = WIRE.get("host_i2c", {})
|
|
|
COMMANDS = WIRE["commands"]
|
|
COMMANDS = WIRE["commands"]
|
|
|
RESPONSES = WIRE["responses"]
|
|
RESPONSES = WIRE["responses"]
|
|
|
STATUS = {int(value): name for name, value in RESPONSES["ACK_NACK"]["status"].items()}
|
|
STATUS = {int(value): name for name, value in RESPONSES["ACK_NACK"]["status"].items()}
|
|
@@ -123,8 +125,8 @@ def run_gui() -> int:
|
|
|
("Profile", profile), ("CPLD commit", METADATA["commit"]),
|
|
("Profile", profile), ("CPLD commit", METADATA["commit"]),
|
|
|
("Contract SHA", CONTRACT["contract_sha256"]),
|
|
("Contract SHA", CONTRACT["contract_sha256"]),
|
|
|
("Bitstream SHA", METADATA["bitstream_sha256"]),
|
|
("Bitstream SHA", METADATA["bitstream_sha256"]),
|
|
|
- ("Host UART", f"{CONTRACT['wire']['uart']['baud']} {CONTRACT['wire']['uart']['format']}"),
|
|
|
|
|
- ("Host I2C", f"0x{CONTRACT['wire']['host_i2c']['address_7bit']:02X} / 16-bit / CON36"),
|
|
|
|
|
|
|
+ ("Host UART", f"{UART_WIRE['baud']} {UART_WIRE['format']}"),
|
|
|
|
|
+ ("Host I2C", f"0x{int(I2C_WIRE['address_7bit']):02X} / 16-bit / CON36"),
|
|
|
("PTC PWM", f"{CONTRACT['outputs']['ptc_pwm_hz']} Hz"),
|
|
("PTC PWM", f"{CONTRACT['outputs']['ptc_pwm_hz']} Hz"),
|
|
|
("FAN PWM", f"{CONTRACT['outputs']['fan_pwm_hz']} Hz"),
|
|
("FAN PWM", f"{CONTRACT['outputs']['fan_pwm_hz']} Hz"),
|
|
|
("SET_ALL watchdog", f"{CONTRACT['watchdog']['seconds']} s"),
|
|
("SET_ALL watchdog", f"{CONTRACT['watchdog']['seconds']} s"),
|