@@ -16,7 +16,7 @@ Bsim boards
16
16
17
17
This page covers the design, architecture and rationale, of the
18
18
nrf5x_bsim boards and other similar bsim boards.
19
- These boards are postfixed with `_bsim ` as they use BabbleSim _
19
+ These boards are postfixed with `` _bsim ` ` as they use BabbleSim _
20
20
(shortened bsim), to simulate the radio environment.
21
21
These boards use the `native simulator `_ and the :ref: `POSIX architecture<Posix arch> ` to build
22
22
and execute the embedded code natively on Linux.
@@ -135,27 +135,27 @@ The basic architecture layering of these boards is as follows:
135
135
simulation specific ones.
136
136
- The architecture (arch) is the Zephyr :ref: `POSIX architecture<Posix arch> `
137
137
layer.
138
- The SOC layer is `inf_clock `. And the board layer is dependent on
138
+ The SOC layer is `` inf_clock ` `. And the board layer is dependent on
139
139
the specific device we are simulating.
140
140
- The POSIX architecture provides an adaptation from the Zephyr arch API
141
141
(which handles mostly the thread context switching) to the native simulator
142
142
CPU thread emulation.
143
143
See :ref: `POSIX arch architecture<posix_arch_architecture> `
144
- - The SOC `inf_clock ` layer provides an adaptation to the native simulator CPU "simulation"
144
+ - The SOC `` inf_clock ` ` layer provides an adaptation to the native simulator CPU "simulation"
145
145
and the handling of control between the "CPU simulation" (Zephyr threads) and the
146
146
HW models thread ( See `Threading `_ ).
147
147
- The board layer provides all SOC/ IC specific content, including
148
148
selecting the HW models which are built in the native simulator runner context, IRQ handling,
149
149
busy wait API (see :ref: `posix_busy_wait<posix_busy_wait> `), and Zephyr's printk backend.
150
150
Note that in a normal Zephyr target interrupt handling and a custom busy wait
151
151
would be provided by the SOC layer, but abusing Zephyr's layering, and for the
152
- `inf_clock ` layer to be generic, these were delegated to the board.
152
+ `` inf_clock ` ` layer to be generic, these were delegated to the board.
153
153
The board layer provides other test specific
154
154
functionality like bs_tests hooks, trace control, etc, and
155
155
by means of the native simulator, provides the :c:func: `main ` entry point for the Linux
156
156
program, command line argument handling, and the overall time scheduling of
157
157
the simulated device.
158
- Note that the POSIX arch and `inf_clock ` soc expect a set of APIs being provided by
158
+ Note that the POSIX arch and `` inf_clock ` ` soc expect a set of APIs being provided by
159
159
the board. This includes the busy wait API, a basic tracing API, the interrupt
160
160
controller and interrupt handling APIs, :c:func: `posix_exit `,
161
161
and :c:func: `posix_get_hw_cycle ` (see :file: `posix_board_if.h ` and :file: `posix_soc_if.h `).
@@ -173,7 +173,7 @@ Important limitations and unsupported features
173
173
174
174
All native and bsim boards share the same set of
175
175
:ref: `important limitations which<posix_arch_limitations> `
176
- are inherited from the POSIX arch and `inf_clock ` design.
176
+ are inherited from the POSIX arch and `` inf_clock ` ` design.
177
177
178
178
Similarly, they inherit the POSIX architecture
179
179
:ref: `unsupported features set <posix_arch_unsupported >`.
@@ -261,7 +261,7 @@ posix_print and nsi_print backends
261
261
==================================
262
262
263
263
The bsim board provides a backend for the ``posix_print `` API which is expected by the posix
264
- ARCH and `inf_clock ` code, and for the ``nsi_print `` API expected by the native simulator.
264
+ ARCH and `` inf_clock ` ` code, and for the ``nsi_print `` API expected by the native simulator.
265
265
266
266
These simply route this API calls into the ``bs_trace `` bsim API.
267
267
Any message printed to these APIs, and by extension by default to Zephyr's ``printk ``,
@@ -287,12 +287,12 @@ callbacks are assigned to the respective hooks.
287
287
There is a set of one time hooks at different levels of initialization of the HW
288
288
and Zephyr OS, a hook to process possible command line arguments, and, a hook
289
289
that can be used to sniff or capture interrupts.
290
- `bs_tests ` also provides a hook which will be called from the embedded application
290
+ `` bs_tests ` ` also provides a hook which will be called from the embedded application
291
291
:c:func: `main `, but this will only work if the main application supports it,
292
292
that is, if the main app is a version for simulation which calls
293
293
:c:func: `bst_main ` when running in the bsim board.
294
294
295
- Apart from these hooks, the `bs_tests ` system provides facilities to build a
295
+ Apart from these hooks, the `` bs_tests ` ` system provides facilities to build a
296
296
dedicated test "task". This will be executed in the HW models thread context,
297
297
but will have access to all SW variables. This task will be driven with a
298
298
special timer which can be configured to produce either periodic or one time
@@ -302,15 +302,15 @@ at specific points in time. This can be combined with Babblesim's tb_defs macros
302
302
to build quite complex test tasks which can wait for a given amount of time,
303
303
for conditions to be fulfilled, etc.
304
304
305
- Note when writing the tests with `bs_tests ` one needs to be aware that other
305
+ Note when writing the tests with `` bs_tests ` ` one needs to be aware that other
306
306
bs tests will probably be built with the same application, and that therefore
307
307
the tests should not be registering initialization or callback functions using
308
308
NATIVE_TASKS or Zephyr's PRE/POST kernel driver initialization APIs as this
309
309
will execute even if the test is not selected.
310
- Instead the equivalent `bs_tests ` provided hooks should be used.
310
+ Instead the equivalent `` bs_tests ` ` provided hooks should be used.
311
311
312
312
Note also that, for AMP targets like the :ref: `nrf5340bsim <nrf5340bsim >`, each embedded MCU has
313
- its own separate `bs_tests ` built with that MCU. You can select if and what test is used
313
+ its own separate `` bs_tests ` ` built with that MCU. You can select if and what test is used
314
314
for each MCU separatedly with the command line options.
315
315
316
316
Command line argument parsing
0 commit comments