Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
occamy: Connect chip_id to SoC regs (pulp-platform/snitch#298)
Browse files Browse the repository at this point in the history
* Add preloading flag to `fesvr`

* Add `chip_id` to SoC regs

* lint: C++ sources
fischeti authored Oct 15, 2021
1 parent 2bb6625 commit 90e9f58
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions target/common/test/rtl_lib.cc
Original file line number Diff line number Diff line change
@@ -25,6 +25,12 @@ namespace sim {
void sim_thread_main(void *arg) { ((Sim *)arg)->main(); }

Sim::Sim(int argc, char **argv) : htif_t(argc, argv) {
for (auto i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--disable_preloading") == 0) {
printf("fesvr-based binary preloading disabled\n");
disable_preloading = true;
}
}
host = context_t::current();
target.init(sim_thread_main, this);
target.switch_to();
4 changes: 4 additions & 0 deletions target/common/test/sim.hh
Original file line number Diff line number Diff line change
@@ -29,6 +29,9 @@ struct Sim : htif_t {
// HTIF overrides. Calls into the global memory.
void read_chunk(addr_t taddr, size_t len, void *dst);
void write_chunk(addr_t taddr, size_t len, const void *src);
bool is_address_preloaded(addr_t taddr, size_t len) override {
return disable_preloading;
}

void idle();

@@ -43,6 +46,7 @@ struct Sim : htif_t {
context_t *host;
context_t target;
bool vlt_vcd = false;
bool disable_preloading = false;
};

void sim_thread_main(void *arg);

0 comments on commit 90e9f58

Please sign in to comment.