This makes use of functions in a way that enables us to use `priv_lvl`
dependent logic in the DV environment.
Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
I was previously just dumping them to /dev/null because the
code always worked but... predictably I was wrong! Write them
somewhere more useful for debug.
This allows us to model stuff more closely. This depends on Spike
version ibex-cosim-v0.2 (which is rebased onto a master branch commit
supporting these more specific ISA strings).
Don't yet tear out the old logfile-comparision code, add a new path for the
cosim flow.
This uses the existing riscv-dv functions to parse the cosim logfile, as it is
fundamentally still generated by spike so should be checked for errors.
This is a continuation of PR's #1613 and #1575 work.
If cosim in enabled, we need to pass the appropriate flags to the eda tool for
it to link against the precompiled ISS when building the testbench.
This commit assembles the appropriate flags using pkg-config to query the
SPIKE_ISS build, then uses the scripts_lib.subst_vars() method to populate the
templated commands in the yaml.
The eda tools have different requirements for consuming the flags, so massage
them into the appropriate shape on the python side.
Updated the parameters with respect to top_earlgrey.hjson in OpenTitan
repository. For other builds, kept the previously undeclared parameters
as their default values.
Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
This used to work by dumping a Makefile fragment, reading it back in,
and then passing the relevant options through to the RTL compile and
run scripts.
This commit switches things around so that the RTL compile and run
scripts just look up the options when they need them.
No functional change, but the point is that we can vendor this into
OpenTitan where dvsim can load up the Python library and get something
sensible without having to call a subprocess and mess around with
string parsing.
I don't quite understand why I thought this was needed: perhaps some
holdover from riscv-dv expecting files to be a certain shape? Anyway,
no need to keep it now.
This isn't how riscv-dv wants to work! So we do a rather nasty hack in
run-instr-gen.py and rewrite the paths that come out of riscv-dv on
the fly.
Note that we don't move the instruction generator build vars to
something like $(OUT-DIR)/instr_gen/.build.vars.mk. The problem is
that the dumping of these variables runs as part of evaluating the
rule that builds the instruction generator (before the rule actually
runs). The end result is that you would end up writing them to the
directory and then immediately deleting the directory, causing
spurious rebuilds.
This reverts commit 1f57795: these options are needed for plumbing
Ibex configs through. I've got a follow-up that does this more neatly,
but that depends on some other scripting changes so let's revert the
breakage for now.
This reverts commit 014b544: these options are needed for plumbing
Ibex configs through. I've got a follow-up that does this more neatly,
but that depends on some other scripting changes so let's revert the
breakage for now.
Also, update the copyright notice to be lowRISC: we've rewritten
pretty much the entire file, so I don't think it really makes sense to
describe it as copyright Google any more.
While we're at it, we slightly simplify the plumbing for Xcelium,
which means we don't have to export any Xcelium-specific environment
variables from the Makefile any more.
This kind of existed already, but this tweaks things so that it's the
same shape as the other scripts we're adding and (hopefully) the
Python gets a bit cleaner.