feat: add PS2 interface support and refactor related components

- Updated the PS2 interface in the APB wrapper to include RX and TX FIFO depths.
- Replaced the kdb_model with ps2_device_model in the testbench for better PS2 handling.
- Added new PS2 source files and headers for keyboard and mouse functionality.
- Refactored GPIO alternate functions to support PS2 clock and data signals.
- Implemented PS2 decoder tests for keyboard and mouse in the runtime tests.
- Updated the software makefile to include new PS2 source files and headers.
- Modified the topology tests to validate PS2 GPIO assignments.
This commit is contained in:
maksyuki committed 2026-08-09 20:18:31 +08:00
1 parent 97335b9df1
commit 34624a913a
21 files changed
+623 -318

No files matched your search

+2 -1
View File
@@ -28,7 +28,8 @@ under the [Mulan Permissive Software License, Version 2](LICENSE).
- Configurable GF180, SKY130, IHP130, and ICS55 implementation targets with
open-source CI coverage.
- A memory-mapped peripheral subsystem with GPIO, UART,
[dual general timers](docs/ip/timer.md), PWM, [dual I2C controllers](docs/ip/i2c.md), I2S, PS2,
[dual general timers](docs/ip/timer.md), PWM, [dual I2C controllers](docs/ip/i2c.md), I2S,
[bidirectional PS/2 V2](docs/ip/ps2.md),
WS2812, SPI/QSPI, SDIO, PSRAM/OPI-PSRAM, SDRAM, DMA, LCD, RTC, watchdog, CRC, and a
management-only RNG V2 entropy controller. The current deterministic RNG integration source is
explicitly unqualified and intended only for diagnostics until a PDK-qualified entropy source is integrated.
+1 -1
View File
@@ -64,7 +64,7 @@ int main(void) {
(void)rs_shell_register("wdg", "wdg test", true, ip_wdg_test);
(void)rs_shell_register("rng", "rng test", true, rs_rng_shell_test);
(void)rs_shell_register("crc", "crc test", true, ip_crc_test);
(void)rs_shell_register("ps2", "ps2 test", false, ip_ps2_test);
(void)rs_shell_register("ps2", "ps2 test", false, rs_ps2_shell_test);
(void)rs_shell_register("lcd", "lcd test", true, ip_lcd_test);
(void)rs_shell_register("i2s", "i2s test", false, ip_i2s_test);
(void)rs_shell_register("nor", "nor flash test", false, ip_norflash_test);
+1 -1
View File
@@ -67,7 +67,7 @@
"cluster_i2c": {"url": "https://github.com/retroSoC/i2c.git", "revision": "73b024547c5cd70fb8bf801cc7757db2536c604f", "destination": "rtl/managed/clusterip/i2c", "license": "NOASSERTION"},
"cluster_i2s": {"url": "https://github.com/retroSoC/i2s.git", "revision": "bd0978e8b45e4cf4c1335a1fa7311385d2a4e805", "destination": "rtl/managed/clusterip/i2s", "license": "NOASSERTION"},
"cluster_plic": {"url": "https://github.com/retroSoC/plic.git", "revision": "c851d93829d2e75b224003a058e718925855c0cc", "destination": "rtl/managed/clusterip/plic", "license": "NOASSERTION"},
"cluster_ps2": {"url": "https://github.com/retroSoC/ps2.git", "revision": "60921e0f72d6113f8615d03ce54567388fc2410f", "destination": "rtl/managed/clusterip/ps2", "license": "NOASSERTION"},
"cluster_ps2": {"url": "https://github.com/retroSoC/ps2.git", "revision": "2097a0d41b07573ff0453d65ba9a1670b3df7b9c", "destination": "rtl/managed/clusterip/ps2", "license": "MulanPSL-2.0"},
"cluster_pwm": {"url": "https://github.com/retroSoC/pwm.git", "revision": "c631ede87506d34f714167313ba69b196c0bea72", "destination": "rtl/managed/clusterip/pwm", "license": "NOASSERTION"},
"cluster_rng": {"url": "https://github.com/retroSoC/rng.git", "revision": "36f3e0774d8f3c4b597d3db8a96ca3992532b61e", "destination": "rtl/managed/clusterip/rng", "license": "MulanPSL-2.0"},
"cluster_rtc": {"url": "https://github.com/retroSoC/rtc.git", "revision": "c6cc82f7530eea0b87ebe1d2cde2a67c9268c0db", "destination": "rtl/managed/clusterip/rtc", "license": "NOASSERTION"},
-4
View File
@@ -199,10 +199,6 @@
#define reg_pwm_cr2 RS_SOC_REG32(RS_SOC_APB_PWM_BASE, UINT32_C(0x18))
#define reg_pwm_cr3 RS_SOC_REG32(RS_SOC_APB_PWM_BASE, UINT32_C(0x1C))
#define reg_pwm_stat RS_SOC_REG32(RS_SOC_APB_PWM_BASE, UINT32_C(0x20))
// ps2
#define reg_ps2_ctrl RS_SOC_REG32(RS_SOC_APB_PS2_BASE, UINT32_C(0x00))
#define reg_ps2_data RS_SOC_REG32(RS_SOC_APB_PS2_BASE, UINT32_C(0x04))
#define reg_ps2_stat RS_SOC_REG32(RS_SOC_APB_PS2_BASE, UINT32_C(0x08))
// rtc
#define reg_rtc_ctrl RS_SOC_REG32(RS_SOC_APB_RTC_BASE, UINT32_C(0x00))
#define reg_rtc_pscr RS_SOC_REG32(RS_SOC_APB_RTC_BASE, UINT32_C(0x04))
+63 -3
View File
@@ -1,5 +1,65 @@
#ifndef RETROSOC_PS2_H
#define RETROSOC_PS2_H
#ifndef RETROSOC_HAL_PS2_H
#define RETROSOC_HAL_PS2_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <ps2.h>
#include <ps2_keyboard.h>
#include <ps2_mouse.h>
#include <ps2_regs.h>
#include <retrosoc/core/status.h>
typedef ps2_config_t rs_ps2_config_t;
typedef ps2_rx_byte_t rs_ps2_rx_byte_t;
typedef ps2_device_info_t rs_ps2_device_info_t;
typedef ps2_controller_status_t rs_ps2_controller_status_t;
typedef ps2_key_event_t rs_ps2_key_event_t;
typedef ps2_keyboard_decoder_t rs_ps2_keyboard_decoder_t;
typedef ps2_mouse_mode_t rs_ps2_mouse_mode_t;
typedef ps2_mouse_event_t rs_ps2_mouse_event_t;
typedef ps2_mouse_decoder_t rs_ps2_mouse_decoder_t;
#define RS_PS2_INTERRUPT_RX_WATERMARK PS2_INTR_RX_WATERMARK_MASK
#define RS_PS2_INTERRUPT_TX_WATERMARK PS2_INTR_TX_WATERMARK_MASK
#define RS_PS2_INTERRUPT_TX_DONE PS2_INTR_TX_DONE_MASK
#define RS_PS2_INTERRUPT_RX_ERROR PS2_INTR_RX_ERROR_MASK
#define RS_PS2_INTERRUPT_TX_ERROR PS2_INTR_TX_ERROR_MASK
#define RS_PS2_INTERRUPT_BUS_ERROR PS2_INTR_BUS_ERROR_MASK
#define RS_PS2_INTERRUPT_ALL PS2_INTR_VALID_MASK
rs_status_t rs_ps2_configure(const rs_ps2_config_t *config, rs_timeout_t timeout);
rs_status_t rs_ps2_init(uint32_t source_clock_hz);
rs_status_t rs_ps2_write(const uint8_t *data, size_t length, rs_timeout_t timeout);
rs_status_t rs_ps2_read(rs_ps2_rx_byte_t *data, size_t length, rs_timeout_t timeout);
rs_status_t rs_ps2_command(uint8_t command, const uint8_t *parameters, size_t parameter_count,
rs_timeout_t timeout);
rs_status_t rs_ps2_identify(rs_ps2_device_info_t *info, rs_timeout_t timeout);
rs_status_t rs_ps2_flush(bool flush_rx, bool flush_tx);
rs_status_t rs_ps2_abort(void);
rs_status_t rs_ps2_get_status(rs_ps2_controller_status_t *status);
rs_status_t rs_ps2_irq_enable(uint32_t mask);
rs_status_t rs_ps2_irq_ack(uint32_t mask);
rs_status_t rs_ps2_irq_test(uint32_t mask);
void rs_ps2_keyboard_decoder_init(rs_ps2_keyboard_decoder_t *decoder);
bool rs_ps2_keyboard_decode_byte(rs_ps2_keyboard_decoder_t *decoder, uint8_t byte,
rs_ps2_key_event_t *event);
rs_status_t rs_ps2_keyboard_init(rs_ps2_device_info_t *info, rs_timeout_t timeout);
rs_status_t rs_ps2_keyboard_set_leds(uint8_t led_mask, rs_timeout_t timeout);
rs_status_t rs_ps2_keyboard_set_typematic(uint8_t value, rs_timeout_t timeout);
void rs_ps2_mouse_decoder_init(rs_ps2_mouse_decoder_t *decoder, uint8_t device_id);
bool rs_ps2_mouse_decode_byte(rs_ps2_mouse_decoder_t *decoder, uint8_t byte,
rs_ps2_mouse_event_t *event);
rs_status_t rs_ps2_mouse_init(rs_ps2_device_info_t *info, rs_timeout_t timeout);
rs_status_t rs_ps2_mouse_set_mode(rs_ps2_mouse_mode_t mode, rs_timeout_t timeout);
rs_status_t rs_ps2_mouse_set_sample_rate(uint8_t rate, rs_timeout_t timeout);
rs_status_t rs_ps2_mouse_set_resolution(uint8_t resolution, rs_timeout_t timeout);
rs_status_t rs_ps2_mouse_enable_reporting(bool enable, rs_timeout_t timeout);
void rs_ps2_shell_test(int argc, char **argv);
void ip_ps2_test(int argc, char **argv);
#endif
+145 -16
View File
@@ -1,25 +1,154 @@
#include <retrosoc/core/soc.h>
#include <retrosoc/lib/printf.h>
#include <retrosoc/hal/clock.h>
#include <retrosoc/hal/ps2.h>
#include <retrosoc/lib/printf.h>
static rs_status_t rs_ps2_status(ps2_status_t status) {
rs_status_t result;
switch (status) {
case PS2_STATUS_OK:
result = RS_OK;
break;
case PS2_STATUS_INVALID_ARGUMENT:
result = RS_EINVAL;
break;
case PS2_STATUS_TIMEOUT:
result = RS_ETIMEOUT;
break;
case PS2_STATUS_IO_ERROR:
result = RS_EIO;
break;
case PS2_STATUS_UNSUPPORTED:
result = RS_ENOTSUP;
break;
case PS2_STATUS_PROTOCOL_ERROR:
default:
result = RS_EFORMAT;
break;
}
return result;
}
rs_status_t rs_ps2_configure(const rs_ps2_config_t *config, rs_timeout_t timeout) {
return rs_ps2_status(ps2_configure(RS_SOC_APB_PS2_BASE, config, timeout));
}
rs_status_t rs_ps2_init(uint32_t source_clock_hz) {
return rs_ps2_status(ps2_init(RS_SOC_APB_PS2_BASE, source_clock_hz));
}
rs_status_t rs_ps2_write(const uint8_t *data, size_t length, rs_timeout_t timeout) {
return rs_ps2_status(ps2_write(RS_SOC_APB_PS2_BASE, data, length, timeout));
}
rs_status_t rs_ps2_read(rs_ps2_rx_byte_t *data, size_t length, rs_timeout_t timeout) {
return rs_ps2_status(ps2_read(RS_SOC_APB_PS2_BASE, data, length, timeout));
}
rs_status_t rs_ps2_command(uint8_t command, const uint8_t *parameters, size_t parameter_count,
rs_timeout_t timeout) {
return rs_ps2_status(
ps2_command(RS_SOC_APB_PS2_BASE, command, parameters, parameter_count, timeout));
}
rs_status_t rs_ps2_identify(rs_ps2_device_info_t *info, rs_timeout_t timeout) {
return rs_ps2_status(ps2_identify(RS_SOC_APB_PS2_BASE, info, timeout));
}
rs_status_t rs_ps2_flush(bool flush_rx, bool flush_tx) {
return rs_ps2_status(ps2_flush(RS_SOC_APB_PS2_BASE, flush_rx, flush_tx));
}
rs_status_t rs_ps2_abort(void) {
return rs_ps2_status(ps2_abort(RS_SOC_APB_PS2_BASE));
}
rs_status_t rs_ps2_get_status(rs_ps2_controller_status_t *status) {
return rs_ps2_status(ps2_get_status(RS_SOC_APB_PS2_BASE, status));
}
rs_status_t rs_ps2_irq_enable(uint32_t mask) {
return rs_ps2_status(ps2_irq_enable(RS_SOC_APB_PS2_BASE, mask));
}
rs_status_t rs_ps2_irq_ack(uint32_t mask) {
return rs_ps2_status(ps2_irq_ack(RS_SOC_APB_PS2_BASE, mask));
}
rs_status_t rs_ps2_irq_test(uint32_t mask) {
return rs_ps2_status(ps2_irq_test(RS_SOC_APB_PS2_BASE, mask));
}
void rs_ps2_keyboard_decoder_init(rs_ps2_keyboard_decoder_t *decoder) {
ps2_keyboard_decoder_init(decoder);
}
bool rs_ps2_keyboard_decode_byte(rs_ps2_keyboard_decoder_t *decoder, uint8_t byte,
rs_ps2_key_event_t *event) {
return ps2_keyboard_decode_byte(decoder, byte, event);
}
rs_status_t rs_ps2_keyboard_init(rs_ps2_device_info_t *info, rs_timeout_t timeout) {
return rs_ps2_status(ps2_keyboard_init(RS_SOC_APB_PS2_BASE, info, timeout));
}
rs_status_t rs_ps2_keyboard_set_leds(uint8_t led_mask, rs_timeout_t timeout) {
return rs_ps2_status(ps2_keyboard_set_leds(RS_SOC_APB_PS2_BASE, led_mask, timeout));
}
rs_status_t rs_ps2_keyboard_set_typematic(uint8_t value, rs_timeout_t timeout) {
return rs_ps2_status(ps2_keyboard_set_typematic(RS_SOC_APB_PS2_BASE, value, timeout));
}
void rs_ps2_mouse_decoder_init(rs_ps2_mouse_decoder_t *decoder, uint8_t device_id) {
ps2_mouse_decoder_init(decoder, device_id);
}
bool rs_ps2_mouse_decode_byte(rs_ps2_mouse_decoder_t *decoder, uint8_t byte,
rs_ps2_mouse_event_t *event) {
return ps2_mouse_decode_byte(decoder, byte, event);
}
rs_status_t rs_ps2_mouse_init(rs_ps2_device_info_t *info, rs_timeout_t timeout) {
return rs_ps2_status(ps2_mouse_init(RS_SOC_APB_PS2_BASE, info, timeout));
}
rs_status_t rs_ps2_mouse_set_mode(rs_ps2_mouse_mode_t mode, rs_timeout_t timeout) {
return rs_ps2_status(ps2_mouse_set_mode(RS_SOC_APB_PS2_BASE, mode, timeout));
}
rs_status_t rs_ps2_mouse_set_sample_rate(uint8_t rate, rs_timeout_t timeout) {
return rs_ps2_status(ps2_mouse_set_sample_rate(RS_SOC_APB_PS2_BASE, rate, timeout));
}
rs_status_t rs_ps2_mouse_set_resolution(uint8_t resolution, rs_timeout_t timeout) {
return rs_ps2_status(ps2_mouse_set_resolution(RS_SOC_APB_PS2_BASE, resolution, timeout));
}
rs_status_t rs_ps2_mouse_enable_reporting(bool enable, rs_timeout_t timeout) {
return rs_ps2_status(ps2_mouse_enable_reporting(RS_SOC_APB_PS2_BASE, enable, timeout));
}
void rs_ps2_shell_test(int argc, char **argv) {
rs_ps2_device_info_t info;
uint32_t clock_hz;
rs_status_t status;
void ip_ps2_test(int argc, char **argv) {
(void)argc;
(void)argv;
printf("[APB IP] ps2 test\n");
reg_ps2_ctrl = (uint32_t)0b11;
printf("ps2 ctrl: %x\n", reg_ps2_ctrl);
uint32_t kdb_code;
while (1) {
kdb_code = reg_ps2_data;
if (kdb_code != 0) {
if (kdb_code == 0x76)
break;
printf("[PS2 DAT] %x\n", kdb_code);
}
status = rs_clock_get_active_hz(&clock_hz);
if (status == RS_OK) {
status = rs_ps2_init(clock_hz);
}
if (status == RS_OK) {
status = rs_ps2_identify(&info, RS_TIMEOUT_DEFAULT);
}
if (status != RS_OK) {
printf("[PS2] initialization failed: %d\n", status);
return;
}
reg_ps2_ctrl = (uint32_t)0b00;
printf("ps2 ctrl: %x\n", reg_ps2_ctrl);
printf("[APB IP] PS/2 V2 device=%u id=%x\n", (uint32_t)info.type, info.id[0]);
}
+2 -1
View File
@@ -122,7 +122,8 @@ void rs_app_info(void) {
(void *)(uintptr_t)RS_SOC_APB_RNG_BASE);
printf(" 1 x UART1(ADV) @%p\n", (void *)&reg_uart1_lcr);
printf(" 1 x PWM(4CHNL) @%p\n", (void *)&reg_pwm_ctrl);
printf(" 1 x PS2 @%p\n", (void *)&reg_ps2_ctrl);
printf(" 1 x PS2 @%p\n",
(void *)(uintptr_t)RS_SOC_APB_PS2_BASE);
printf(" 1 x RTC @%p\n", (void *)&reg_rtc_ctrl);
printf(" 1 x WDG @%p\n", (void *)&reg_wdg_ctrl);
printf(" 1 x CRC @%p\n", (void *)&reg_crc_ctrl);
+2
View File
@@ -32,6 +32,8 @@ the root README and subsystem guides.
DMA, HAL, and verification contracts.
- [ip/i2c.md](ip/i2c.md) defines the dual I2C V2 command, timing, error,
recovery, DMA, HAL, and verification contracts.
- [ip/ps2.md](ip/ps2.md) defines the Mini SoC PS/2 V2 APB, GPIO pad,
interrupt, SDK, and managed-IP integration contract.
- [soc-integration-wiring.md](soc-integration-wiring.md) defines the generated
pin-map workflow and SoC integration boundary.
- [mini-soc-block-diagram.svg](mini-soc-block-diagram.svg) is the Mini SoC
+42
View File
@@ -0,0 +1,42 @@
# PS/2 V2 SoC Integration
The Mini SoC integrates the managed PS/2 host controller at
`RS_SOC_APB_PS2_BASE`. The standalone IP owns the transport RTL, register ABI,
device model, freestanding controller/keyboard/mouse software, formal proof,
and release documentation under `rtl/managed/clusterip/ps2`.
## SoC Binding
The controller is APB target slot 4 and reports its combined level interrupt at
management interrupt vector 12. The APB wrapper uses the configured external
clock frequency for reset timing defaults and instantiates 16-entry RX and TX
FIFOs.
GPIO0 and GPIO1 ALT1 select PS/2 clock and data respectively. Each ALT1 path
binds all three signals as one function: resolved pad input, constant-zero pad
output data, and active-high drive-low enable. Board and pad integration must
provide pull-ups. Firmware must disable the controller and confirm both output
enables are released before changing GPIO ownership.
## Software Binding
`<retrosoc/hal/ps2.h>` wraps the managed base-address API in the `rs_`
namespace and maps IP status values to `rs_status_t`. The HAL exposes bounded
controller I/O and command operations, keyboard Set-2 decoding, and standard,
wheel, and five-button mouse packet decoding. It does not preserve the former
receive-only `reg_ps2_*` ABI.
The active APB clock must be supplied to `rs_ps2_init`. When software changes
the system clock, it must disable or quiesce PS/2, reconfigure timing using the
new active frequency, and only then resume device traffic.
## Sources of Truth
- Register and protocol specification:
`rtl/managed/clusterip/ps2/doc/datasheet.md`
- Electrical and CDC integration:
`rtl/managed/clusterip/ps2/doc/integration.md`
- Standalone verification and release criteria:
`rtl/managed/clusterip/ps2/doc/verification.md`
- GPIO and interrupt topology: `rtl/mini/integration/soc_topology.json`
- APB address allocation: `rtl/mini/address_map/memory_map.json`
+10 -3
View File
@@ -43,7 +43,7 @@ digraph mini_soc_block_diagram {
];
ext_io [
fillcolor="#F3F4F6",
label="External I/O and memory\nGPIO, UART0, XPI Flash, SDRAM, PSRAM\nSD card, I2C, I2S, DVP and WS2812"
label="External I/O and memory\nGPIO, UART0, PS/2, XPI Flash, SDRAM, PSRAM\nSD card, I2C, I2S, DVP and WS2812"
];
ext_jtag [
fillcolor="#F3F4F6",
@@ -152,7 +152,7 @@ digraph mini_soc_block_diagram {
];
apb_targets [
fillcolor="#E6F4EA",
label="APB target wrapper\nUART1, PWM, PS/2, RTC\nwatchdog, CRC, advanced timer and user IP"
label="APB target wrapper\nUART1, PWM, RTC, watchdog\nCRC, advanced timer and user IP"
];
archinfo [
fillcolor="#E6F4EA",
@@ -162,6 +162,10 @@ digraph mini_soc_block_diagram {
fillcolor="#E6F4EA",
label="RNG V2 entropy controller\n8-word FIFO, fail-closed monitoring, IRQ16\nmanagement-only, deterministic source unqualified"
];
ps2 [
fillcolor="#E6F4EA",
label="PS/2 host V2\nbidirectional open-drain transport\n16-byte RX/TX FIFOs, errors, IRQ12"
];
gpio_bridge [
fillcolor="#E5E7EB",
label="GPIO pad bridge\nPDK capability-adapted controls"
@@ -177,7 +181,7 @@ digraph mini_soc_block_diagram {
{ rank=same; user_core; dma; }
{ rank=same; fault; fabric; sram; }
{ rank=same; ribp_adapter; apb_adapter; }
{ rank=same; sysctrl; clint; ribp_targets; uart0; i2c_controllers; gpio_controller; timers; ws2812; archinfo; rng; apb_targets; }
{ rank=same; sysctrl; clint; ribp_targets; uart0; i2c_controllers; gpio_controller; timers; ws2812; archinfo; rng; ps2; apb_targets; }
{ rank=same; gpio_bridge; irq; }
ext_clock -> rcu [label="clock / reset"];
@@ -209,6 +213,7 @@ digraph mini_soc_block_diagram {
ribp_adapter -> ws2812 [label="RIBP"];
apb_adapter -> archinfo [label="APB"];
apb_adapter -> rng [label="APB"];
apb_adapter -> ps2 [label="APB"];
apb_adapter -> apb_targets [label="APB"];
ribp_targets -> gpio_controller [label="alternate functions"];
@@ -225,6 +230,8 @@ digraph mini_soc_block_diagram {
dma -> i2c_controllers [label="DATA_CMD / RXDATA", style=dashed];
i2c_controllers -> irq [label="IRQ7 / IRQ19"];
rng -> irq [label="IRQ16"];
ps2 -> gpio_controller [label="GPIO0/1 ALT1\nopen drain"];
ps2 -> irq [label="IRQ12"];
apb_targets -> gpio_controller [label="user_gpio"];
ribp_targets -> ext_io [dir=both, label="device interfaces"];
uart0 -> ext_io [dir=both, label="UART pads"];
+285 -255
View File
@@ -4,19 +4,19 @@
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: mini_soc_block_diagram Pages: 1 -->
<svg width="2939pt" height="896pt"
viewBox="0.00 0.00 2939.00 896.48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg width="3164pt" height="896pt"
viewBox="0.00 0.00 3164.00 896.48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 892.48)">
<title>mini_soc_block_diagram</title>
<text text-anchor="middle" x="132" y="-870.08" font-family="Arial" font-size="18.00">retroSoC Mini SoC Architecture</text>
<g id="clust1" class="cluster">
<title>cluster_asic</title>
<path fill="transparent" stroke="#111827" d="M160,-85C160,-85 2911,-85 2911,-85 2917,-85 2923,-91 2923,-97 2923,-97 2923,-772.48 2923,-772.48 2923,-778.48 2917,-784.48 2911,-784.48 2911,-784.48 160,-784.48 160,-784.48 154,-784.48 148,-778.48 148,-772.48 148,-772.48 148,-97 148,-97 148,-91 154,-85 160,-85"/>
<path fill="transparent" stroke="#111827" d="M160,-85C160,-85 3136,-85 3136,-85 3142,-85 3148,-91 3148,-97 3148,-97 3148,-772.48 3148,-772.48 3148,-778.48 3142,-784.48 3136,-784.48 3136,-784.48 160,-784.48 160,-784.48 154,-784.48 148,-778.48 148,-772.48 148,-772.48 148,-97 148,-97 148,-91 154,-85 160,-85"/>
<text text-anchor="middle" x="196.5" y="-769.28" font-family="Arial" font-size="14.00" fill="#111827">retrosoc_asic</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_soc</title>
<path fill="transparent" stroke="#94a3b8" stroke-dasharray="5,2" d="M390,-103C390,-103 2893,-103 2893,-103 2899,-103 2905,-109 2905,-115 2905,-115 2905,-729.48 2905,-729.48 2905,-735.48 2899,-741.48 2893,-741.48 2893,-741.48 390,-741.48 390,-741.48 384,-741.48 378,-735.48 378,-729.48 378,-729.48 378,-115 378,-115 378,-109 384,-103 390,-103"/>
<path fill="transparent" stroke="#94a3b8" stroke-dasharray="5,2" d="M390,-103C390,-103 3118,-103 3118,-103 3124,-103 3130,-109 3130,-115 3130,-115 3130,-729.48 3130,-729.48 3130,-735.48 3124,-741.48 3118,-741.48 3118,-741.48 390,-741.48 390,-741.48 384,-741.48 378,-735.48 378,-729.48 378,-729.48 378,-115 378,-115 378,-109 384,-103 390,-103"/>
<text text-anchor="middle" x="407.5" y="-727.88" font-family="Arial" font-size="12.00" fill="#334155">retrosoc</text>
</g>
<!-- ext_clock -->
@@ -44,512 +44,542 @@
<!-- ext_io -->
<g id="node2" class="node">
<title>ext_io</title>
<path fill="#f3f4f6" stroke="#4b5563" stroke-width="1.1" d="M1660,-45C1660,-45 1468,-45 1468,-45 1462,-45 1456,-39 1456,-33 1456,-33 1456,-12 1456,-12 1456,-6 1462,0 1468,0 1468,0 1660,0 1660,0 1666,0 1672,-6 1672,-12 1672,-12 1672,-33 1672,-33 1672,-39 1666,-45 1660,-45"/>
<text text-anchor="middle" x="1564" y="-31" font-family="Arial" font-size="10.00" fill="#111827">External I/O and memory</text>
<text text-anchor="middle" x="1564" y="-20" font-family="Arial" font-size="10.00" fill="#111827">GPIO, UART0, XPI Flash, SDRAM, PSRAM</text>
<text text-anchor="middle" x="1564" y="-9" font-family="Arial" font-size="10.00" fill="#111827">SD card, I2C, I2S, DVP and WS2812</text>
<path fill="#f3f4f6" stroke="#4b5563" stroke-width="1.1" d="M2789,-45C2789,-45 2569,-45 2569,-45 2563,-45 2557,-39 2557,-33 2557,-33 2557,-12 2557,-12 2557,-6 2563,0 2569,0 2569,0 2789,0 2789,0 2795,0 2801,-6 2801,-12 2801,-12 2801,-33 2801,-33 2801,-39 2795,-45 2789,-45"/>
<text text-anchor="middle" x="2679" y="-31" font-family="Arial" font-size="10.00" fill="#111827">External I/O and memory</text>
<text text-anchor="middle" x="2679" y="-20" font-family="Arial" font-size="10.00" fill="#111827">GPIO, UART0, PS/2, XPI Flash, SDRAM, PSRAM</text>
<text text-anchor="middle" x="2679" y="-9" font-family="Arial" font-size="10.00" fill="#111827">SD card, I2C, I2S, DVP and WS2812</text>
</g>
<!-- ext_jtag -->
<g id="node3" class="node">
<title>ext_jtag</title>
<path fill="#f3f4f6" stroke="#4b5563" stroke-width="1.1" d="M1106.5,-860.48C1106.5,-860.48 975.5,-860.48 975.5,-860.48 969.5,-860.48 963.5,-854.48 963.5,-848.48 963.5,-848.48 963.5,-836.48 963.5,-836.48 963.5,-830.48 969.5,-824.48 975.5,-824.48 975.5,-824.48 1106.5,-824.48 1106.5,-824.48 1112.5,-824.48 1118.5,-830.48 1118.5,-836.48 1118.5,-836.48 1118.5,-848.48 1118.5,-848.48 1118.5,-854.48 1112.5,-860.48 1106.5,-860.48"/>
<text text-anchor="middle" x="1041" y="-845.48" font-family="Arial" font-size="10.00" fill="#111827">Management JTAG</text>
<text text-anchor="middle" x="1041" y="-834.48" font-family="Arial" font-size="10.00" fill="#111827">TCK, TMS, TDI, TRST_n, TDO</text>
<path fill="#f3f4f6" stroke="#4b5563" stroke-width="1.1" d="M1380.5,-860.48C1380.5,-860.48 1249.5,-860.48 1249.5,-860.48 1243.5,-860.48 1237.5,-854.48 1237.5,-848.48 1237.5,-848.48 1237.5,-836.48 1237.5,-836.48 1237.5,-830.48 1243.5,-824.48 1249.5,-824.48 1249.5,-824.48 1380.5,-824.48 1380.5,-824.48 1386.5,-824.48 1392.5,-830.48 1392.5,-836.48 1392.5,-836.48 1392.5,-848.48 1392.5,-848.48 1392.5,-854.48 1386.5,-860.48 1380.5,-860.48"/>
<text text-anchor="middle" x="1315" y="-845.48" font-family="Arial" font-size="10.00" fill="#111827">Management JTAG</text>
<text text-anchor="middle" x="1315" y="-834.48" font-family="Arial" font-size="10.00" fill="#111827">TCK, TMS, TDI, TRST_n, TDO</text>
</g>
<!-- jtag_dtm -->
<g id="node6" class="node">
<title>jtag_dtm</title>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1116,-678.98C1116,-678.98 966,-678.98 966,-678.98 960,-678.98 954,-672.98 954,-666.98 954,-666.98 954,-654.98 954,-654.98 954,-648.98 960,-642.98 966,-642.98 966,-642.98 1116,-642.98 1116,-642.98 1122,-642.98 1128,-648.98 1128,-654.98 1128,-654.98 1128,-666.98 1128,-666.98 1128,-672.98 1122,-678.98 1116,-678.98"/>
<text text-anchor="middle" x="1041" y="-663.98" font-family="Arial" font-size="10.00" fill="#111827">Hazard3 JTAG DTM</text>
<text text-anchor="middle" x="1041" y="-652.98" font-family="Arial" font-size="10.00" fill="#111827">10 MHz asynchronous TCK domain</text>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1390,-678.98C1390,-678.98 1240,-678.98 1240,-678.98 1234,-678.98 1228,-672.98 1228,-666.98 1228,-666.98 1228,-654.98 1228,-654.98 1228,-648.98 1234,-642.98 1240,-642.98 1240,-642.98 1390,-642.98 1390,-642.98 1396,-642.98 1402,-648.98 1402,-654.98 1402,-654.98 1402,-666.98 1402,-666.98 1402,-672.98 1396,-678.98 1390,-678.98"/>
<text text-anchor="middle" x="1315" y="-663.98" font-family="Arial" font-size="10.00" fill="#111827">Hazard3 JTAG DTM</text>
<text text-anchor="middle" x="1315" y="-652.98" font-family="Arial" font-size="10.00" fill="#111827">10 MHz asynchronous TCK domain</text>
</g>
<!-- ext_jtag&#45;&gt;jtag_dtm -->
<g id="edge2" class="edge">
<title>ext_jtag&#45;&gt;jtag_dtm</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1041,-824.27C1041,-792.24 1041,-723.39 1041,-686.51"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1043.45,-686.14 1041,-679.14 1038.55,-686.14 1043.45,-686.14"/>
<text text-anchor="middle" x="1061" y="-795.08" font-family="Arial" font-size="8.00" fill="#374151">JTAG pads</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1315,-824.27C1315,-792.24 1315,-723.39 1315,-686.51"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1317.45,-686.14 1315,-679.14 1312.55,-686.14 1317.45,-686.14"/>
<text text-anchor="middle" x="1335" y="-795.08" font-family="Arial" font-size="8.00" fill="#374151">JTAG pads</text>
</g>
<!-- fabric -->
<g id="node11" class="node">
<title>fabric</title>
<path fill="#dcecf8" stroke="#4b5563" stroke-width="1.1" d="M1337.66,-451.31C1337.66,-451.31 1269.98,-479.16 1269.98,-479.16 1264.43,-481.45 1252.88,-483.73 1246.88,-483.73 1246.88,-483.73 1091.12,-483.73 1091.12,-483.73 1085.12,-483.73 1073.57,-481.45 1068.02,-479.16 1068.02,-479.16 1000.34,-451.31 1000.34,-451.31 994.79,-449.03 994.79,-444.46 1000.34,-442.18 1000.34,-442.18 1068.02,-414.32 1068.02,-414.32 1073.57,-412.04 1085.12,-409.76 1091.12,-409.76 1091.12,-409.76 1246.88,-409.76 1246.88,-409.76 1252.88,-409.76 1264.43,-412.04 1269.98,-414.32 1269.98,-414.32 1337.66,-442.18 1337.66,-442.18 1343.21,-444.46 1343.21,-449.03 1337.66,-451.31"/>
<text text-anchor="middle" x="1169" y="-455.24" font-family="Arial" font-size="10.00" fill="#111827">RIB fabric</text>
<text text-anchor="middle" x="1169" y="-444.24" font-family="Arial" font-size="10.00" fill="#111827">3&#45;master round&#45;robin arbitration</text>
<text text-anchor="middle" x="1169" y="-433.24" font-family="Arial" font-size="10.00" fill="#111827">INCR1 / INCR4, access policy, fault reporting</text>
<path fill="#dcecf8" stroke="#4b5563" stroke-width="1.1" d="M2009.66,-451.31C2009.66,-451.31 1941.98,-479.16 1941.98,-479.16 1936.43,-481.45 1924.88,-483.73 1918.88,-483.73 1918.88,-483.73 1763.12,-483.73 1763.12,-483.73 1757.12,-483.73 1745.57,-481.45 1740.02,-479.16 1740.02,-479.16 1672.34,-451.31 1672.34,-451.31 1666.79,-449.03 1666.79,-444.46 1672.34,-442.18 1672.34,-442.18 1740.02,-414.32 1740.02,-414.32 1745.57,-412.04 1757.12,-409.76 1763.12,-409.76 1763.12,-409.76 1918.88,-409.76 1918.88,-409.76 1924.88,-409.76 1936.43,-412.04 1941.98,-414.32 1941.98,-414.32 2009.66,-442.18 2009.66,-442.18 2015.21,-444.46 2015.21,-449.03 2009.66,-451.31"/>
<text text-anchor="middle" x="1841" y="-455.24" font-family="Arial" font-size="10.00" fill="#111827">RIB fabric</text>
<text text-anchor="middle" x="1841" y="-444.24" font-family="Arial" font-size="10.00" fill="#111827">3&#45;master round&#45;robin arbitration</text>
<text text-anchor="middle" x="1841" y="-433.24" font-family="Arial" font-size="10.00" fill="#111827">INCR1 / INCR4, access policy, fault reporting</text>
</g>
<!-- rcu&#45;&gt;fabric -->
<g id="edge3" class="edge">
<title>rcu&#45;&gt;fabric</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M362.03,-540.47C368.2,-539.24 372,-538.48 372,-538.48 372,-538.48 792.5,-490.61 1022.63,-464.41"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1023.04,-466.83 1029.72,-463.6 1022.49,-461.96 1023.04,-466.83"/>
<text text-anchor="middle" x="687" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">system clock / reset</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M362.03,-540.47C368.2,-539.24 372,-538.48 372,-538.48 372,-538.48 1619,-483.48 1619,-483.48 1619,-483.48 1659.87,-476.9 1706.55,-469.39"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1706.95,-471.81 1713.47,-468.27 1706.17,-466.97 1706.95,-471.81"/>
<text text-anchor="middle" x="1105" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">system clock / reset</text>
</g>
<!-- clint -->
<g id="node17" class="node">
<title>clint</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M943.5,-255C943.5,-255 822.5,-255 822.5,-255 816.5,-255 810.5,-249 810.5,-243 810.5,-243 810.5,-222 810.5,-222 810.5,-216 816.5,-210 822.5,-210 822.5,-210 943.5,-210 943.5,-210 949.5,-210 955.5,-216 955.5,-222 955.5,-222 955.5,-243 955.5,-243 955.5,-249 949.5,-255 943.5,-255"/>
<text text-anchor="middle" x="883" y="-241" font-family="Arial" font-size="10.00" fill="#111827">CLINT</text>
<text text-anchor="middle" x="883" y="-230" font-family="Arial" font-size="10.00" fill="#111827">standard 64 KiB register map</text>
<text text-anchor="middle" x="883" y="-219" font-family="Arial" font-size="10.00" fill="#111827">mtime, mtimecmp and MSIP</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M792.5,-255C792.5,-255 671.5,-255 671.5,-255 665.5,-255 659.5,-249 659.5,-243 659.5,-243 659.5,-222 659.5,-222 659.5,-216 665.5,-210 671.5,-210 671.5,-210 792.5,-210 792.5,-210 798.5,-210 804.5,-216 804.5,-222 804.5,-222 804.5,-243 804.5,-243 804.5,-249 798.5,-255 792.5,-255"/>
<text text-anchor="middle" x="732" y="-241" font-family="Arial" font-size="10.00" fill="#111827">CLINT</text>
<text text-anchor="middle" x="732" y="-230" font-family="Arial" font-size="10.00" fill="#111827">standard 64 KiB register map</text>
<text text-anchor="middle" x="732" y="-219" font-family="Arial" font-size="10.00" fill="#111827">mtime, mtimecmp and MSIP</text>
</g>
<!-- rcu&#45;&gt;clint -->
<g id="edge8" class="edge">
<title>rcu&#45;&gt;clint</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M300.25,-538.33C410.78,-472.3 736,-278 736,-278 736,-278 769.57,-267.84 804.63,-257.22"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="805.66,-259.47 811.65,-255.1 804.24,-254.78 805.66,-259.47"/>
<text text-anchor="middle" x="582.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">1 MHz tick</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M295.07,-538.31C378.19,-480.32 605.41,-321.81 694.99,-259.32"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="696.6,-261.18 700.94,-255.17 693.8,-257.16 696.6,-261.18"/>
<text text-anchor="middle" x="537.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">1 MHz tick</text>
</g>
<!-- mgmt_core -->
<g id="node5" class="node">
<title>mgmt_core</title>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M1701,-683.48C1701,-683.48 1547,-683.48 1547,-683.48 1541,-683.48 1535,-677.48 1535,-671.48 1535,-671.48 1535,-650.48 1535,-650.48 1535,-644.48 1541,-638.48 1547,-638.48 1547,-638.48 1701,-638.48 1701,-638.48 1707,-638.48 1713,-644.48 1713,-650.48 1713,-650.48 1713,-671.48 1713,-671.48 1713,-677.48 1707,-683.48 1701,-683.48"/>
<text text-anchor="middle" x="1624" y="-669.48" font-family="Arial" font-size="10.00" fill="#111827">Management core</text>
<text text-anchor="middle" x="1624" y="-658.48" font-family="Arial" font-size="10.00" fill="#111827">Fixed Hazard3, branch predictor</text>
<text text-anchor="middle" x="1624" y="-647.48" font-family="Arial" font-size="10.00" fill="#111827">JTAG Debug Module always present</text>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M1975,-683.48C1975,-683.48 1821,-683.48 1821,-683.48 1815,-683.48 1809,-677.48 1809,-671.48 1809,-671.48 1809,-650.48 1809,-650.48 1809,-644.48 1815,-638.48 1821,-638.48 1821,-638.48 1975,-638.48 1975,-638.48 1981,-638.48 1987,-644.48 1987,-650.48 1987,-650.48 1987,-671.48 1987,-671.48 1987,-677.48 1981,-683.48 1975,-683.48"/>
<text text-anchor="middle" x="1898" y="-669.48" font-family="Arial" font-size="10.00" fill="#111827">Management core</text>
<text text-anchor="middle" x="1898" y="-658.48" font-family="Arial" font-size="10.00" fill="#111827">Fixed Hazard3, branch predictor</text>
<text text-anchor="middle" x="1898" y="-647.48" font-family="Arial" font-size="10.00" fill="#111827">JTAG Debug Module always present</text>
</g>
<!-- mgmt_adapter -->
<g id="node8" class="node">
<title>mgmt_adapter</title>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1644.5,-578.98C1644.5,-578.98 1603.5,-578.98 1603.5,-578.98 1597.5,-578.98 1591.5,-572.98 1591.5,-566.98 1591.5,-566.98 1591.5,-554.98 1591.5,-554.98 1591.5,-548.98 1597.5,-542.98 1603.5,-542.98 1603.5,-542.98 1644.5,-542.98 1644.5,-542.98 1650.5,-542.98 1656.5,-548.98 1656.5,-554.98 1656.5,-554.98 1656.5,-566.98 1656.5,-566.98 1656.5,-572.98 1650.5,-578.98 1644.5,-578.98"/>
<text text-anchor="middle" x="1624" y="-558.48" font-family="Arial" font-size="10.00" fill="#111827">RIBP2RIB</text>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1861.5,-578.98C1861.5,-578.98 1820.5,-578.98 1820.5,-578.98 1814.5,-578.98 1808.5,-572.98 1808.5,-566.98 1808.5,-566.98 1808.5,-554.98 1808.5,-554.98 1808.5,-548.98 1814.5,-542.98 1820.5,-542.98 1820.5,-542.98 1861.5,-542.98 1861.5,-542.98 1867.5,-542.98 1873.5,-548.98 1873.5,-554.98 1873.5,-554.98 1873.5,-566.98 1873.5,-566.98 1873.5,-572.98 1867.5,-578.98 1861.5,-578.98"/>
<text text-anchor="middle" x="1841" y="-558.48" font-family="Arial" font-size="10.00" fill="#111827">RIBP2RIB</text>
</g>
<!-- mgmt_core&#45;&gt;mgmt_adapter -->
<g id="edge9" class="edge">
<title>mgmt_core&#45;&gt;mgmt_adapter</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1624,-638.24C1624,-622.92 1624,-602.4 1624,-586.51"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1626.45,-586.12 1624,-579.12 1621.55,-586.12 1626.45,-586.12"/>
<text text-anchor="middle" x="1633.5" y="-609.08" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1885.35,-638.24C1876.2,-622.5 1863.85,-601.28 1854.51,-585.22"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1856.6,-583.94 1850.97,-579.12 1852.37,-586.4 1856.6,-583.94"/>
<text text-anchor="middle" x="1880.5" y="-609.08" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- debug_module -->
<g id="node7" class="node">
<title>debug_module</title>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M1377.5,-683.48C1377.5,-683.48 1256.5,-683.48 1256.5,-683.48 1250.5,-683.48 1244.5,-677.48 1244.5,-671.48 1244.5,-671.48 1244.5,-650.48 1244.5,-650.48 1244.5,-644.48 1250.5,-638.48 1256.5,-638.48 1256.5,-638.48 1377.5,-638.48 1377.5,-638.48 1383.5,-638.48 1389.5,-644.48 1389.5,-650.48 1389.5,-650.48 1389.5,-671.48 1389.5,-671.48 1389.5,-677.48 1383.5,-683.48 1377.5,-683.48"/>
<text text-anchor="middle" x="1317" y="-669.48" font-family="Arial" font-size="10.00" fill="#111827">Hazard3 Debug Module</text>
<text text-anchor="middle" x="1317" y="-658.48" font-family="Arial" font-size="10.00" fill="#111827">abstract commands, no SBA</text>
<text text-anchor="middle" x="1317" y="-647.48" font-family="Arial" font-size="10.00" fill="#111827">management&#45;hart&#45;only reset</text>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M1651.5,-683.48C1651.5,-683.48 1530.5,-683.48 1530.5,-683.48 1524.5,-683.48 1518.5,-677.48 1518.5,-671.48 1518.5,-671.48 1518.5,-650.48 1518.5,-650.48 1518.5,-644.48 1524.5,-638.48 1530.5,-638.48 1530.5,-638.48 1651.5,-638.48 1651.5,-638.48 1657.5,-638.48 1663.5,-644.48 1663.5,-650.48 1663.5,-650.48 1663.5,-671.48 1663.5,-671.48 1663.5,-677.48 1657.5,-683.48 1651.5,-683.48"/>
<text text-anchor="middle" x="1591" y="-669.48" font-family="Arial" font-size="10.00" fill="#111827">Hazard3 Debug Module</text>
<text text-anchor="middle" x="1591" y="-658.48" font-family="Arial" font-size="10.00" fill="#111827">abstract commands, no SBA</text>
<text text-anchor="middle" x="1591" y="-647.48" font-family="Arial" font-size="10.00" fill="#111827">management&#45;hart&#45;only reset</text>
</g>
<!-- jtag_dtm&#45;&gt;debug_module -->
<g id="edge4" class="edge">
<title>jtag_dtm&#45;&gt;debug_module</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1128.33,-660.98C1163.12,-660.98 1202.91,-660.98 1236.95,-660.98"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1237.12,-663.43 1244.12,-660.98 1237.12,-658.53 1237.12,-663.43"/>
<text text-anchor="middle" x="1186.25" y="-666.58" font-family="Arial" font-size="8.00" fill="#374151">DMI, asynchronous CDC</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1402.33,-660.98C1437.12,-660.98 1476.91,-660.98 1510.95,-660.98"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1511.12,-663.43 1518.12,-660.98 1511.12,-658.53 1511.12,-663.43"/>
<text text-anchor="middle" x="1460.25" y="-666.58" font-family="Arial" font-size="8.00" fill="#374151">DMI, asynchronous CDC</text>
</g>
<!-- debug_module&#45;&gt;mgmt_core -->
<g id="edge5" class="edge">
<title>debug_module&#45;&gt;mgmt_core</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1389.75,-660.98C1430.99,-660.98 1483.09,-660.98 1527.69,-660.98"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1527.77,-663.43 1534.77,-660.98 1527.77,-658.53 1527.77,-663.43"/>
<text text-anchor="middle" x="1462.25" y="-666.58" font-family="Arial" font-size="8.00" fill="#374151">halt, resume, abstract commands</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1663.75,-660.98C1704.99,-660.98 1757.09,-660.98 1801.69,-660.98"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1801.77,-663.43 1808.77,-660.98 1801.77,-658.53 1801.77,-663.43"/>
<text text-anchor="middle" x="1736.25" y="-666.58" font-family="Arial" font-size="8.00" fill="#374151">halt, resume, abstract commands</text>
</g>
<!-- debug_module&#45;&gt;mgmt_adapter -->
<g id="edge6" class="edge">
<title>debug_module&#45;&gt;mgmt_adapter</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1389.7,-638.68C1466.93,-616.04 1578,-583.48 1578,-583.48 1578,-583.48 1580.57,-582.29 1584.49,-580.45"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1585.75,-582.56 1591.06,-577.38 1583.68,-578.13 1585.75,-582.56"/>
<text text-anchor="middle" x="1531" y="-609.08" font-family="Arial" font-size="8.00" fill="#374151">reset after bridge idle</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1645.86,-638.48C1692.97,-620.01 1759.73,-593.84 1801.68,-577.4"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1802.82,-579.58 1808.45,-574.75 1801.04,-575.02 1802.82,-579.58"/>
<text text-anchor="middle" x="1761" y="-609.08" font-family="Arial" font-size="8.00" fill="#374151">reset after bridge idle</text>
</g>
<!-- timers -->
<g id="node22" class="node">
<title>timers</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M771.5,-255C771.5,-255 590.5,-255 590.5,-255 584.5,-255 578.5,-249 578.5,-243 578.5,-243 578.5,-222 578.5,-222 578.5,-216 584.5,-210 590.5,-210 590.5,-210 771.5,-210 771.5,-210 777.5,-210 783.5,-216 783.5,-222 783.5,-222 783.5,-243 783.5,-243 783.5,-249 777.5,-255 771.5,-255"/>
<text text-anchor="middle" x="681" y="-241" font-family="Arial" font-size="10.00" fill="#111827">General timers 0/1</text>
<text text-anchor="middle" x="681" y="-230" font-family="Arial" font-size="10.00" fill="#111827">32&#45;bit counter, 16&#45;bit prescaler</text>
<text text-anchor="middle" x="681" y="-219" font-family="Arial" font-size="10.00" fill="#111827">periodic / one&#45;shot, compare, debug freeze</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1681.5,-255C1681.5,-255 1500.5,-255 1500.5,-255 1494.5,-255 1488.5,-249 1488.5,-243 1488.5,-243 1488.5,-222 1488.5,-222 1488.5,-216 1494.5,-210 1500.5,-210 1500.5,-210 1681.5,-210 1681.5,-210 1687.5,-210 1693.5,-216 1693.5,-222 1693.5,-222 1693.5,-243 1693.5,-243 1693.5,-249 1687.5,-255 1681.5,-255"/>
<text text-anchor="middle" x="1591" y="-241" font-family="Arial" font-size="10.00" fill="#111827">General timers 0/1</text>
<text text-anchor="middle" x="1591" y="-230" font-family="Arial" font-size="10.00" fill="#111827">32&#45;bit counter, 16&#45;bit prescaler</text>
<text text-anchor="middle" x="1591" y="-219" font-family="Arial" font-size="10.00" fill="#111827">periodic / one&#45;shot, compare, debug freeze</text>
</g>
<!-- debug_module&#45;&gt;timers -->
<g id="edge7" class="edge">
<title>debug_module&#45;&gt;timers</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1244.49,-647.47C1091.36,-621.05 749,-561.98 749,-561.98 749,-561.98 749,-561.98 749,-336 749,-336 719.45,-291.46 699.31,-261.1"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="701.33,-259.72 695.42,-255.24 697.25,-262.43 701.33,-259.72"/>
<text text-anchor="middle" x="760" y="-444.84" font-family="Arial" font-size="8.00" fill="#374151">halted</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1591,-638.24C1591,-609.36 1591,-561.98 1591,-561.98 1591,-561.98 1591,-561.98 1591,-336 1591,-336 1591,-292.57 1591,-262.25"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1593.45,-262.24 1591,-255.24 1588.55,-262.24 1593.45,-262.24"/>
<text text-anchor="middle" x="1602" y="-444.84" font-family="Arial" font-size="8.00" fill="#374151">halted</text>
</g>
<!-- mgmt_adapter&#45;&gt;fabric -->
<g id="edge10" class="edge">
<title>mgmt_adapter&#45;&gt;fabric</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1591.06,-544.59C1583.69,-541.14 1578,-538.48 1578,-538.48 1578,-538.48 1486,-506.48 1486,-506.48 1486,-506.48 1386.24,-488 1298.65,-471.77"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1298.89,-469.32 1291.56,-470.45 1298,-474.14 1298.89,-469.32"/>
<text text-anchor="middle" x="1517" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1841,-542.94C1841,-529.08 1841,-508.91 1841,-490.69"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1843.45,-490.57 1841,-483.57 1838.55,-490.57 1843.45,-490.57"/>
<text text-anchor="middle" x="1848" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- user_core -->
<g id="node9" class="node">
<title>user_core</title>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M1552,-583.48C1552,-583.48 1476,-583.48 1476,-583.48 1470,-583.48 1464,-577.48 1464,-571.48 1464,-571.48 1464,-550.48 1464,-550.48 1464,-544.48 1470,-538.48 1476,-538.48 1476,-538.48 1552,-538.48 1552,-538.48 1558,-538.48 1564,-544.48 1564,-550.48 1564,-550.48 1564,-571.48 1564,-571.48 1564,-577.48 1558,-583.48 1552,-583.48"/>
<text text-anchor="middle" x="1514" y="-569.48" font-family="Arial" font-size="10.00" fill="#111827">Selected user core</text>
<text text-anchor="middle" x="1514" y="-558.48" font-family="Arial" font-size="10.00" fill="#111827">C0&#45;C5, one active</text>
<text text-anchor="middle" x="1514" y="-547.48" font-family="Arial" font-size="10.00" fill="#111827">PicoRV32 at C5</text>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M2171,-583.48C2171,-583.48 2095,-583.48 2095,-583.48 2089,-583.48 2083,-577.48 2083,-571.48 2083,-571.48 2083,-550.48 2083,-550.48 2083,-544.48 2089,-538.48 2095,-538.48 2095,-538.48 2171,-538.48 2171,-538.48 2177,-538.48 2183,-544.48 2183,-550.48 2183,-550.48 2183,-571.48 2183,-571.48 2183,-577.48 2177,-583.48 2171,-583.48"/>
<text text-anchor="middle" x="2133" y="-569.48" font-family="Arial" font-size="10.00" fill="#111827">Selected user core</text>
<text text-anchor="middle" x="2133" y="-558.48" font-family="Arial" font-size="10.00" fill="#111827">C0&#45;C5, one active</text>
<text text-anchor="middle" x="2133" y="-547.48" font-family="Arial" font-size="10.00" fill="#111827">PicoRV32 at C5</text>
</g>
<!-- user_core&#45;&gt;fabric -->
<g id="edge11" class="edge">
<title>user_core&#45;&gt;fabric</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1490.82,-538.22C1475.04,-523.41 1457,-506.48 1457,-506.48 1457,-506.48 1372.32,-489.21 1294.8,-473.4"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1295.15,-470.97 1287.8,-471.97 1294.17,-475.77 1295.15,-470.97"/>
<text text-anchor="middle" x="1473" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2120.39,-538.22C2111.81,-523.41 2102,-506.48 2102,-506.48 2102,-506.48 2030.85,-490.47 1962.85,-475.17"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1963.23,-472.74 1955.86,-473.59 1962.15,-477.52 1963.23,-472.74"/>
<text text-anchor="middle" x="2114" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- dma -->
<g id="node10" class="node">
<title>dma</title>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M1425,-578.98C1425,-578.98 1307,-578.98 1307,-578.98 1301,-578.98 1295,-572.98 1295,-566.98 1295,-566.98 1295,-554.98 1295,-554.98 1295,-548.98 1301,-542.98 1307,-542.98 1307,-542.98 1425,-542.98 1425,-542.98 1431,-542.98 1437,-548.98 1437,-554.98 1437,-554.98 1437,-566.98 1437,-566.98 1437,-572.98 1431,-578.98 1425,-578.98"/>
<text text-anchor="middle" x="1366" y="-563.98" font-family="Arial" font-size="10.00" fill="#111827">DMA</text>
<text text-anchor="middle" x="1366" y="-552.98" font-family="Arial" font-size="10.00" fill="#111827">RIB master and RIBP target</text>
<path fill="#ddf2e3" stroke="#4b5563" stroke-width="1.1" d="M2589,-578.98C2589,-578.98 2471,-578.98 2471,-578.98 2465,-578.98 2459,-572.98 2459,-566.98 2459,-566.98 2459,-554.98 2459,-554.98 2459,-548.98 2465,-542.98 2471,-542.98 2471,-542.98 2589,-542.98 2589,-542.98 2595,-542.98 2601,-548.98 2601,-554.98 2601,-554.98 2601,-566.98 2601,-566.98 2601,-572.98 2595,-578.98 2589,-578.98"/>
<text text-anchor="middle" x="2530" y="-563.98" font-family="Arial" font-size="10.00" fill="#111827">DMA</text>
<text text-anchor="middle" x="2530" y="-552.98" font-family="Arial" font-size="10.00" fill="#111827">RIB master and RIBP target</text>
</g>
<!-- dma&#45;&gt;fabric -->
<g id="edge12" class="edge">
<title>dma&#45;&gt;fabric</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1393.25,-542.91C1413.27,-530.36 1437,-515.48 1437,-515.48 1437,-515.48 1437,-506.48 1437,-506.48 1437,-506.48 1362.62,-490.18 1292.23,-474.75"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1292.35,-472.27 1284.99,-473.17 1291.3,-477.06 1292.35,-472.27"/>
<text text-anchor="middle" x="1444" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2458.86,-548.4C2345.08,-529.86 2120.28,-493.24 1975.5,-469.65"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1975.54,-467.18 1968.24,-468.47 1974.75,-472.01 1975.54,-467.18"/>
<text text-anchor="middle" x="2254" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- uart0 -->
<g id="node19" class="node">
<title>uart0</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1644,-255C1644,-255 1484,-255 1484,-255 1478,-255 1472,-249 1472,-243 1472,-243 1472,-222 1472,-222 1472,-216 1478,-210 1484,-210 1484,-210 1644,-210 1644,-210 1650,-210 1656,-216 1656,-222 1656,-222 1656,-243 1656,-243 1656,-249 1650,-255 1644,-255"/>
<text text-anchor="middle" x="1564" y="-241" font-family="Arial" font-size="10.00" fill="#111827">UART0 V2</text>
<text text-anchor="middle" x="1564" y="-230" font-family="Arial" font-size="10.00" fill="#111827">64&#45;byte TX/RX FIFOs, fractional baud</text>
<text text-anchor="middle" x="1564" y="-219" font-family="Arial" font-size="10.00" fill="#111827">framing/errors, IRQ2, DMA&#45;paced</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M3102,-255C3102,-255 2942,-255 2942,-255 2936,-255 2930,-249 2930,-243 2930,-243 2930,-222 2930,-222 2930,-216 2936,-210 2942,-210 2942,-210 3102,-210 3102,-210 3108,-210 3114,-216 3114,-222 3114,-222 3114,-243 3114,-243 3114,-249 3108,-255 3102,-255"/>
<text text-anchor="middle" x="3022" y="-241" font-family="Arial" font-size="10.00" fill="#111827">UART0 V2</text>
<text text-anchor="middle" x="3022" y="-230" font-family="Arial" font-size="10.00" fill="#111827">64&#45;byte TX/RX FIFOs, fractional baud</text>
<text text-anchor="middle" x="3022" y="-219" font-family="Arial" font-size="10.00" fill="#111827">framing/errors, IRQ2, DMA&#45;paced</text>
</g>
<!-- dma&#45;&gt;uart0 -->
<g id="edge36" class="edge">
<g id="edge37" class="edge">
<title>dma&#45;&gt;uart0</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1433.39,-542.94C1443.7,-540.33 1451,-538.48 1451,-538.48 1451,-538.48 1698,-483.48 1698,-483.48 1698,-483.48 1698,-410 1698,-410 1698,-410 1682,-378 1682,-378 1682,-378 1620.5,-302.69 1586.3,-260.81"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1587.99,-259.01 1581.67,-255.13 1584.2,-262.1 1587.99,-259.01"/>
<text text-anchor="middle" x="1707.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">TX/RX data</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M2555.76,-542.89C2636.81,-489.11 2886.94,-323.13 2983.45,-259.08"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2984.83,-261.1 2989.31,-255.19 2982.12,-257.02 2984.83,-261.1"/>
<text text-anchor="middle" x="2819.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">TX/RX data</text>
</g>
<!-- i2c_controllers -->
<g id="node20" class="node">
<title>i2c_controllers</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1432.5,-255C1432.5,-255 1247.5,-255 1247.5,-255 1241.5,-255 1235.5,-249 1235.5,-243 1235.5,-243 1235.5,-222 1235.5,-222 1235.5,-216 1241.5,-210 1247.5,-210 1247.5,-210 1432.5,-210 1432.5,-210 1438.5,-210 1444.5,-216 1444.5,-222 1444.5,-222 1444.5,-243 1444.5,-243 1444.5,-249 1438.5,-255 1432.5,-255"/>
<text text-anchor="middle" x="1340" y="-241" font-family="Arial" font-size="10.00" fill="#111827">I2C0 / I2C1 V2</text>
<text text-anchor="middle" x="1340" y="-230" font-family="Arial" font-size="10.00" fill="#111827">16&#45;entry command/RX FIFOs, Sm/Fm/Fm+</text>
<text text-anchor="middle" x="1340" y="-219" font-family="Arial" font-size="10.00" fill="#111827">7/10&#45;bit, IRQ7/19, DMA&#45;paced</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M2131.5,-255C2131.5,-255 1946.5,-255 1946.5,-255 1940.5,-255 1934.5,-249 1934.5,-243 1934.5,-243 1934.5,-222 1934.5,-222 1934.5,-216 1940.5,-210 1946.5,-210 1946.5,-210 2131.5,-210 2131.5,-210 2137.5,-210 2143.5,-216 2143.5,-222 2143.5,-222 2143.5,-243 2143.5,-243 2143.5,-249 2137.5,-255 2131.5,-255"/>
<text text-anchor="middle" x="2039" y="-241" font-family="Arial" font-size="10.00" fill="#111827">I2C0 / I2C1 V2</text>
<text text-anchor="middle" x="2039" y="-230" font-family="Arial" font-size="10.00" fill="#111827">16&#45;entry command/RX FIFOs, Sm/Fm/Fm+</text>
<text text-anchor="middle" x="2039" y="-219" font-family="Arial" font-size="10.00" fill="#111827">7/10&#45;bit, IRQ7/19, DMA&#45;paced</text>
</g>
<!-- dma&#45;&gt;i2c_controllers -->
<g id="edge39" class="edge">
<g id="edge40" class="edge">
<title>dma&#45;&gt;i2c_controllers</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1390.56,-542.91C1408.61,-530.36 1430,-515.48 1430,-515.48 1430,-515.48 1430,-506.48 1430,-506.48 1430,-506.48 976,-483.48 976,-483.48 976,-483.48 976,-410 976,-410 976,-410 1075,-378 1075,-378 1075,-378 1206,-355 1206,-355 1206,-355 1394,-296 1394,-296 1394,-296 1394,-278 1394,-278 1394,-278 1383.53,-269.37 1371.81,-259.71"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1373.33,-257.79 1366.37,-255.23 1370.21,-261.57 1373.33,-257.79"/>
<text text-anchor="middle" x="1116" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">DATA_CMD / RXDATA</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M2520.78,-542.77C2488,-481.55 2379,-278 2379,-278 2379,-278 2249.95,-261.11 2150.87,-248.14"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2151.04,-245.69 2143.79,-247.21 2150.41,-250.55 2151.04,-245.69"/>
<text text-anchor="middle" x="2478" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">DATA_CMD / RXDATA</text>
</g>
<!-- ws2812 -->
<g id="node23" class="node">
<title>ws2812</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M540,-255C540,-255 406,-255 406,-255 400,-255 394,-249 394,-243 394,-243 394,-222 394,-222 394,-216 400,-210 406,-210 406,-210 540,-210 540,-210 546,-210 552,-216 552,-222 552,-222 552,-243 552,-243 552,-249 546,-255 540,-255"/>
<text text-anchor="middle" x="473" y="-241" font-family="Arial" font-size="10.00" fill="#111827">WS2812 TX</text>
<text text-anchor="middle" x="473" y="-230" font-family="Arial" font-size="10.00" fill="#111827">24&#45;bit MSB&#45;first serializer</text>
<text text-anchor="middle" x="473" y="-219" font-family="Arial" font-size="10.00" fill="#111827">16&#45;word FIFO, IRQ17, DMA&#45;fed</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M2891,-255C2891,-255 2757,-255 2757,-255 2751,-255 2745,-249 2745,-243 2745,-243 2745,-222 2745,-222 2745,-216 2751,-210 2757,-210 2757,-210 2891,-210 2891,-210 2897,-210 2903,-216 2903,-222 2903,-222 2903,-243 2903,-243 2903,-249 2897,-255 2891,-255"/>
<text text-anchor="middle" x="2824" y="-241" font-family="Arial" font-size="10.00" fill="#111827">WS2812 TX</text>
<text text-anchor="middle" x="2824" y="-230" font-family="Arial" font-size="10.00" fill="#111827">24&#45;bit MSB&#45;first serializer</text>
<text text-anchor="middle" x="2824" y="-219" font-family="Arial" font-size="10.00" fill="#111827">16&#45;word FIFO, IRQ17, DMA&#45;fed</text>
</g>
<!-- dma&#45;&gt;ws2812 -->
<g id="edge34" class="edge">
<g id="edge35" class="edge">
<title>dma&#45;&gt;ws2812</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M1294.75,-546.22C1180.73,-524.19 970,-483.48 970,-483.48 970,-483.48 647.98,-321.52 522.36,-258.33"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="523.16,-255.99 515.8,-255.03 520.96,-260.36 523.16,-255.99"/>
<text text-anchor="middle" x="799.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">TXDATA writes</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" stroke-dasharray="5,2" d="M2538.61,-542.77C2569.22,-481.55 2671,-278 2671,-278 2671,-278 2706.24,-267.75 2742.89,-257.09"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2743.7,-259.41 2749.74,-255.1 2742.34,-254.7 2743.7,-259.41"/>
<text text-anchor="middle" x="2646.5" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">TXDATA writes</text>
</g>
<!-- fault -->
<g id="node12" class="node">
<title>fault</title>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M1672.5,-464.74C1672.5,-464.74 1563.5,-464.74 1563.5,-464.74 1557.5,-464.74 1551.5,-458.74 1551.5,-452.74 1551.5,-452.74 1551.5,-440.74 1551.5,-440.74 1551.5,-434.74 1557.5,-428.74 1563.5,-428.74 1563.5,-428.74 1672.5,-428.74 1672.5,-428.74 1678.5,-428.74 1684.5,-434.74 1684.5,-440.74 1684.5,-440.74 1684.5,-452.74 1684.5,-452.74 1684.5,-458.74 1678.5,-464.74 1672.5,-464.74"/>
<text text-anchor="middle" x="1618" y="-449.74" font-family="Arial" font-size="10.00" fill="#111827">Error slave</text>
<text text-anchor="middle" x="1618" y="-438.74" font-family="Arial" font-size="10.00" fill="#111827">access and protocol faults</text>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M2344.5,-464.74C2344.5,-464.74 2235.5,-464.74 2235.5,-464.74 2229.5,-464.74 2223.5,-458.74 2223.5,-452.74 2223.5,-452.74 2223.5,-440.74 2223.5,-440.74 2223.5,-434.74 2229.5,-428.74 2235.5,-428.74 2235.5,-428.74 2344.5,-428.74 2344.5,-428.74 2350.5,-428.74 2356.5,-434.74 2356.5,-440.74 2356.5,-440.74 2356.5,-452.74 2356.5,-452.74 2356.5,-458.74 2350.5,-464.74 2344.5,-464.74"/>
<text text-anchor="middle" x="2290" y="-449.74" font-family="Arial" font-size="10.00" fill="#111827">Error slave</text>
<text text-anchor="middle" x="2290" y="-438.74" font-family="Arial" font-size="10.00" fill="#111827">access and protocol faults</text>
</g>
<!-- fabric&#45;&gt;fault -->
<g id="edge13" class="edge">
<title>fabric&#45;&gt;fault</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1282.37,-478.99C1330.41,-492.66 1375.5,-505.48 1375.5,-505.48 1375.5,-505.48 1428.5,-505.48 1428.5,-505.48 1428.5,-505.48 1538,-483.48 1538,-483.48 1538,-483.48 1554.11,-476.08 1571.88,-467.93"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1282.98,-476.62 1275.58,-477.06 1281.64,-481.33 1282.98,-476.62"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1573.13,-470.05 1578.47,-464.9 1571.08,-465.59 1573.13,-470.05"/>
<text text-anchor="middle" x="1402" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">invalid / denied</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1954.37,-478.99C2002.41,-492.66 2047.5,-505.48 2047.5,-505.48 2047.5,-505.48 2100.5,-505.48 2100.5,-505.48 2100.5,-505.48 2210,-483.48 2210,-483.48 2210,-483.48 2226.11,-476.08 2243.88,-467.93"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1954.98,-476.62 1947.58,-477.06 1953.64,-481.33 1954.98,-476.62"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2245.13,-470.05 2250.47,-464.9 2243.08,-465.59 2245.13,-470.05"/>
<text text-anchor="middle" x="2074" y="-509.08" font-family="Arial" font-size="8.00" fill="#374151">invalid / denied</text>
</g>
<!-- sram -->
<g id="node13" class="node">
<title>sram</title>
<path fill="#fff3c9" stroke="#4b5563" stroke-width="1.1" d="M1512,-464.74C1512,-464.74 1414,-464.74 1414,-464.74 1408,-464.74 1402,-458.74 1402,-452.74 1402,-452.74 1402,-440.74 1402,-440.74 1402,-434.74 1408,-428.74 1414,-428.74 1414,-428.74 1512,-428.74 1512,-428.74 1518,-428.74 1524,-434.74 1524,-440.74 1524,-440.74 1524,-452.74 1524,-452.74 1524,-458.74 1518,-464.74 1512,-464.74"/>
<text text-anchor="middle" x="1463" y="-449.74" font-family="Arial" font-size="10.00" fill="#111827">On&#45;chip SRAM</text>
<text text-anchor="middle" x="1463" y="-438.74" font-family="Arial" font-size="10.00" fill="#111827">optional RIB2RAM path</text>
<path fill="#fff3c9" stroke="#4b5563" stroke-width="1.1" d="M2184,-464.74C2184,-464.74 2086,-464.74 2086,-464.74 2080,-464.74 2074,-458.74 2074,-452.74 2074,-452.74 2074,-440.74 2074,-440.74 2074,-434.74 2080,-428.74 2086,-428.74 2086,-428.74 2184,-428.74 2184,-428.74 2190,-428.74 2196,-434.74 2196,-440.74 2196,-440.74 2196,-452.74 2196,-452.74 2196,-458.74 2190,-464.74 2184,-464.74"/>
<text text-anchor="middle" x="2135" y="-449.74" font-family="Arial" font-size="10.00" fill="#111827">On&#45;chip SRAM</text>
<text text-anchor="middle" x="2135" y="-438.74" font-family="Arial" font-size="10.00" fill="#111827">optional RIB2RAM path</text>
</g>
<!-- fabric&#45;&gt;sram -->
<g id="edge14" class="edge">
<title>fabric&#45;&gt;sram</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1348.91,-446.74C1364.95,-446.74 1380.44,-446.74 1394.56,-446.74"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1394.81,-449.19 1401.81,-446.74 1394.81,-444.29 1394.81,-449.19"/>
<text text-anchor="middle" x="1375.31" y="-452.34" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2020.91,-446.74C2036.95,-446.74 2052.44,-446.74 2066.56,-446.74"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2066.81,-449.19 2073.81,-446.74 2066.81,-444.29 2066.81,-449.19"/>
<text text-anchor="middle" x="2047.31" y="-452.34" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- ribp_adapter -->
<g id="node14" class="node">
<title>ribp_adapter</title>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1180.5,-355C1180.5,-355 1139.5,-355 1139.5,-355 1133.5,-355 1127.5,-349 1127.5,-343 1127.5,-343 1127.5,-331 1127.5,-331 1127.5,-325 1133.5,-319 1139.5,-319 1139.5,-319 1180.5,-319 1180.5,-319 1186.5,-319 1192.5,-325 1192.5,-331 1192.5,-331 1192.5,-343 1192.5,-343 1192.5,-349 1186.5,-355 1180.5,-355"/>
<text text-anchor="middle" x="1160" y="-334.5" font-family="Arial" font-size="10.00" fill="#111827">RIB2RIBP</text>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M2059.5,-355C2059.5,-355 2018.5,-355 2018.5,-355 2012.5,-355 2006.5,-349 2006.5,-343 2006.5,-343 2006.5,-331 2006.5,-331 2006.5,-325 2012.5,-319 2018.5,-319 2018.5,-319 2059.5,-319 2059.5,-319 2065.5,-319 2071.5,-325 2071.5,-331 2071.5,-331 2071.5,-343 2071.5,-343 2071.5,-349 2065.5,-355 2059.5,-355"/>
<text text-anchor="middle" x="2039" y="-334.5" font-family="Arial" font-size="10.00" fill="#111827">RIB2RIBP</text>
</g>
<!-- fabric&#45;&gt;ribp_adapter -->
<g id="edge15" class="edge">
<title>fabric&#45;&gt;ribp_adapter</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1166,-409.87C1164.7,-394.27 1163.21,-376.39 1162.04,-362.38"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1164.45,-361.79 1161.42,-355.02 1159.56,-362.2 1164.45,-361.79"/>
<text text-anchor="middle" x="1170" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1906.93,-409.87C1938.38,-392.75 1974.87,-372.9 2001.51,-358.4"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2002.74,-360.52 2007.72,-355.02 2000.4,-356.22 2002.74,-360.52"/>
<text text-anchor="middle" x="1970" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- apb_adapter -->
<g id="node15" class="node">
<title>apb_adapter</title>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M2420,-355C2420,-355 2350,-355 2350,-355 2344,-355 2338,-349 2338,-343 2338,-343 2338,-331 2338,-331 2338,-325 2344,-319 2350,-319 2350,-319 2420,-319 2420,-319 2426,-319 2432,-325 2432,-331 2432,-331 2432,-343 2432,-343 2432,-349 2426,-355 2420,-355"/>
<text text-anchor="middle" x="2385" y="-340" font-family="Arial" font-size="10.00" fill="#111827">RIB2APB</text>
<text text-anchor="middle" x="2385" y="-329" font-family="Arial" font-size="10.00" fill="#111827">direct APB bridge</text>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M1212,-355C1212,-355 1142,-355 1142,-355 1136,-355 1130,-349 1130,-343 1130,-343 1130,-331 1130,-331 1130,-325 1136,-319 1142,-319 1142,-319 1212,-319 1212,-319 1218,-319 1224,-325 1224,-331 1224,-331 1224,-343 1224,-343 1224,-349 1218,-355 1212,-355"/>
<text text-anchor="middle" x="1177" y="-340" font-family="Arial" font-size="10.00" fill="#111827">RIB2APB</text>
<text text-anchor="middle" x="1177" y="-329" font-family="Arial" font-size="10.00" fill="#111827">direct APB bridge</text>
</g>
<!-- fabric&#45;&gt;apb_adapter -->
<g id="edge16" class="edge">
<title>fabric&#45;&gt;apb_adapter</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1296.34,-425.05C1344.99,-417.15 1389,-410 1389,-410 1389,-410 1666,-378 1666,-378 1666,-378 2162.98,-350.35 2330.57,-341.03"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2330.97,-343.46 2337.82,-340.62 2330.7,-338.57 2330.97,-343.46"/>
<text text-anchor="middle" x="1673" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1713.76,-425.1C1567.99,-401.44 1335.81,-363.77 1231.21,-346.8"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1231.51,-344.36 1224.21,-345.66 1230.73,-349.2 1231.51,-344.36"/>
<text text-anchor="middle" x="1476" y="-380.6" font-family="Arial" font-size="8.00" fill="#374151">RIB</text>
</g>
<!-- sysctrl -->
<g id="node16" class="node">
<title>sysctrl</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M2114.5,-255C2114.5,-255 1951.5,-255 1951.5,-255 1945.5,-255 1939.5,-249 1939.5,-243 1939.5,-243 1939.5,-222 1939.5,-222 1939.5,-216 1945.5,-210 1951.5,-210 1951.5,-210 2114.5,-210 2114.5,-210 2120.5,-210 2126.5,-216 2126.5,-222 2126.5,-222 2126.5,-243 2126.5,-243 2126.5,-249 2120.5,-255 2114.5,-255"/>
<text text-anchor="middle" x="2033" y="-241" font-family="Arial" font-size="10.00" fill="#111827">SYSCTRL</text>
<text text-anchor="middle" x="2033" y="-230" font-family="Arial" font-size="10.00" fill="#111827">PLL, user&#45;core select/reset/bus enable</text>
<text text-anchor="middle" x="2033" y="-219" font-family="Arial" font-size="10.00" fill="#111827">fault and performance control</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1895.5,-255C1895.5,-255 1732.5,-255 1732.5,-255 1726.5,-255 1720.5,-249 1720.5,-243 1720.5,-243 1720.5,-222 1720.5,-222 1720.5,-216 1726.5,-210 1732.5,-210 1732.5,-210 1895.5,-210 1895.5,-210 1901.5,-210 1907.5,-216 1907.5,-222 1907.5,-222 1907.5,-243 1907.5,-243 1907.5,-249 1901.5,-255 1895.5,-255"/>
<text text-anchor="middle" x="1814" y="-241" font-family="Arial" font-size="10.00" fill="#111827">SYSCTRL</text>
<text text-anchor="middle" x="1814" y="-230" font-family="Arial" font-size="10.00" fill="#111827">PLL, user&#45;core select/reset/bus enable</text>
<text text-anchor="middle" x="1814" y="-219" font-family="Arial" font-size="10.00" fill="#111827">fault and performance control</text>
</g>
<!-- ribp_adapter&#45;&gt;sysctrl -->
<g id="edge17" class="edge">
<title>ribp_adapter&#45;&gt;sysctrl</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1192.91,-332.52C1339.53,-317.02 1926,-255 1926,-255 1926,-255 1928.31,-254.54 1932.25,-253.74"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1932.74,-256.14 1939.12,-252.36 1931.77,-251.34 1932.74,-256.14"/>
<text text-anchor="middle" x="1708.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2006.28,-321.1C1970,-304.57 1910.9,-277.64 1867.78,-258"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1868.66,-255.71 1861.27,-255.04 1866.63,-260.17 1868.66,-255.71"/>
<text text-anchor="middle" x="1955.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- ribp_adapter&#45;&gt;clint -->
<g id="edge18" class="edge">
<title>ribp_adapter&#45;&gt;clint</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1127.41,-323.94C1083.5,-307.69 1004.37,-278.41 948.04,-257.57"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="948.71,-255.2 941.29,-255.07 947.01,-259.8 948.71,-255.2"/>
<text text-anchor="middle" x="1055.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2006.31,-333.4C1864.65,-322.11 1311,-278 1311,-278 1311,-278 819,-255 819,-255 819,-255 816.14,-254.29 811.46,-253.14"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="812.02,-250.75 804.63,-251.45 810.84,-255.51 812.02,-250.75"/>
<text text-anchor="middle" x="1535.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- ribp_targets -->
<g id="node18" class="node">
<title>ribp_targets</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1900.5,-255C1900.5,-255 1695.5,-255 1695.5,-255 1689.5,-255 1683.5,-249 1683.5,-243 1683.5,-243 1683.5,-222 1683.5,-222 1683.5,-216 1689.5,-210 1695.5,-210 1695.5,-210 1900.5,-210 1900.5,-210 1906.5,-210 1912.5,-216 1912.5,-222 1912.5,-222 1912.5,-243 1912.5,-243 1912.5,-249 1906.5,-255 1900.5,-255"/>
<text text-anchor="middle" x="1798" y="-241" font-family="Arial" font-size="10.00" fill="#111827">RIBP target wrapper</text>
<text text-anchor="middle" x="1798" y="-230" font-family="Arial" font-size="10.00" fill="#111827">XPI/Flash, SDRAM, PSRAM, SPI&#45;SD and DVP</text>
<text text-anchor="middle" x="1798" y="-219" font-family="Arial" font-size="10.00" fill="#111827">I2S</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M2705.5,-255C2705.5,-255 2500.5,-255 2500.5,-255 2494.5,-255 2488.5,-249 2488.5,-243 2488.5,-243 2488.5,-222 2488.5,-222 2488.5,-216 2494.5,-210 2500.5,-210 2500.5,-210 2705.5,-210 2705.5,-210 2711.5,-210 2717.5,-216 2717.5,-222 2717.5,-222 2717.5,-243 2717.5,-243 2717.5,-249 2711.5,-255 2705.5,-255"/>
<text text-anchor="middle" x="2603" y="-241" font-family="Arial" font-size="10.00" fill="#111827">RIBP target wrapper</text>
<text text-anchor="middle" x="2603" y="-230" font-family="Arial" font-size="10.00" fill="#111827">XPI/Flash, SDRAM, PSRAM, SPI&#45;SD and DVP</text>
<text text-anchor="middle" x="2603" y="-219" font-family="Arial" font-size="10.00" fill="#111827">I2S</text>
</g>
<!-- ribp_adapter&#45;&gt;ribp_targets -->
<g id="edge19" class="edge">
<title>ribp_adapter&#45;&gt;ribp_targets</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1192.58,-326.82C1234.5,-315.01 1302,-296 1302,-296 1302,-296 1332,-278 1332,-278 1332,-278 1670,-255 1670,-255 1670,-255 1672.29,-254.61 1676.27,-253.95"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1676.72,-256.36 1683.22,-252.78 1675.91,-251.52 1676.72,-256.36"/>
<text text-anchor="middle" x="1341.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2071.76,-330.05C2149.89,-315.85 2350.38,-279.41 2481.49,-255.58"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2482.01,-257.98 2488.46,-254.32 2481.14,-253.16 2482.01,-257.98"/>
<text text-anchor="middle" x="2363.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- ribp_adapter&#45;&gt;uart0 -->
<g id="edge20" class="edge">
<title>ribp_adapter&#45;&gt;uart0</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1192.6,-321.67C1218.71,-310.19 1251,-296 1251,-296 1251,-296 1281,-278 1281,-278 1281,-278 1458,-255 1458,-255 1458,-255 1460.57,-254.48 1464.91,-253.6"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1465.48,-255.98 1471.86,-252.19 1464.51,-251.18 1465.48,-255.98"/>
<text text-anchor="middle" x="1290.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2071.81,-333.44C2184.81,-324.61 2551,-296 2551,-296 2551,-296 2917,-255 2917,-255 2917,-255 2919.16,-254.56 2922.87,-253.8"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2923.51,-256.17 2929.88,-252.36 2922.53,-251.37 2923.51,-256.17"/>
<text text-anchor="middle" x="2710.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- ribp_adapter&#45;&gt;i2c_controllers -->
<g id="edge21" class="edge">
<title>ribp_adapter&#45;&gt;i2c_controllers</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1159.57,-318.8C1159.3,-307.96 1159,-296 1159,-296 1159,-296 1159,-278 1159,-278 1159,-278 1201.54,-267.54 1245.38,-256.76"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1246.2,-259.08 1252.42,-255.03 1245.03,-254.33 1246.2,-259.08"/>
<text text-anchor="middle" x="1168.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2039,-318.61C2039,-303.32 2039,-280.75 2039,-262.69"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2041.45,-262.26 2039,-255.26 2036.55,-262.26 2041.45,-262.26"/>
<text text-anchor="middle" x="2048.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- gpio_controller -->
<g id="node21" class="node">
<title>gpio_controller</title>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M1145,-255C1145,-255 995,-255 995,-255 989,-255 983,-249 983,-243 983,-243 983,-222 983,-222 983,-216 989,-210 995,-210 995,-210 1145,-210 1145,-210 1151,-210 1157,-216 1157,-222 1157,-222 1157,-243 1157,-243 1157,-249 1151,-255 1145,-255"/>
<text text-anchor="middle" x="1070" y="-241" font-family="Arial" font-size="10.00" fill="#111827">GPIO V2</text>
<text text-anchor="middle" x="1070" y="-230" font-family="Arial" font-size="10.00" fill="#111827">user + management RIBP windows</text>
<text text-anchor="middle" x="1070" y="-219" font-family="Arial" font-size="10.00" fill="#111827">atomic I/O, filter, locks, IRQ18</text>
<path fill="#f9e1e7" stroke="#4b5563" stroke-width="1.1" d="M2384,-255C2384,-255 2234,-255 2234,-255 2228,-255 2222,-249 2222,-243 2222,-243 2222,-222 2222,-222 2222,-216 2228,-210 2234,-210 2234,-210 2384,-210 2384,-210 2390,-210 2396,-216 2396,-222 2396,-222 2396,-243 2396,-243 2396,-249 2390,-255 2384,-255"/>
<text text-anchor="middle" x="2309" y="-241" font-family="Arial" font-size="10.00" fill="#111827">GPIO V2</text>
<text text-anchor="middle" x="2309" y="-230" font-family="Arial" font-size="10.00" fill="#111827">user + management RIBP windows</text>
<text text-anchor="middle" x="2309" y="-219" font-family="Arial" font-size="10.00" fill="#111827">atomic I/O, filter, locks, IRQ18</text>
</g>
<!-- ribp_adapter&#45;&gt;gpio_controller -->
<g id="edge22" class="edge">
<title>ribp_adapter&#45;&gt;gpio_controller</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1128.62,-318.8C1108.83,-307.96 1087,-296 1087,-296 1087,-296 1082.23,-278.46 1077.74,-261.96"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1080.05,-261.12 1075.85,-255.01 1075.32,-262.41 1080.05,-261.12"/>
<text text-anchor="middle" x="1107" y="-289.6" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<text text-anchor="middle" x="1107" y="-280.6" font-family="Arial" font-size="8.00" fill="#374151">user/admin</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2071.57,-323.64C2114.48,-307.35 2190.87,-278.35 2245.42,-257.64"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2246.62,-259.8 2252.3,-255.03 2244.88,-255.22 2246.62,-259.8"/>
<text text-anchor="middle" x="2210" y="-289.6" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<text text-anchor="middle" x="2210" y="-280.6" font-family="Arial" font-size="8.00" fill="#374151">user/admin</text>
</g>
<!-- ribp_adapter&#45;&gt;timers -->
<g id="edge23" class="edge">
<title>ribp_adapter&#45;&gt;timers</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1127.45,-329.04C1059.05,-314.4 897.71,-279.87 788.91,-256.59"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="789.18,-254.14 781.82,-255.07 788.15,-258.93 789.18,-254.14"/>
<text text-anchor="middle" x="972.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2006.46,-331.91C1925.42,-321.71 1721,-296 1721,-296 1721,-296 1678.76,-275.69 1642.44,-258.23"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1643.11,-255.83 1635.74,-255.01 1640.99,-260.25 1643.11,-255.83"/>
<text text-anchor="middle" x="1730.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- ribp_adapter&#45;&gt;ws2812 -->
<g id="edge24" class="edge">
<title>ribp_adapter&#45;&gt;ws2812</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1127.41,-331.57C1050.87,-321.15 866,-296 866,-296 866,-296 565,-255 565,-255 565,-255 562.82,-254.49 559.14,-253.63"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="559.58,-251.22 552.21,-252.01 558.47,-255.99 559.58,-251.22"/>
<text text-anchor="middle" x="875.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2071.91,-332.15C2209.43,-316.05 2731,-255 2731,-255 2731,-255 2733.58,-254.4 2737.88,-253.41"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2738.45,-255.79 2744.72,-251.83 2737.35,-251.02 2738.45,-255.79"/>
<text text-anchor="middle" x="2535.5" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">RIBP</text>
</g>
<!-- apb_targets -->
<g id="node24" class="node">
<title>apb_targets</title>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M2356.5,-255C2356.5,-255 2165.5,-255 2165.5,-255 2159.5,-255 2153.5,-249 2153.5,-243 2153.5,-243 2153.5,-222 2153.5,-222 2153.5,-216 2159.5,-210 2165.5,-210 2165.5,-210 2356.5,-210 2356.5,-210 2362.5,-210 2368.5,-216 2368.5,-222 2368.5,-222 2368.5,-243 2368.5,-243 2368.5,-249 2362.5,-255 2356.5,-255"/>
<text text-anchor="middle" x="2261" y="-241" font-family="Arial" font-size="10.00" fill="#111827">APB target wrapper</text>
<text text-anchor="middle" x="2261" y="-230" font-family="Arial" font-size="10.00" fill="#111827">UART1, PWM, PS/2, RTC</text>
<text text-anchor="middle" x="2261" y="-219" font-family="Arial" font-size="10.00" fill="#111827">watchdog, CRC, advanced timer and user IP</text>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M1449.5,-255C1449.5,-255 1306.5,-255 1306.5,-255 1300.5,-255 1294.5,-249 1294.5,-243 1294.5,-243 1294.5,-222 1294.5,-222 1294.5,-216 1300.5,-210 1306.5,-210 1306.5,-210 1449.5,-210 1449.5,-210 1455.5,-210 1461.5,-216 1461.5,-222 1461.5,-222 1461.5,-243 1461.5,-243 1461.5,-249 1455.5,-255 1449.5,-255"/>
<text text-anchor="middle" x="1378" y="-241" font-family="Arial" font-size="10.00" fill="#111827">APB target wrapper</text>
<text text-anchor="middle" x="1378" y="-230" font-family="Arial" font-size="10.00" fill="#111827">UART1, PWM, RTC, watchdog</text>
<text text-anchor="middle" x="1378" y="-219" font-family="Arial" font-size="10.00" fill="#111827">CRC, advanced timer and user IP</text>
</g>
<!-- apb_adapter&#45;&gt;apb_targets -->
<g id="edge27" class="edge">
<g id="edge28" class="edge">
<title>apb_adapter&#45;&gt;apb_targets</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2364.25,-318.84C2344.8,-302.77 2315.44,-278.5 2292.99,-259.95"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2294.4,-257.93 2287.45,-255.36 2291.28,-261.71 2294.4,-257.93"/>
<text text-anchor="middle" x="2342" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1210.64,-318.84C1243.08,-302.3 1292.51,-277.1 1329.25,-258.36"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1330.37,-260.54 1335.5,-255.17 1328.15,-256.17 1330.37,-260.54"/>
<text text-anchor="middle" x="1297" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
</g>
<!-- archinfo -->
<g id="node25" class="node">
<title>archinfo</title>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M2612,-255C2612,-255 2408,-255 2408,-255 2402,-255 2396,-249 2396,-243 2396,-243 2396,-222 2396,-222 2396,-216 2402,-210 2408,-210 2408,-210 2612,-210 2612,-210 2618,-210 2624,-216 2624,-222 2624,-222 2624,-243 2624,-243 2624,-249 2618,-255 2612,-255"/>
<text text-anchor="middle" x="2510" y="-241" font-family="Arial" font-size="10.00" fill="#111827">ARCHINFO V2</text>
<text text-anchor="middle" x="2510" y="-230" font-family="Arial" font-size="10.00" fill="#111827">read&#45;only build, topology and technology identity</text>
<text text-anchor="middle" x="2510" y="-219" font-family="Arial" font-size="10.00" fill="#111827">lifecycle&#45;gated 128&#45;bit device ID</text>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M1048,-255C1048,-255 844,-255 844,-255 838,-255 832,-249 832,-243 832,-243 832,-222 832,-222 832,-216 838,-210 844,-210 844,-210 1048,-210 1048,-210 1054,-210 1060,-216 1060,-222 1060,-222 1060,-243 1060,-243 1060,-249 1054,-255 1048,-255"/>
<text text-anchor="middle" x="946" y="-241" font-family="Arial" font-size="10.00" fill="#111827">ARCHINFO V2</text>
<text text-anchor="middle" x="946" y="-230" font-family="Arial" font-size="10.00" fill="#111827">read&#45;only build, topology and technology identity</text>
<text text-anchor="middle" x="946" y="-219" font-family="Arial" font-size="10.00" fill="#111827">lifecycle&#45;gated 128&#45;bit device ID</text>
</g>
<!-- apb_adapter&#45;&gt;archinfo -->
<g id="edge25" class="edge">
<title>apb_adapter&#45;&gt;archinfo</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2405.92,-318.84C2425.53,-302.77 2455.12,-278.5 2477.75,-259.95"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2479.48,-261.69 2483.34,-255.36 2476.37,-257.9 2479.48,-261.69"/>
<text text-anchor="middle" x="2462" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1138.6,-318.96C1101.01,-302.28 1043.38,-276.71 1000.95,-257.88"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1001.93,-255.64 994.54,-255.04 999.95,-260.12 1001.93,-255.64"/>
<text text-anchor="middle" x="1090" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
</g>
<!-- rng -->
<g id="node26" class="node">
<title>rng</title>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M2877,-255C2877,-255 2663,-255 2663,-255 2657,-255 2651,-249 2651,-243 2651,-243 2651,-222 2651,-222 2651,-216 2657,-210 2663,-210 2663,-210 2877,-210 2877,-210 2883,-210 2889,-216 2889,-222 2889,-222 2889,-243 2889,-243 2889,-249 2883,-255 2877,-255"/>
<text text-anchor="middle" x="2770" y="-241" font-family="Arial" font-size="10.00" fill="#111827">RNG V2 entropy controller</text>
<text text-anchor="middle" x="2770" y="-230" font-family="Arial" font-size="10.00" fill="#111827">8&#45;word FIFO, fail&#45;closed monitoring, IRQ16</text>
<text text-anchor="middle" x="2770" y="-219" font-family="Arial" font-size="10.00" fill="#111827">management&#45;only, deterministic source unqualified</text>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M620,-255C620,-255 406,-255 406,-255 400,-255 394,-249 394,-243 394,-243 394,-222 394,-222 394,-216 400,-210 406,-210 406,-210 620,-210 620,-210 626,-210 632,-216 632,-222 632,-222 632,-243 632,-243 632,-249 626,-255 620,-255"/>
<text text-anchor="middle" x="513" y="-241" font-family="Arial" font-size="10.00" fill="#111827">RNG V2 entropy controller</text>
<text text-anchor="middle" x="513" y="-230" font-family="Arial" font-size="10.00" fill="#111827">8&#45;word FIFO, fail&#45;closed monitoring, IRQ16</text>
<text text-anchor="middle" x="513" y="-219" font-family="Arial" font-size="10.00" fill="#111827">management&#45;only, deterministic source unqualified</text>
</g>
<!-- apb_adapter&#45;&gt;rng -->
<g id="edge26" class="edge">
<title>apb_adapter&#45;&gt;rng</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2432.21,-323.43C2494.29,-306.9 2604.56,-277.54 2682.19,-256.88"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2683,-259.2 2689.13,-255.03 2681.74,-254.46 2683,-259.2"/>
<text text-anchor="middle" x="2608" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1129.88,-328.81C999.92,-308.99 646,-255 646,-255 646,-255 643.51,-254.6 639.2,-253.9"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="639.57,-251.48 632.27,-252.78 638.79,-256.32 639.57,-251.48"/>
<text text-anchor="middle" x="919" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
</g>
<!-- ps2 -->
<g id="node27" class="node">
<title>ps2</title>
<path fill="#e6f4ea" stroke="#4b5563" stroke-width="1.1" d="M1255,-255C1255,-255 1099,-255 1099,-255 1093,-255 1087,-249 1087,-243 1087,-243 1087,-222 1087,-222 1087,-216 1093,-210 1099,-210 1099,-210 1255,-210 1255,-210 1261,-210 1267,-216 1267,-222 1267,-222 1267,-243 1267,-243 1267,-249 1261,-255 1255,-255"/>
<text text-anchor="middle" x="1177" y="-241" font-family="Arial" font-size="10.00" fill="#111827">PS/2 host V2</text>
<text text-anchor="middle" x="1177" y="-230" font-family="Arial" font-size="10.00" fill="#111827">bidirectional open&#45;drain transport</text>
<text text-anchor="middle" x="1177" y="-219" font-family="Arial" font-size="10.00" fill="#111827">16&#45;byte RX/TX FIFOs, errors, IRQ12</text>
</g>
<!-- apb_adapter&#45;&gt;ps2 -->
<g id="edge27" class="edge">
<title>apb_adapter&#45;&gt;ps2</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1177,-318.61C1177,-303.32 1177,-280.75 1177,-262.69"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1179.45,-262.26 1177,-255.26 1174.55,-262.26 1179.45,-262.26"/>
<text text-anchor="middle" x="1185" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">APB</text>
</g>
<!-- irq -->
<g id="node28" class="node">
<g id="node29" class="node">
<title>irq</title>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M1226,-155C1226,-155 1020,-155 1020,-155 1014,-155 1008,-149 1008,-143 1008,-143 1008,-131 1008,-131 1008,-125 1014,-119 1020,-119 1020,-119 1226,-119 1226,-119 1232,-119 1238,-125 1238,-131 1238,-131 1238,-143 1238,-143 1238,-149 1232,-155 1226,-155"/>
<text text-anchor="middle" x="1123" y="-140" font-family="Arial" font-size="10.00" fill="#111827">Interrupt aggregation</text>
<text text-anchor="middle" x="1123" y="-129" font-family="Arial" font-size="10.00" fill="#111827">RIBP and APB target IRQs to management core</text>
<path fill="#fce7f3" stroke="#4b5563" stroke-width="1.1" d="M1891,-155C1891,-155 1685,-155 1685,-155 1679,-155 1673,-149 1673,-143 1673,-143 1673,-131 1673,-131 1673,-125 1679,-119 1685,-119 1685,-119 1891,-119 1891,-119 1897,-119 1903,-125 1903,-131 1903,-131 1903,-143 1903,-143 1903,-149 1897,-155 1891,-155"/>
<text text-anchor="middle" x="1788" y="-140" font-family="Arial" font-size="10.00" fill="#111827">Interrupt aggregation</text>
<text text-anchor="middle" x="1788" y="-129" font-family="Arial" font-size="10.00" fill="#111827">RIBP and APB target IRQs to management core</text>
</g>
<!-- clint&#45;&gt;irq -->
<g id="edge32" class="edge">
<g id="edge33" class="edge">
<title>clint&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M935.5,-209.89C971.58,-195.05 1013,-178 1013,-178 1013,-178 1041.4,-167.67 1069.34,-157.51"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1070.29,-159.77 1076.03,-155.08 1068.62,-155.17 1070.29,-159.77"/>
<text text-anchor="middle" x="1051.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">machine IRQ0 / IRQ1</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M804.63,-213.55C813.22,-211.43 819,-210 819,-210 819,-210 1404.6,-166.49 1665.32,-147.12"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1665.76,-149.54 1672.56,-146.58 1665.4,-144.65 1665.76,-149.54"/>
<text text-anchor="middle" x="1283.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">machine IRQ0 / IRQ1</text>
</g>
<!-- ribp_targets&#45;&gt;ext_io -->
<g id="edge43" class="edge">
<g id="edge46" class="edge">
<title>ribp_targets&#45;&gt;ext_io</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1767.9,-204.74C1722.81,-164.66 1638.27,-89.52 1593.52,-49.74"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1766.54,-206.81 1773.4,-209.63 1769.8,-203.15 1766.54,-206.81"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1595.13,-47.89 1588.27,-45.07 1591.87,-51.56 1595.13,-47.89"/>
<text text-anchor="middle" x="1741" y="-135.1" font-family="Arial" font-size="8.00" fill="#374151">device interfaces</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2637.16,-205.29C2649.75,-195.63 2661,-187 2661,-187 2661,-187 2670.65,-99.32 2675.82,-52.38"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2635.38,-203.57 2631.32,-209.77 2638.37,-207.45 2635.38,-203.57"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2678.28,-52.44 2676.61,-45.21 2673.41,-51.9 2678.28,-52.44"/>
<text text-anchor="middle" x="2702" y="-135.1" font-family="Arial" font-size="8.00" fill="#374151">device interfaces</text>
</g>
<!-- ribp_targets&#45;&gt;gpio_controller -->
<g id="edge28" class="edge">
<g id="edge29" class="edge">
<title>ribp_targets&#45;&gt;gpio_controller</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1683.22,-252.68C1675.08,-254.11 1670,-255 1670,-255 1670,-255 1250,-282.5 1250,-282.5 1250,-282.5 1184,-282.5 1184,-282.5 1184,-282.5 1156.22,-270.32 1128.09,-257.98"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1128.73,-255.58 1121.33,-255.01 1126.76,-260.07 1128.73,-255.58"/>
<text text-anchor="middle" x="1217" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">alternate functions</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2488.39,-232.5C2460.19,-232.5 2430.32,-232.5 2403.21,-232.5"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2403.02,-230.05 2396.02,-232.5 2403.02,-234.95 2403.02,-230.05"/>
<text text-anchor="middle" x="2442.25" y="-238.1" font-family="Arial" font-size="8.00" fill="#374151">alternate functions</text>
</g>
<!-- uart0&#45;&gt;ext_io -->
<g id="edge44" class="edge">
<g id="edge47" class="edge">
<title>uart0&#45;&gt;ext_io</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1564,-202.41C1564,-162.61 1564,-91.61 1564,-52.07"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1561.55,-202.63 1564,-209.63 1566.45,-202.63 1561.55,-202.63"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1566.45,-52.07 1564,-45.07 1561.55,-52.07 1566.45,-52.07"/>
<text text-anchor="middle" x="1585" y="-135.1" font-family="Arial" font-size="8.00" fill="#374151">UART pads</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2979.87,-205.95C2913.83,-165.91 2786.69,-88.81 2720.83,-48.87"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2979.01,-208.29 2986.26,-209.83 2981.55,-204.1 2979.01,-208.29"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2721.91,-46.66 2714.66,-45.12 2719.37,-50.85 2721.91,-46.66"/>
<text text-anchor="middle" x="2916" y="-135.1" font-family="Arial" font-size="8.00" fill="#374151">UART pads</text>
</g>
<!-- uart0&#45;&gt;irq -->
<g id="edge37" class="edge">
<g id="edge38" class="edge">
<title>uart0&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1471.82,-211.96C1394.89,-195.65 1286,-172.56 1210.43,-156.54"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1210.58,-154.06 1203.22,-155.01 1209.56,-158.86 1210.58,-154.06"/>
<text text-anchor="middle" x="1352.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ2</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2929.88,-212.64C2922.02,-211.03 2917,-210 2917,-210 2917,-210 2514,-178 2514,-178 2514,-178 2117.21,-156.14 1910.32,-144.74"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1910.16,-142.28 1903.04,-144.34 1909.89,-147.17 1910.16,-142.28"/>
<text text-anchor="middle" x="2631.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ2</text>
</g>
<!-- i2c_controllers&#45;&gt;gpio_controller -->
<g id="edge38" class="edge">
<g id="edge39" class="edge">
<title>i2c_controllers&#45;&gt;gpio_controller</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1235.1,-232.5C1211.78,-232.5 1187.19,-232.5 1164.33,-232.5"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1164.29,-230.05 1157.29,-232.5 1164.29,-234.95 1164.29,-230.05"/>
<text text-anchor="middle" x="1196.25" y="-247.1" font-family="Arial" font-size="8.00" fill="#374151">GPIO3/4 ALT1</text>
<text text-anchor="middle" x="1196.25" y="-238.1" font-family="Arial" font-size="8.00" fill="#374151">GPIO7/8 ALT0</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2143.78,-232.5C2167.15,-232.5 2191.8,-232.5 2214.72,-232.5"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2214.77,-234.95 2221.77,-232.5 2214.77,-230.05 2214.77,-234.95"/>
<text text-anchor="middle" x="2182.75" y="-247.1" font-family="Arial" font-size="8.00" fill="#374151">GPIO3/4 ALT1</text>
<text text-anchor="middle" x="2182.75" y="-238.1" font-family="Arial" font-size="8.00" fill="#374151">GPIO7/8 ALT0</text>
</g>
<!-- i2c_controllers&#45;&gt;irq -->
<g id="edge40" class="edge">
<g id="edge41" class="edge">
<title>i2c_controllers&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1289.94,-209.93C1253.53,-194.24 1204.61,-173.16 1169.14,-157.88"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1170.08,-155.62 1162.68,-155.1 1168.14,-160.12 1170.08,-155.62"/>
<text text-anchor="middle" x="1255.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ7 / IRQ19</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1981.1,-209.93C1938.72,-194.15 1881.69,-172.9 1840.61,-157.6"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1841.31,-155.25 1833.9,-155.1 1839.6,-159.84 1841.31,-155.25"/>
<text text-anchor="middle" x="1937.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ7 / IRQ19</text>
</g>
<!-- gpio_bridge -->
<g id="node27" class="node">
<g id="node28" class="node">
<title>gpio_bridge</title>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M932.5,-155C932.5,-155 797.5,-155 797.5,-155 791.5,-155 785.5,-149 785.5,-143 785.5,-143 785.5,-131 785.5,-131 785.5,-125 791.5,-119 797.5,-119 797.5,-119 932.5,-119 932.5,-119 938.5,-119 944.5,-125 944.5,-131 944.5,-131 944.5,-143 944.5,-143 944.5,-149 938.5,-155 932.5,-155"/>
<text text-anchor="middle" x="865" y="-140" font-family="Arial" font-size="10.00" fill="#111827">GPIO pad bridge</text>
<text text-anchor="middle" x="865" y="-129" font-family="Arial" font-size="10.00" fill="#111827">PDK capability&#45;adapted controls</text>
<path fill="#e5e7eb" stroke="#4b5563" stroke-width="1.1" d="M2612.5,-155C2612.5,-155 2477.5,-155 2477.5,-155 2471.5,-155 2465.5,-149 2465.5,-143 2465.5,-143 2465.5,-131 2465.5,-131 2465.5,-125 2471.5,-119 2477.5,-119 2477.5,-119 2612.5,-119 2612.5,-119 2618.5,-119 2624.5,-125 2624.5,-131 2624.5,-131 2624.5,-143 2624.5,-143 2624.5,-149 2618.5,-155 2612.5,-155"/>
<text text-anchor="middle" x="2545" y="-140" font-family="Arial" font-size="10.00" fill="#111827">GPIO pad bridge</text>
<text text-anchor="middle" x="2545" y="-129" font-family="Arial" font-size="10.00" fill="#111827">PDK capability&#45;adapted controls</text>
</g>
<!-- gpio_controller&#45;&gt;gpio_bridge -->
<g id="edge29" class="edge">
<g id="edge30" class="edge">
<title>gpio_controller&#45;&gt;gpio_bridge</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M982.94,-212.69C926.71,-200.55 864,-187 864,-187 864,-187 864,-178 864,-178 864,-178 864.18,-170.7 864.39,-162.33"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="866.84,-162.25 864.57,-155.2 861.95,-162.13 866.84,-162.25"/>
<text text-anchor="middle" x="884" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">pad control</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2342.35,-209.74C2365.05,-194.93 2391,-178 2391,-178 2391,-178 2432.45,-167.23 2472.34,-156.87"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2473.08,-159.21 2479.24,-155.08 2471.85,-154.47 2473.08,-159.21"/>
<text text-anchor="middle" x="2411" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">pad control</text>
</g>
<!-- gpio_controller&#45;&gt;irq -->
<g id="edge30" class="edge">
<g id="edge31" class="edge">
<title>gpio_controller&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1082.29,-209.81C1090.46,-195.41 1101.18,-176.49 1109.57,-161.68"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1111.93,-162.5 1113.25,-155.2 1107.66,-160.09 1111.93,-162.5"/>
<text text-anchor="middle" x="1111" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ18</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2221.8,-215.85C2130.37,-199.44 1986.83,-173.68 1890.16,-156.33"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1890.32,-153.87 1882.99,-155.05 1889.45,-158.7 1890.32,-153.87"/>
<text text-anchor="middle" x="2060" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ18</text>
</g>
<!-- timers&#45;&gt;irq -->
<g id="edge31" class="edge">
<g id="edge32" class="edge">
<title>timers&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M783.62,-211.2C842.97,-199.47 906,-187 906,-187 906,-187 940,-178 940,-178 940,-178 990.25,-167.02 1038.09,-156.56"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1038.81,-158.91 1045.13,-155.02 1037.76,-154.12 1038.81,-158.91"/>
<text text-anchor="middle" x="962.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ3 / IRQ4</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1636.69,-209.81C1669.48,-194.25 1713.36,-173.43 1745.41,-158.21"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1746.79,-160.27 1752.07,-155.05 1744.69,-155.84 1746.79,-160.27"/>
<text text-anchor="middle" x="1723.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ3 / IRQ4</text>
</g>
<!-- ws2812&#45;&gt;gpio_bridge -->
<g id="edge33" class="edge">
<g id="edge34" class="edge">
<title>ws2812&#45;&gt;gpio_bridge</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M535.6,-209.89C578.62,-195.05 628,-178 628,-178 628,-178 710.79,-164.03 778.5,-152.6"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="778.93,-155.01 785.42,-151.43 778.11,-150.18 778.93,-155.01"/>
<text text-anchor="middle" x="650.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">GPIO2 ALT1</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2759.64,-209.93C2712.34,-194.08 2648.62,-172.72 2602.91,-157.41"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2603.43,-155 2596.02,-155.1 2601.88,-159.64 2603.43,-155"/>
<text text-anchor="middle" x="2706.5" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">GPIO2 ALT1</text>
</g>
<!-- ws2812&#45;&gt;irq -->
<g id="edge35" class="edge">
<g id="edge36" class="edge">
<title>ws2812&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M552.21,-212.99C559.95,-211.18 565,-210 565,-210 565,-210 836.2,-175.01 1000.47,-153.81"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1001.09,-156.2 1007.72,-152.87 1000.46,-151.34 1001.09,-156.2"/>
<text text-anchor="middle" x="822" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ17</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2744.72,-213.17C2736.45,-211.26 2731,-210 2731,-210 2731,-210 2488,-187 2488,-187 2488,-187 2433,-178 2433,-178 2433,-178 2097.52,-157.2 1910.45,-145.59"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1910.45,-143.14 1903.31,-145.15 1910.15,-148.03 1910.45,-143.14"/>
<text text-anchor="middle" x="2500" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ17</text>
</g>
<!-- apb_targets&#45;&gt;gpio_controller -->
<g id="edge42" class="edge">
<g id="edge45" class="edge">
<title>apb_targets&#45;&gt;gpio_controller</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2153.41,-252.51C2145.19,-254.04 2140,-255 2140,-255 2140,-255 1393,-282.5 1393,-282.5 1393,-282.5 1357,-282.5 1357,-282.5 1357,-282.5 1247.93,-263.5 1164.27,-248.92"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1164.6,-246.49 1157.28,-247.71 1163.75,-251.32 1164.6,-246.49"/>
<text text-anchor="middle" x="1375" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">user_gpio</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1461.51,-251.87C1469.67,-253.76 1475,-255 1475,-255 1475,-255 1746,-282.5 1746,-282.5 1746,-282.5 1782,-282.5 1782,-282.5 1782,-282.5 2157,-255 2157,-255 2157,-255 2183.74,-251.04 2214.79,-246.45"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2215.34,-248.84 2221.9,-245.39 2214.62,-243.99 2215.34,-248.84"/>
<text text-anchor="middle" x="1764" y="-285.1" font-family="Arial" font-size="8.00" fill="#374151">user_gpio</text>
</g>
<!-- rng&#45;&gt;irq -->
<g id="edge41" class="edge">
<g id="edge42" class="edge">
<title>rng&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2650.66,-212.06C2642.84,-210.79 2638,-210 2638,-210 2638,-210 1605.41,-160.93 1245.2,-143.81"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1245.22,-141.36 1238.11,-143.47 1244.99,-146.25 1245.22,-141.36"/>
<text text-anchor="middle" x="2159" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ16</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M632.27,-212.22C640.72,-210.85 646,-210 646,-210 646,-210 1102,-178 1102,-178 1102,-178 1468.29,-156.64 1665.56,-145.14"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1665.95,-147.57 1672.79,-144.72 1665.66,-142.68 1665.95,-147.57"/>
<text text-anchor="middle" x="1114" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ16</text>
</g>
<!-- ps2&#45;&gt;gpio_controller -->
<g id="edge43" class="edge">
<title>ps2&#45;&gt;gpio_controller</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1267.4,-252.06C1275.66,-253.85 1281,-255 1281,-255 1281,-255 1807,-287 1807,-287 1807,-287 1859,-287 1859,-287 1859,-287 2157,-255 2157,-255 2157,-255 2183.74,-251.04 2214.79,-246.45"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2215.34,-248.84 2221.9,-245.39 2214.62,-243.99 2215.34,-248.84"/>
<text text-anchor="middle" x="1833" y="-289.6" font-family="Arial" font-size="8.00" fill="#374151">GPIO0/1 ALT1</text>
<text text-anchor="middle" x="1833" y="-280.6" font-family="Arial" font-size="8.00" fill="#374151">open drain</text>
</g>
<!-- ps2&#45;&gt;irq -->
<g id="edge44" class="edge">
<title>ps2&#45;&gt;irq</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M1267.4,-212.81C1275.66,-211.1 1281,-210 1281,-210 1281,-210 1515.85,-176.65 1665.88,-155.34"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1666.37,-157.75 1672.95,-154.34 1665.68,-152.9 1666.37,-157.75"/>
<text text-anchor="middle" x="1516" y="-180.6" font-family="Arial" font-size="8.00" fill="#374151">IRQ12</text>
</g>
<!-- gpio_bridge&#45;&gt;ext_io -->
<g id="edge45" class="edge">
<g id="edge48" class="edge">
<title>gpio_bridge&#45;&gt;ext_io</title>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M915.39,-116.23C951.94,-101.89 995,-85 995,-85 995,-85 1282.34,-53.94 1448.64,-35.97"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="914.27,-114.04 908.65,-118.88 916.06,-118.6 914.27,-114.04"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="1449.28,-38.36 1455.97,-35.18 1448.75,-33.49 1449.28,-38.36"/>
<text text-anchor="middle" x="1167" y="-70.6" font-family="Arial" font-size="8.00" fill="#374151">pad control</text>
<path fill="none" stroke="#4b5563" stroke-width="1.2" d="M2569,-113.95C2590.61,-94.09 2619,-68 2619,-68 2619,-68 2630.85,-59.21 2644.01,-49.45"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2567.17,-112.3 2563.67,-118.84 2570.49,-115.91 2567.17,-112.3"/>
<polygon fill="#4b5563" stroke="#4b5563" stroke-width="1.2" points="2645.54,-51.37 2649.7,-45.23 2642.62,-47.43 2645.54,-51.37"/>
<text text-anchor="middle" x="2639" y="-70.6" font-family="Arial" font-size="8.00" fill="#374151">pad control</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 49 KiB

-1
View File
@@ -1,2 +1 @@
instance { retrosoc_tb.u_retrosoc_asic.\u_retrosoc.u_axil_ip_wrapper.u_apb4_ps2.u_ps2_clk_edge_det_fe.u_cdc_sync.CDC_SYNC_BLOCK[0].genblk1.u_sync_dffr.dat_o_reg } { noTiming };
instance { retrosoc_tb.u_retrosoc_asic.\u_retrosoc.u_axil_ip_wrapper.u_apb4_uart.u_uart_rx.reg_rx_sync_0__reg } { noTiming };
+7 -27
View File
@@ -35,8 +35,8 @@ module retrosoc_tb;
wire s_uart0_tx;
// for handle x-prop issue
wire s_uart0_rx = 1'b1;
wire s_gpio_0_io;
wire s_gpio_1_ip;
tri1 s_gpio_0_io;
tri1 s_gpio_1_io;
wire s_psram_sck;
wire s_psram_nss0;
wire s_psram_nss1;
@@ -74,8 +74,6 @@ module retrosoc_tb;
wire s_uart1_tx;
wire s_uart1_rx;
wire s_ps2_clk;
wire s_ps2_dat;
`ifdef HAVE_PLL
always #(1000 / XTAL_CPU_FREQ / 2) r_xtal_clk = (r_xtal_clk === 1'b0);
@@ -156,15 +154,9 @@ module retrosoc_tb;
);
kdb_model u_kdb_model_0 (
.ps2_clk_o(s_gpio_0_io),
.ps2_dat_o(s_gpio_1_io)
);
kdb_model u_kdb_model_1 (
.ps2_clk_o(s_ps2_clk),
.ps2_dat_o(s_ps2_dat)
ps2_device_model u_ps2_device_model (
.ps2_clk_io(s_gpio_0_io),
.ps2_dat_io(s_gpio_1_io)
);
@@ -207,25 +199,13 @@ module retrosoc_tb;
r_rst_n = 1;
end
initial begin : KDB_MODEL_0_BLOCK
initial begin : PS2_DEVICE_MODEL_BLOCK
integer i;
#1000;
while (1) begin
#1000;
for (i = 0; i < 26; ++i) begin
u_kdb_model_0.send_code(i + 8'd65);
#500;
end
end
end
initial begin : KDB_MODEL_1_BLOCK
integer i;
#1000;
while (1) begin
#1000;
for (i = 0; i < 26; ++i) begin
u_kdb_model_1.send_code(i + 8'd65);
u_ps2_device_model.send_byte(i + 8'd65, 3'b000);
#500;
end
end
+5
View File
@@ -11,6 +11,11 @@
/clusterip/uart/rtl/apb4_uart.sv
/clusterip/pwm/rtl/pwm_if.sv
/clusterip/pwm/rtl/apb4_pwm.sv
/clusterip/ps2/rtl/ps2_filter.sv
/clusterip/ps2/rtl/ps2_rx.sv
/clusterip/ps2/rtl/ps2_tx.sv
/clusterip/ps2/rtl/ps2_core.sv
/clusterip/ps2/rtl/ps2_reg.sv
/clusterip/ps2/rtl/ps2_if.sv
/clusterip/ps2/rtl/apb4_ps2.sv
/clusterip/i2c/rtl/i2c_if.sv
+1 -1
View File
@@ -1,4 +1,4 @@
/clusterip/ps2/tb/kdb_model.sv
/clusterip/ps2/dv/model/ps2_device_model.sv
/clusterip/i2c/model/at24cxxx.sv
/clusterip/uart/model/rs232.sv
/clusterip/i2s/model/mic.sv
+2 -2
View File
@@ -68,8 +68,8 @@
{"slot": 9, "name": "user_ip", "timed_interface": "u_user_ip_apb_if", "pure_interface": "u_user_ip_apb_pure_if", "region": "APB_USER_IP"}
],
"gpio_alt_functions": [
{"pin": 0, "alt0": {"inputs": ["u_uart1_if.rx_i"], "do": "1'b0", "oe": "1'b0"}, "alt1": {"inputs": ["u_ps2_if.ps2_clk_i"], "do": "1'b0", "oe": "1'b0"}},
{"pin": 1, "alt0": {"inputs": [], "do": "u_uart1_if.tx_o", "oe": "1'b1"}, "alt1": {"inputs": ["u_ps2_if.ps2_dat_i"], "do": "1'b0", "oe": "1'b0"}},
{"pin": 0, "alt0": {"inputs": ["u_uart1_if.rx_i"], "do": "1'b0", "oe": "1'b0"}, "alt1": {"inputs": ["u_ps2_if.ps2_clk_i"], "do": "u_ps2_if.ps2_clk_o", "oe": "u_ps2_if.ps2_clk_oe_o"}},
{"pin": 1, "alt0": {"inputs": [], "do": "u_uart1_if.tx_o", "oe": "1'b1"}, "alt1": {"inputs": ["u_ps2_if.ps2_dat_i"], "do": "u_ps2_if.ps2_dat_o", "oe": "u_ps2_if.ps2_dat_oe_o"}},
{"pin": 2, "alt0": {"inputs": ["s_tmr_capch"], "do": "1'b0", "oe": "1'b0"}, "alt1": {"inputs": [], "do": "u_ws2812_if.dat_o", "oe": "1'b1"}},
{"pin": 3, "alt0": {"inputs": [], "do": "u_pwm_if.do_o[0]", "oe": "1'b1"}, "alt1": {"inputs": ["u_i2c1_if.scl_i"], "do": "u_i2c1_if.scl_o", "oe": "u_i2c1_if.scl_oe_o"}},
{"pin": 4, "alt0": {"inputs": [], "do": "u_pwm_if.do_o[1]", "oe": "1'b1"}, "alt1": {"inputs": ["u_i2c1_if.sda_i"], "do": "u_i2c1_if.sda_o", "oe": "u_i2c1_if.sda_oe_o"}},
+6
View File
@@ -63,6 +63,9 @@ CRT_SRCS := $(ROOT_PATH)/crt/arch/riscv/startup.S \
$(ROOT_PATH)/crt/src/lib/printf.c \
$(ROOT_PATH)/rtl/managed/clusterip/archinfo/sw/src/archinfo.c \
$(ROOT_PATH)/rtl/managed/clusterip/rng/sw/src/rng.c \
$(ROOT_PATH)/rtl/managed/clusterip/ps2/sw/src/ps2.c \
$(ROOT_PATH)/rtl/managed/clusterip/ps2/sw/src/ps2_keyboard.c \
$(ROOT_PATH)/rtl/managed/clusterip/ps2/sw/src/ps2_mouse.c \
$(ROOT_PATH)/crt/src/core/archinfo.c \
$(ROOT_PATH)/crt/src/service/bench.c \
$(ROOT_PATH)/crt/src/service/booter.c \
@@ -131,6 +134,7 @@ INC_PATH := -I$(SW_BUILD_DIR)/include \
-I$(ARCHINFO_METADATA_DIR) \
-I$(ROOT_PATH)/rtl/managed/clusterip/archinfo/sw/include \
-I$(ROOT_PATH)/rtl/managed/clusterip/rng/sw/include \
-I$(ROOT_PATH)/rtl/managed/clusterip/ps2/sw/include \
-I$(ROOT_PATH)/crt/include \
$(addprefix -I,$(APP_INC_DIRS))
SRC_PATH := $(CRT_SRCS) $(APP_SRCS)
@@ -145,6 +149,8 @@ SW_HEADERS += $(shell find $(ROOT_PATH)/rtl/managed/clusterip/archinfo/sw
-type f -name '*.h' 2>/dev/null)
SW_HEADERS += $(shell find $(ROOT_PATH)/rtl/managed/clusterip/rng/sw/include \
-type f -name '*.h' 2>/dev/null)
SW_HEADERS += $(shell find $(ROOT_PATH)/rtl/managed/clusterip/ps2/sw/include \
-type f -name '*.h' 2>/dev/null)
$(VERSION_HEADER): FORCE_VERSION $(ROOT_PATH)/crt/ver.py $(ROOT_PATH)/crt/ver.tmpl
@mkdir -p $(dir $@)
+5 -1
View File
@@ -154,7 +154,11 @@ module ip_apb_wrapper (
.pwm (pwm)
);
apb4_ps2 u_apb4_ps2 (
apb4_ps2 #(
.PCLK_HZ (`SOC_EXT_CLK_HZ),
.RX_FIFO_DEPTH(16),
.TX_FIFO_DEPTH(16)
) u_apb4_ps2 (
.apb4(u_ps2_apb_if),
.ps2 (ps2)
);
+5
View File
@@ -25,6 +25,9 @@ TEST_SOURCES = (
"crt/src/hal/ws2812_math.c",
"crt/src/hal/uart_math.c",
"crt/src/hal/timer_math.c",
"rtl/managed/clusterip/ps2/sw/src/ps2.c",
"rtl/managed/clusterip/ps2/sw/src/ps2_keyboard.c",
"rtl/managed/clusterip/ps2/sw/src/ps2_mouse.c",
"app/media/src/video_player.c",
"app/media/src/wav_audio.c",
"tests/c/test_runtime.c",
@@ -81,6 +84,8 @@ def main() -> int:
"-I",
str(user_extensions_root / "include"),
"-I",
str(root / "rtl/managed/clusterip/ps2/sw/include"),
"-I",
str(root / "crt/include"),
"-I",
str(root / "app/media/include"),
+35 -1
View File
@@ -1,6 +1,9 @@
#include <stddef.h>
#include <stdint.h>
#include <ps2_keyboard.h>
#include <ps2_mouse.h>
#include <retrosoc/core/status.h>
#include <retrosoc/core/wait.h>
#include <retrosoc/hal/gpio.h>
@@ -257,6 +260,36 @@ static int test_gpio_helpers(void) {
return 0;
}
static int test_ps2_decoders(void) {
ps2_keyboard_decoder_t keyboard;
ps2_mouse_decoder_t mouse;
ps2_key_event_t key_event;
ps2_mouse_event_t mouse_event;
ps2_keyboard_decoder_init(&keyboard);
if (!ps2_keyboard_decode_byte(&keyboard, UINT8_C(0x1C), &key_event) ||
!key_event.pressed || key_event.extended || (key_event.scan_code != UINT16_C(0x001C))) {
return 1;
}
if (ps2_keyboard_decode_byte(&keyboard, UINT8_C(0xE0), &key_event) ||
ps2_keyboard_decode_byte(&keyboard, UINT8_C(0xF0), &key_event) ||
!ps2_keyboard_decode_byte(&keyboard, UINT8_C(0x75), &key_event) || key_event.pressed ||
!key_event.extended || (key_event.scan_code != UINT16_C(0xE075))) {
return 2;
}
ps2_mouse_decoder_init(&mouse, UINT8_C(4));
if (ps2_mouse_decode_byte(&mouse, UINT8_C(0x08), &mouse_event) ||
ps2_mouse_decode_byte(&mouse, UINT8_C(0x02), &mouse_event) ||
ps2_mouse_decode_byte(&mouse, UINT8_C(0x01), &mouse_event) ||
!ps2_mouse_decode_byte(&mouse, UINT8_C(0x3F), &mouse_event) ||
(mouse_event.dx != 2) || (mouse_event.dy != 1) || (mouse_event.wheel != -1) ||
((mouse_event.buttons & UINT8_C(0x18)) != UINT8_C(0x18))) {
return 3;
}
return 0;
}
static int test_wav_parser(void) {
static const uint8_t wav[] = {
'R', 'I', 'F', 'F', 40U, 0U, 0U, 0U, 'W', 'A', 'V', 'E', 'f', 'm', 't', ' ',
@@ -298,7 +331,8 @@ int main(void) {
const int results[] = {
test_string_helpers(), test_formatter(), test_compiler_helpers(), test_wait_helper(),
test_ws2812_helpers(), test_timer_helpers(), test_uart_helpers(), test_i2c_helpers(),
test_gpio_helpers(), test_wav_parser(), test_video_parser(),
test_gpio_helpers(), test_ps2_decoders(), test_wav_parser(),
test_video_parser(),
};
for (size_t index = 0U; index < (sizeof(results) / sizeof(results[0])); ++index) {
+4
View File
@@ -83,6 +83,10 @@ def test_topology_generates_complete_rib_apb_and_gpio_bindings(tmp_path: Path) -
assert "assign u_sdio_ribp_if.valid = 1'b0;" in routes
assert gpio.count("// GPIO") == 64
assert "assign u_uart1_if.rx_i = u_gpio_if.di_i[0];" in gpio
assert "assign u_gpio_if.alt1_do_i[0] = u_ps2_if.ps2_clk_o;" in gpio
assert "assign u_gpio_if.alt1_oe_i[0] = u_ps2_if.ps2_clk_oe_o;" in gpio
assert "assign u_gpio_if.alt1_do_i[1] = u_ps2_if.ps2_dat_o;" in gpio
assert "assign u_gpio_if.alt1_oe_i[1] = u_ps2_if.ps2_dat_oe_o;" in gpio
assert "assign u_gpio_if.alt1_do_i[2] = u_ws2812_if.dat_o;" in gpio
assert "assign u_gpio_if.alt1_do_i[22] = u_psram_if.nss_o[0];" in gpio
assert apb_interfaces.count("apb4_if u_") == 10