|
| 1 | +.. _qemu_or1k: |
| 2 | + |
| 3 | +OpenRISC 1000 Emulation (QEMU) |
| 4 | +############################## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +This board configuration will use QEMU to emulate the OpenRISC 1000 platform. |
| 10 | + |
| 11 | +This configuration provides support for an or1k CPU core and these devices: |
| 12 | + |
| 13 | +* OpenRISC Interrupt Controller |
| 14 | +* OpenRISC Tick Timer |
| 15 | +* NS16550 UART |
| 16 | + |
| 17 | + |
| 18 | +.. note:: |
| 19 | + This board configuration makes no claims about its suitability for use |
| 20 | + with an actual OpenRISC 1000 hardware system, or any other hardware system. |
| 21 | + |
| 22 | +Hardware |
| 23 | +******** |
| 24 | + |
| 25 | +Supported Features |
| 26 | +================== |
| 27 | + |
| 28 | +The following hardware features are supported: |
| 29 | + |
| 30 | ++--------------------------------+------------+----------------------+ |
| 31 | +| Interface | Controller | Driver/Component | |
| 32 | ++================================+============+======================+ |
| 33 | +| OpenRISC Interrupt Controller | on-chip | interrupt controller | |
| 34 | ++--------------------------------+------------+----------------------+ |
| 35 | +| OpenRISC Tick Timer | on-chip | system clock | |
| 36 | ++--------------------------------+------------+----------------------+ |
| 37 | +| NS16550 UART | FPGA | serial port | |
| 38 | ++--------------------------------+------------+----------------------+ |
| 39 | + |
| 40 | +The kernel currently does not support other hardware features on this platform. |
| 41 | + |
| 42 | +Devices |
| 43 | +======== |
| 44 | +System Clock |
| 45 | +------------ |
| 46 | + |
| 47 | +Qemu Tick Timer timer uses a clock frequency of 20 MHz, |
| 48 | +see hw/openrisc/cputimer.c in Qemu source tree for details. |
| 49 | + |
| 50 | +Serial Port |
| 51 | +----------- |
| 52 | + |
| 53 | +This board configuration uses a single serial communication channel |
| 54 | +with UART3. |
| 55 | + |
| 56 | +Programming and Debugging |
| 57 | +************************* |
| 58 | + |
| 59 | +Use this configuration to run basic Zephyr applications and kernel tests in the QEMU |
| 60 | +emulated environment, for example, with the :zephyr:code-sample:`synchronization` sample: |
| 61 | + |
| 62 | +.. zephyr-app-commands:: |
| 63 | + :zephyr-app: samples/synchronization |
| 64 | + :host-os: unix |
| 65 | + :board: qemu_or1k |
| 66 | + :goals: run |
| 67 | + |
| 68 | +This will build an image with the synchronization sample app, boot it using |
| 69 | +QEMU, and display the following console output: |
| 70 | + |
| 71 | +.. code-block:: console |
| 72 | +
|
| 73 | + *** Booting Zephyr OS build zephyr-v3.5.0-3843-g5a1358a9ef *** |
| 74 | + thread_a: Hello World from cpu 0 on qemu_or1k! |
| 75 | + thread_b: Hello World from cpu 0 on qemu_or1k! |
| 76 | + thread_a: Hello World from cpu 0 on qemu_or1k! |
| 77 | + thread_b: Hello World from cpu 0 on qemu_or1k! |
| 78 | + thread_a: Hello World from cpu 0 on qemu_or1k! |
| 79 | + thread_b: Hello World from cpu 0 on qemu_or1k! |
| 80 | + thread_a: Hello World from cpu 0 on qemu_or1k! |
| 81 | + thread_b: Hello World from cpu 0 on qemu_or1k! |
| 82 | + thread_a: Hello World from cpu 0 on qemu_or1k! |
| 83 | + thread_b: Hello World from cpu 0 on qemu_or1k! |
| 84 | +
|
| 85 | +
|
| 86 | +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. |
| 87 | + |
| 88 | + |
| 89 | +References |
| 90 | +********** |
| 91 | + |
| 92 | +https://www.qemu.org/ |
0 commit comments