Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to generate emulator with the latest master branch version #25

Closed
RaulGoal opened this issue Jan 17, 2018 · 4 comments
Closed

Failed to generate emulator with the latest master branch version #25

RaulGoal opened this issue Jan 17, 2018 · 4 comments

Comments

@RaulGoal
Copy link

RaulGoal commented Jan 17, 2018

Hi, I clone the latest version from master branch at 2017.1.17.
Then I follow the README.md part to build emulator. However, it fails with some errors happen.
error message:
/project-template/testchipip/csrc/SimSerial.cc: In function ‘int serial_tick(unsigned char, unsigned char*, int, unsigned char*, unsigned char, int*)’:
/project-template/testchipip/csrc/SimSerial.cc:26:87: error: no matching function for call to ‘tsi_t::tsi_t(std::vector<std::basic_string >)’
tsi = new tsi_t(std::vectorstd::string(info.argv + 1, info.argv + info.argc));
^
/project-template/testchipip/csrc/SimSerial.cc:26:87: note: candidate is:
In file included from /project-template/testchipip/csrc/SimSerial.cc:5:0:
/project-template/rocket-chip/riscv-tools/include/fesvr/tsi.h:21:3: note: tsi_t::tsi_t(int, char**)
tsi_t(int argc, char** argv);
^
/project-template/rocket-chip/riscv-tools/include/fesvr/tsi.h:21:3: note: candidate expects 2 arguments, 1 provided
make[1]: *** [SimSerial.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/project-template/testchipip/csrc/verilator-harness.cc: In function ‘int main(int, char**)’:
/project-template/testchipip/csrc/verilator-harness.cc:84:66: error: no matching function for call to ‘tsi_t::tsi_t(std::vector<std::basic_string >)’
tsi = new tsi_t(std::vectorstd::string(argv + 1, argv + argc));
^
/project-template/testchipip/csrc/verilator-harness.cc:84:66: note: candidate is:
In file included from /project-template/testchipip/csrc/verilator-harness.cc:7:0:
/project-template/rocket-chip/riscv-tools/include/fesvr/tsi.h:21:3: note: tsi_t::tsi_t(int, char**)
tsi_t(int argc, char** argv);
^
/project-template/rocket-chip/riscv-tools/include/fesvr/tsi.h:21:3: note: candidate expects 2 arguments, 1 provided
make[1]: *** [verilator-harness.o] Error 1
make[1]: Leaving directory `/project-template/verisim/generated-src/example.TestHarness.PWMConfig'
make: *** [/project-template/verisim/simulator-example-PWMConfig] Error 2

It seems the code verilator-harness.cc and SimSerial.cc in testchip/csrc exist some code syntax mismatch from riscv-tools/include/fesvr/tsi.h. I am not familiar with the section.
Could anyone helps me about it?

@RaulGoal RaulGoal changed the title Failed to generate emulator with the newest master branch version Failed to generate emulator with the latest master branch version Jan 17, 2018
@cokeco
Copy link

cokeco commented Jan 19, 2018

I have encountered same problem when run make CONFIG=PWMConfig.
Does anyone fix the problem?

@seldridge
Copy link
Member

It looks like this is me: riscvarchive/riscv-fesvr#25

There was a change to the way that arguments are exposed backwards from HTIF that changed this API. It looks like project template is using an older version of testchipip that's incompatible.

I think that all that has to happen is a bump to testchipip.

@seldridge
Copy link
Member

It looks like testchipip will also need modifications to its verilator-harness.cc. That could also benefit from an update to act like rocket-chip's emulator.cc. I may be able to look at this tomorrow.

@RaulGoal
Copy link
Author

RaulGoal commented Feb 2, 2018

verilator-harness.cc has been revised for HTIF/FESVR API changes

@RaulGoal RaulGoal closed this as completed Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants