Part 1
요약·해설
RV32IMCB Ibex core와 security peripheral을 갖춘 Earl Grey에서 Zephyr ELF를 simulation하는 흐름을 다룹니다.
RV32IMCB RISC-V · Ibex
128kB main SRAM
Verilator · Vchip_sim_tb · test ROM
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
1AE2EE6483A2960C0F13CEFF5059B58837E0291720746A8C2594C2FD682A9CE6
.. _opentitan_earlgrey:
OpenTitan Earl Grey
###################
Overview
********
The OpenTitan Earl Grey chip is a low-power secure microcontroller that is
designed for several use cases requiring hardware security. The `OpenTitan
Github`_ page contains HDL code, utilities, and documentation relevant to the
chip.
Hardware
********
- RV32IMCB RISC-V "Ibex" core
- 128kB main SRAM
- Fixed-frequency and AON timers
- 32 x GPIO
- 4 x UART
- 3 x I2C
- 2 x SPI host
- 1 x SPI device
- Various security peripherals
Detailed specification is on the `OpenTitan Earl Grey Chip Datasheet`_.
Supported Features
==================
The ``opentitan_earlgrey`` board configuration is designed and tested to run on
the Earl Grey chip simulated in Verilator, a cycle-accurate HDL simulation tool.
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| Timer | on-chip | RISC-V Machine Timer |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling |
+-----------+------------+-------------------------------------+
| SPI | on-chip | SPI host |
+-----------+------------+-------------------------------------+
| WDT | on-chip | Always-On Timer (Watchdog) |
+-----------+------------+-------------------------------------+
Other hardware features are not yet supported on Zephyr porting.
Programming and Debugging
*************************
First, build and install Verilator as described in the `OpenTitan Verilator
Setup`_ guide .
Building and Flashing
=====================
Here is an example for building the :ref:`hello_world` application. The
following steps were tested on OpenTitan master branch @ 6a3c2e98.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: opentitan_earlgrey
:goals: build
The OpenTitan Vchip_sim_tb tool can take the Zephyr .elf as input and place it
in simulated flash. The OpenTitan test ROM will then run in simulation, read
the manifest header from simulated flash, and begin executing Zephyr from the
entry point.
.. code-block:: console
$OT_HOME/bazel-bin/hw/build.verilator_real/sim-verilator/Vchip_sim_tb --verbose-mem-load \
-r $OT_HOME/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/lib/testing/test_rom/test_rom_sim_verilator.39.scr.vmem \
--meminit=otp,$OT_HOME/bazel-out/k8-fastbuild/bin/hw/ip/otp_ctrl/data/img_rma.24.vmem \
--meminit=flash,$ZEPHYR_PATH/build/zephyr/zephyr.elf
UART output:
.. code-block:: console
I00000 test_rom.c:135] Version: earlgrey_silver_release_v5-9599-g6a3c2e988, Build Date: 2023-01-17 16:02:09
I00001 test_rom.c:237] Test ROM complete, jumping to flash (addr: 20000384)!
*** Booting Zephyr OS build zephyr-v3.2.0-3494-gf0729b494b98 ***
Hello World! opentitan_earlgrey
References
**********
.. target-notes::
.. _OpenTitan Earl Grey Chip Datasheet: https://opentitan.org/book/hw/top_earlgrey/doc/specification.html
.. _OpenTitan GitHub: https://github.com/lowRISC/opentitan
.. _OpenTitan Verilator Setup: https://opentitan.org/guides/getting_started/setup_verilator.html
Part 3
한국어 전문 번역
개요
OpenTitan Earl Grey chip은 hardware security가 필요한 여러 use case를 위해 설계된 low-power secure microcontroller입니다. OpenTitan GitHub에는 이 chip과 관련된 HDL code, utility와 documentation이 있습니다.
Hardware
- RV32IMCB RISC-V
Ibex
core - 128kB main SRAM
- Fixed-frequency timer와 AON timer
- GPIO 32개
- UART 4개
- I2C 3개
- SPI host 2개
- SPI device 1개
- 여러 security peripheral
자세한 specification은 OpenTitan Earl Grey Chip Datasheet에서 확인할 수 있습니다.
지원 기능
opentitan_earlgrey board configuration은 cycle-accurate HDL simulation tool인 Verilator에서 simulation하는 Earl Grey chip에서 실행하도록 설계되고 시험됐습니다.
| Interface | Controller | Driver/Component |
|---|---|---|
| NVIC | on-chip | nested vector interrupt controller |
| Timer | on-chip | RISC-V Machine Timer |
| UART | on-chip | serial port-polling |
| SPI | on-chip | SPI host |
| WDT | on-chip | Always-On Timer (Watchdog) |
그 밖의 hardware 기능은 Zephyr porting에서 아직 지원하지 않습니다.
Programming과 Debugging
먼저 OpenTitan Verilator Setup 안내에 따라 Verilator를 build하고 install합니다.
Building과 Flashing
다음은 hello_world application을 build하는 예입니다. 이 절차는 OpenTitan master branch의 commit 6a3c2e98에서 시험됐습니다.
west build -b opentitan_earlgrey samples/hello_worldOpenTitan Vchip_sim_tb tool은 Zephyr .elf를 input으로 받아 simulated flash에 배치할 수 있습니다. 그러면 OpenTitan test ROM이 simulation에서 실행되어 simulated flash의 manifest header를 읽고 entry point부터 Zephyr 실행을 시작합니다.
$OT_HOME/bazel-bin/hw/build.verilator_real/sim-verilator/Vchip_sim_tb --verbose-mem-load \
-r $OT_HOME/bazel-out/k8-fastbuild-ST-2cc462681f62/bin/sw/device/lib/testing/test_rom/test_rom_sim_verilator.39.scr.vmem \
--meminit=otp,$OT_HOME/bazel-out/k8-fastbuild/bin/hw/ip/otp_ctrl/data/img_rma.24.vmem \
--meminit=flash,$ZEPHYR_PATH/build/zephyr/zephyr.elfUART output은 다음과 같습니다.
I00000 test_rom.c:135] Version: earlgrey_silver_release_v5-9599-g6a3c2e988, Build Date: 2023-01-17 16:02:09
I00001 test_rom.c:237] Test ROM complete, jumping to flash (addr: 20000384)!
*** Booting Zephyr OS build zephyr-v3.2.0-3494-gf0729b494b98 ***
Hello World! opentitan_earlgrey
참고 자료
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.