Adds an optional --instructions=N CLI argument which will stop the simulation after N instructions.
This is useful for benchmarking and profiling and sometimes debugging.
As proposed in #1652, we made the following changes to MMIO device (factory)
plugin API, to mitigate current limitations and facilitate factory reuse.
- removed `sargs` from `device_factory_t`, and introduced a new type alias
`device_factory_sargs_t` to capture `<device_factory_t *, sargs>` pairs,
this is used to instantiate sim_t instances;
- changed the signature of `device_factory_t::generate_fdt` and
`device_factory_t::parse_from_fdt` to take on an extra `sargs` argument,
for instantiating devices with per-device arguments;
- made `device_factory_t` const and potentially resuable across multiple
`sim_t` instances.
PMP Granularity is made available as a command line option. The default
value is 4 Bytes. The value can be changed by passing the option
--pmp-granularity=<value> to spike.
Signed-off-by: Karthik B K <karthik.bk@incoresemi.com>
This change allows to create custom implementations of `abstract_mem_t`
and inject them when constructing `sim_t`. The current `mem_t`
implementation remains unchanged.
Fixes#1408.
The --extension feature requires that all symbols in extension.o
be available when the libraries are dynamically loaded by dlopen.
Prepending extension.o to the linker command adds the otherwise
omitted symbols to spike's dynamic symbol table.
Plugins should now implement and register a device_factory_t to
configure how that device should be parsed from a FDT, and an optional
default DTS string.
This drops support for command-line flag-based device configuration
Commit 191634d285 changed the default kernel boot args from
"console=hvc0 earlycon=sbi" to "console=ttyS0 earlycon", but didn't
updated the spike usage help() function.
This commit introduces a new macro DEFAULT_KERNEL_BOOTARGS in order to
have a single definition. This macro is used everywhere in dts.cc and
spike.cc help() function.
Signed-off-by: Julien Olivain <ju.o@free.fr>
The addition of Svadu support and removal of --mmu-dirty
command line flag results in the dirty_enabled configuration state
no longer being used. Remove the remnants of this state.
This commit simplifies the codebase by factoring out memory merging and
intersection checking routines into separate functions. This allows us
to check for corner cases more easily.
16 B suffices to subsume all aligned accesses (including the Q extension).
Spike does not actually rely on this property, but in some real systems,
it is impractical to guarantee atomicity across cache lines.
4096 B suffices to prevent cache lines from spanning pages (which would
require multiple TLB accesses). This one is a bug fix, since we were
not performing multiple TLB accesses in this case.