Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
add support for sscofpmf extension v0.5.2
|
|
Moved to triggers.h and renamed in
a2a2587426e57f6207d5389620e9109bc0f82e6b, but the old enum was
mistakenly left behind.
|
|
Add space between ')' and '{'
|
|
since spike doesn't truly support counting of hardware performance events,
only csr related read/write functions is supported currently
|
|
|
|
|
|
These have never been logged properly.
|
|
|
|
|
|
The field is rendered unnecessary by 11f5942b7d8211e61b5ad9259d118033692c0759.
Undoes some changes from 750f008e723bb3b20cec41a47ed5cec549447665.
|
|
|
|
We need an interrupt controller in Spike which will allow us to
emulate more real-world devices such as UART, VirtIO net, VirtIO
block, etc.
The RISC-V PLIC (or SiFive PLIC) is the commonly used interrupt
controller in existing RISC-V platforms so this patch adds PLIC
emulation for Spike.
Signed-off-by: Anup Patel <anup@brainfault.org>
|
|
* add DECLARE_OVERLAP_INSN to bind instructions with extension
* add overlap_list.h to contain the declare of all overlapping instructions
* make func function for overlapping instruction return NULL when the coresponding
extension(s) is not supported.
|
|
Before, it had another copy, which is a little unnecessary.
|
|
Refactor trigger code
|
|
The alternative would be to #undef set_csr after including encoding.h,
but this solution strikes me as cleaner. Part of the reason is that
set_csr was not a great name: it sounds like it implements the CSRRS
(read & set) instruction, rather than impelementing a simple write.
|
|
|
|
Not just mcontrol_t.
|
|
|
|
|
|
|
|
Members: get_xlen(), get_const_xlen(), get_flen()
That doesn't mean the value they return will never be changed, but
merely that those functions don't modify the processor_t object when
called.
|
|
|
|
Created a new triggers::module_t to hold the structure.
Also make sure mcontrol_t instances are properly initialized.
|
|
Made mcontrol_t a class as well.
|
|
|
|
These actions are not specific to the mcontrol trigger.
|
|
|
|
The main motivation for this is that we want to move the ISA parsing
logic to run before we even construct a simulator. That's probably a
bit nicer if we don't depend on the processor header.
It also means that we can stop depending on processor.h in disasm.cc
or spike_log_parser.cc (both through disasm.h), which feels a bit
cleaner: making sense of an instruction trace shouldn't really require
knowledge of the internal state of a processor.
|
|
|
|
This is a minor change, turning processor_t from a child class of
isa_parser_t into a class that contains an isa_parser_t as a field.
The point is that it is a step toward separating out
"configuration" (and ISA string parsing) from processor state. This
should be helpful for rejigging things so that we construct more from
a supplied device tree.
|
|
These affect the "max_isa" value (now exposed as get_max_isa()) and
feel like they're similar to the other computations done in
isa_parser_t.
|
|
No functional change, but this is needed for a following refactor
where we're passing it around const.
|
|
|
|
1. support zicntr and zihpm performance extensions
zicntr defines the unprivileged cycle/time/instret
zihpm defines the unprivileged hpmcounter3-31
2. the accessibility are controlled only by
mcounteren/scounteren/hcounteren for access in different privilege
modes
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Before this change, the MCYCLE CSR was just a proxy for MINSTRET.
Similarly, CYCLE was a proxy for INSTRET. This models a machine where
every instruction takes exactly one cycle to execute.
That's not quite precise enough if you want to do cosimulation: there,
you're going to want to MCYCLE to actually match the behaviour of your
processor (because you need reads from the relevant CSRs to give the
expected result).
This commit splits the two CSRs, leaving the other proxy relationships
unchanged. The code in processor_t::step() which bumps MINSTRET now
bumps MCYCLE by the same amount, maintaining the previous behaviour.
Of course, now a cosimulation environment can update the value of
MCYCLE to fix things up for multi-cycle instructions after they run.
|
|
No other functional change. This is preparation for a follow-up
commit, which will split MINSTRET and MCYCLE (to allow cosimulation
environments where the two values might not be equal)
|
|
Before this patch, spike just had an "Xbitmanip" extension which
covered everything in the proposed bitmanip extension that hadn't been
ratified. The problem is that if you want to model (or verify) a
processor that targetted just some of the proposed bitmanip extension,
you couldn't configure Spike to do that.
For example, the lowRISC Ibex processor has several different
configurations. The "balanced" configuration targetted Zba, Zbb, Zbs,
Zbf and Zbt of the 0.92 spec. With the Zba, Zbb and Zbs ratified,
we'll now be able to use an ISA string like
rv32imc_Zba_Zbb_Zbs_XZbf_XZbt
and Spike will correctly fail to decode instructions like 'bcompress',
which would have been decoded with Xbitmanip.
This patch adds a new custom extension name for each part of the
extension that wasn't fully ratified. These have an 'X' prefix so, for
example, the bit permutation instructions that were proposed as Zbp
can be found under XZbp.
Specifying "Xbitmanip" gets all of these extensions, so its behaviour
should be unchanged.
Note that the slo(i) / sro(i) instructions have been moved from the
proposed Zbb to XZbp. This matches a comment in the Change History
section of v0.93 of the bitmanip spec: it seems that the authors
forgot to also move them in Table 2.1 (which gives the lists of
instructions for each extension). This change won't break anything
that currently exists, but it took quite a while to figure out what
was going on so I thought I'd leave a breadcrumb trail for the next
engineer!
The bulk of the patch is just defining some more entries in the
isa_extension_t enum and rewriting each of the instructions to depend
on the relevant entry. This is mostly a straight textual replacement
but it's slightly more complicated for things like the "pack"
instruction that are defined by several different proposed extensions.
|
|
into plctlab-plct-cmo-upstream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Zfhmin is a subset of Zfh (half-precision IEEE 754 binary16 floating
point) extension, consisting only of data transfer and conversion
instructions.
This commit adds `EXT_ZFHMIN` to `isa_extension_t`, permits "zfhmin"
as a multi-letter extension and adjusts feature gate for
data transfer / conversion instructions.
* FLH / FSH
* FMV.X.H / FMV.H.X
* FCVT.S.H / FCVT.H.S
* FCVT.D.H / FCVT.H.D (if 'D' extension is also present)
* FCVT.Q.H / FCVT.H.Q (if 'Q' extension is also present)
|
|
* Added ZMMUL extension
* Splitted P-ext to its zeds
* Typo fix
|