aboutsummaryrefslogtreecommitdiff
path: root/spike_main
AgeCommit message (Collapse)AuthorFilesLines
2022-10-14Support command-line configuration of number of pmpregionsJerry Zhao1-0/+3
2022-10-14Report error if an unsupported memory configuration is detectedParshintsev Anatoly1-3/+8
2022-10-07Add --dm-no-abstract-fpr option.Tim Newsome1-1/+5
Previously FPRs could always be accessed using abstract commands. I need this to get coverage of some OpenOCD code that I broke. (See https://github.com/riscv/riscv-openocd/pull/745)
2022-10-04Suppress unused-variable warnings in spike mainAndrew Waterman1-1/+1
2022-10-04Fix or work around other unused-parameter warnings in ancillary programsAndrew Waterman2-5/+6
2022-10-04Suppress unused-parameter warnings in spike mainAndrew Waterman1-16/+16
2022-09-23Build and install lib and header dependencies for HammerJerin Joy1-0/+2
https://github.com/rivosinc/hammer Signed-off-by: Jerin Joy <joy@rivosinc.com>
2022-08-10Add missed decription for log-commits optionWeiwei Li1-0/+1
2022-04-30Add missing description of --dtb in --help messageAndrew Waterman1-0/+1
2022-04-12Move real_time_clint into cfg_tRupert Swarbrick1-4/+4
2022-04-12Move varch into cfg_tRupert Swarbrick1-3/+3
2022-04-12Remove nprocs from cfg_tRupert Swarbrick1-7/+8
Now we have hartids, we can remove nprocs so that we have a single source of truth.
2022-04-12Move hartids into cfg_tRupert Swarbrick1-11/+17
The only slightly difficult thing here is that hartids will always be considered "overridden" by the time we get to sim_t::sim_t (either overridden by a command line argument, or overridden when we set default hartids just before the constructor). To allow downstream code to distinguish between "I picked IDs 0, 1, 2, 3 because the user asked for 4 processors" and "The user explicitly asked for IDs 0, 1, 2, 3", we have an extra explicit_hartids field.
2022-04-12Move the "default hartids" logic from sim.cc into spike.ccRupert Swarbrick1-0/+16
This moves another part of the "configuration" out of the generic sim.cc code.
2022-04-12Slightly refactor --hartids parsing in spike.ccRupert Swarbrick1-13/+16
We now parse to a std::vector<int> and then set the "hartids" variable to the result. There is a slight functional change here, in that if you pass "--hartids 1,2,3 --hartids 4,5", you'll now get 2 cores with ids of 4,5 rather than 5 cores with ids of 1,2,3,4,5. This is what most tools do with repeated command line arguments and I suspect the old behaviour was actually by accident!
2022-04-12Move start_pc into cfg_tRupert Swarbrick1-3/+2
2022-04-11Change processor_t to hold a pointer to an isa_parser_t (#973)Rupert Swarbrick1-1/+1
Before, it had another copy, which is a little unnecessary.
2022-04-11Split mem layout computation in spike.cc (#957)Rupert Swarbrick1-25/+36
The motivation here is mostly to enable a refactoring where the memory layout (sans allocated memory) gets passed to DTS/DTB code before we ever allocate anything. But it turns out to make merge_overlapping_memory_regions a bit simpler, which is an added bonus.
2022-03-18Fold priv parameter into cfg_tRupert Swarbrick1-4/+4
2022-03-18Fold isa parameter into cfg_tRupert Swarbrick1-4/+5
2022-03-18Fold nprocs parameter into cfg_tRupert Swarbrick1-5/+5
2022-03-18Fold bootargs parameter in the new cfg_t typeRupert Swarbrick1-4/+4
2022-03-18Initial step towards factoring out command line configurationRupert Swarbrick1-7/+8
This commit defines a "cfg_t" structure, which currently just holds the initrd address range. It will be augmented in future commits to hold other configuration arguments as well. To represent a configuration argument, we define an arg_t base class. This holds a current value, together with a flag that tells us whether the value has been updated from the default. The idea is that in future we're going to use that flag when reading a DTB file: if an argument has actually been specified on the command line, we need to take it into account; if not, we can ignore the default and use the DTB file's supplied value.
2022-03-12Construct an isa_parser_t and pass it to processor_t constructorRupert Swarbrick1-3/+4
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.
2022-02-18Documentation: Cache block size for CMO operations default 64 (#923)John Ingalls1-1/+1
2022-01-29add blocksz parameter to specify the cache block size for CBO operationsliweiwei1-0/+10
2022-01-06Don't say "master" (#898)Tim Newsome1-3/+3
Requested by "LfX Security - Non Inclusive Language Alerts"
2021-09-17Don't use "using"Andrew Waterman1-4/+3
2021-09-17Use RIAA pattern in manipulating ostream flagsAndrew Waterman1-1/+1
sout is renamed to sout_ to reduce likelihood programmers accidentally use it.
2021-09-14add option --cmd to read commands from file (#772)Elmar Melcher1-3/+11
2021-09-06add option --log=<name> to command line help (#795)Elmar Melcher1-0/+1
2021-08-03kill program if socket creation failsElmar Melcher1-0/+1
2021-08-03use socket output stream for processor debug outputElmar Melcher1-1/+1
2021-08-03declare socket properties in processor_tElmar Melcher2-1/+26
2021-08-03declare socket properties in sim_tElmar Melcher1-1/+10
2021-06-02sim: rewrite memory-region overlapping helperChih-Min Chao1-20/+19
problem: when the following memory region is specified -m0x00410000:0x1000, 0x00410200:0x1000, 0x00410400:0x1000, 0x00410600:0x1000, 0x00410800:0x1000, 0x00411000:0x1000, 0x00412000:0x1000, 0x00413000:0x1000, 0x00414000:0x1000 The error is ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR (duplicate_node_names): Duplicate node name /memory@410 ERROR: Input tree has errors, aborting (use -f to force output) cause: the merge_overlapping_memory_regions works not well in partial overlap case change: 1. use forward way to avoid weird reverse iterator behavior in C++ 2. use address but not page number since the base addresses are all aligned in make_mems Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2021-02-14Support multiple extensions at the same timeZitao Fang1-3/+5
2021-02-04Fix --kernel and --initrd options w.r.t. sparse mem_t implementationAndrew Waterman1-4/+7
For some reason, the old accessors for the non-sparse version were left dangling. These methods are used by the --kernel and --initrd options, and so those options were just broken. This also fixes a memory leak and refactors the implementation a bit.
2020-12-29Fix compile warningsAndrew Waterman1-1/+1
2020-10-26Validate integer command-line argumentsAndrew Waterman1-6/+23
Resolves #583
2020-09-22Separate build of spike and spike-dasmAndrew Waterman3-1378/+1
2020-09-08rvv: disasm: separate vvm and vvChih-Min Chao1-14/+44
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-09-08rvv: disasm: fix vamoadd nameChih-Min Chao1-1/+1
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-08-31rvv: disasm: fix amo sub-opcodeChih-Min Chao1-5/+4
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-08-31rvv: disasm: fix whole loadChih-Min Chao1-3/+10
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-08-31rvv: add reciprocal instructionsChih-Min Chao1-0/+2
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-08-27rvv: remove quad instructionsChih-Min Chao1-4/+0
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-08-11Add option to dissable implicit ebreak in program bufferSamuel Obuch1-1/+5
2020-07-29rvv: add vrgatherei16.vvChih-Min Chao1-13/+14
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-07-29rvv: add new whole reg load/store instructionsChih-Min Chao1-2/+25
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>