/ docs / model / hardware.c4
hardware.c4
  1  model {
  2    hardware = context "Hardware" {
  3      style {
  4        color gray
  5      }
  6  
  7      processor = component "Processor Core" "CPU / core and tightly-coupled logic" {
  8        style {
  9          color indigo
 10        }
 11      }
 12  
 13      system = component "System" "System logic: controllers and core peripherals" {
 14        style {
 15          color red
 16        }
 17  
 18        gpios = container "GPIOs" "General Purpose Input/Output" {
 19          style {
 20            color green
 21          }
 22        }
 23  
 24        dma = container "DMA" "Direct Memory Access controller" {
 25          style {
 26            color amber
 27          }
 28        }
 29  
 30        reset-clock = container "Reset & Clock" "Reset logic and clock generation / PLLs" {
 31          style {
 32            color slate
 33          }
 34        }
 35  
 36        power = container "Power Control" "Power domains, regulators, brown-out, reset sources" {
 37          style {
 38            color orange-500
 39          }
 40        }
 41  
 42        irq = container "Interrupt Controller" "NVIC / interrupt routing and priorities" {
 43          style {
 44            color blue
 45          }
 46        }
 47  
 48        analog-interfaces = container "Analog Interfaces" "Analog front-end peripherals" {
 49          style {
 50            color sky
 51          }
 52  
 53          adc = container "ADC" "Analog-to-Digital Converter" {
 54            style {
 55              color sky
 56            }
 57          }
 58  
 59          dac = container "DAC" "Digital-to-Analog Converter" {
 60            style {
 61              color indigo
 62            }
 63          }
 64  
 65          opamp = container "OPAMP" "On-chip operational amplifiers" {
 66            style {
 67              color orange-500
 68            }
 69          }
 70  
 71          comp = container "COMP" "Comparators" {
 72            style {
 73              color red-500
 74            }
 75          }
 76        }
 77      }
 78  
 79      internal-buses = component "Internal Buses" "Bus fabric (APB/AHB/AXI style) connecting system to peripherals" {
 80        style {
 81          color slate
 82        }
 83      }
 84  
 85      memory = component "Memory" "On-chip memory blocks" {
 86        style {
 87          color blue
 88        }
 89  
 90        flash = container "Flash" "Non-volatile program / data storage" {
 91          style {
 92            color orange-500
 93            shape storage
 94          }
 95        }
 96  
 97        sram = container "SRAM" "Data RAM (Tightly-coupled & main SRAM)" {
 98          style {
 99            color secondary
100            shape storage
101          }
102        }
103      }
104  
105      communication-interfaces = component "Communication Interfaces" "Communication peripherals (I²C, SPI, UART, CAN, USB, Ethernet)" {
106        style {
107          color yellow
108        }
109  
110        i2c = container "I2C" "Inter-Integrated Circuit" {
111          style {
112            color amber
113          }
114        }
115  
116        spi = container "SPI" "Serial Peripheral Interface" {
117          style {
118            color yellow
119          }
120        }
121  
122        uart = container "UART" "Universal Asynchronous Receiver-Transmitter" {
123          style {
124            color amber
125          }
126        }
127  
128        can = container "CAN" "Controller Area Network" {
129          style {
130            color orange-500
131          }
132        }
133  
134        usb = container "USB" "Universal Serial Bus" {
135          style {
136            color green
137          }
138        }
139  
140        ethernet = container "Ethernet" "Ethernet MAC/PHY interface" {
141          style {
142            color blue
143          }
144        }
145      }
146  
147      timers = component "Timers" "Timing and watchdog peripherals" {
148        style {
149          color indigo
150        }
151  
152        gp-timers = container "GP Timers" "General purpose timers / PWM" {
153          style {
154            color amber
155          }
156        }
157  
158        rtc = container "RTC" "Real-time clock / calendar" {
159          style {
160            color sky
161          }
162        }
163  
164        wdg = container "WDG" "Watchdog timer" {
165          style {
166            color red-500
167          }
168        }
169      }
170  
171      other-peripherals = component "Other Peripherals" "Miscellaneous peripherals (crypto, RNG, SDIO, FSMC, etc.)" {
172        style {
173          color secondary
174        }
175      }
176    }
177  }