Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions riscv/debug_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,6 @@ bool debug_module_t::dmi_write(unsigned address, uint32_t value)
dmcontrol.ndmreset = get_field(value, DM_DMCONTROL_NDMRESET);
if (config.support_hasel)
dmcontrol.hasel = get_field(value, DM_DMCONTROL_HASEL);
else
dmcontrol.hasel = 0;
dmcontrol.hartsel = get_field(value, DM_DMCONTROL_HARTSELHI) <<
DM_DMCONTROL_HARTSELLO_LENGTH;
dmcontrol.hartsel |= get_field(value, DM_DMCONTROL_HARTSELLO);
Expand Down Expand Up @@ -1101,10 +1099,12 @@ bool debug_module_t::dmi_write(unsigned address, uint32_t value)
return true;

case DM_ABSTRACTAUTO:
abstractauto.autoexecprogbuf = get_field(value,
DM_ABSTRACTAUTO_AUTOEXECPROGBUF);
abstractauto.autoexecdata = get_field(value,
DM_ABSTRACTAUTO_AUTOEXECDATA);
if (config.support_abstractauto) {
abstractauto.autoexecprogbuf = get_field(value,
DM_ABSTRACTAUTO_AUTOEXECPROGBUF);
abstractauto.autoexecdata = get_field(value,
DM_ABSTRACTAUTO_AUTOEXECDATA);
}
return true;
case DM_SBCS:
sbcs.readonaddr = get_field(value, DM_SBCS_SBREADONADDR);
Expand Down
1 change: 1 addition & 0 deletions riscv/debug_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct debug_module_config_t {
bool support_abstract_fpr_access = true;
bool support_haltgroups = true;
bool support_impebreak = true;
bool support_abstractauto = true;
};

struct dmcontrol_t {
Expand Down
3 changes: 3 additions & 0 deletions spike_main/spike.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static void help(int exit_code = 1)
fprintf(stderr, " --dm-no-abstract-fpr Debug module won't support abstract FPR access\n");
fprintf(stderr, " --dm-no-halt-groups Debug module won't support halt groups\n");
fprintf(stderr, " --dm-no-impebreak Debug module won't support implicit ebreak in program buffer\n");
fprintf(stderr, " --dm-no-abstractauto Debug module won't support the abstractauto register\n");
fprintf(stderr, " --blocksz=<size> Cache block size (B) for CMO operations(powers of 2) [default 64]\n");
fprintf(stderr, " --instructions=<n> Stop after n instructions\n");

Expand Down Expand Up @@ -434,6 +435,8 @@ int main(int argc, char** argv)
[&](const char UNUSED *s){dm_config.support_abstract_fpr_access = false;});
parser.option(0, "dm-no-halt-groups", 0,
[&](const char UNUSED *s){dm_config.support_haltgroups = false;});
parser.option(0, "dm-no-abstractauto", 0,
[&](const char UNUSED *s){dm_config.support_abstractauto = false;});
parser.option(0, "log-commits", 0,
[&](const char UNUSED *s){log_commits = true;});
parser.option(0, "log", 1,
Expand Down
Loading