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

Compile Error on run riscinator #8

Open
nn020701 opened this issue Oct 10, 2024 · 3 comments
Open

Compile Error on run riscinator #8

nn020701 opened this issue Oct 10, 2024 · 3 comments

Comments

@nn020701
Copy link

when I use make run MODEL=riscinator BINARY=dhrystone, the following error occurs:

g++ -O3 -Wall -no-pie -I/home/zjh/tool/firtool-1.71.0/bin// -I.//elfio/ -I. riscinator/riscinator-main.cpp riscinator.h riscinator.o -o riscinator-main
riscinator/riscinator-main.cpp: In function 'float simulate(Core&, ValueChangeDump<CoreLayout>*, uint32_t*, size_t, size_t, unsigned int, bool)':
riscinator/riscinator-main.cpp:49:11: error: 'class Core' has no member named 'clock'
   49 |     model.clock();
      |           ^~~~~
riscinator/riscinator-main.cpp:50:11: error: 'class Core' has no member named 'passthrough'
   50 |     model.passthrough();
      |           ^~~~~~~~~~~
riscinator/riscinator-main.cpp:55:11: error: 'class Core' has no member named 'passthrough'
   55 |     model.passthrough();
      |           ^~~~~~~~~~~
riscinator/riscinator-main.cpp:74:15: error: 'class Core' has no member named 'passthrough'
   74 |         model.passthrough();
      |               ^~~~~~~~~~~
riscinator/riscinator-main.cpp:121:15: error: 'class Core' has no member named 'clock'
  121 |         model.clock();
      |               ^~~~~
riscinator/riscinator-main.cpp:122:15: error: 'class Core' has no member named 'passthrough'
  122 |         model.passthrough();
      |               ^~~~~~~~~~~
riscinator/riscinator-main.cpp: In function 'bool check_results(Core&, uint32_t*, size_t, check_t*)':
riscinator/riscinator-main.cpp:141:34: error: 'struct CoreView::<unnamed>' has no member named 'rf'
  141 |         auto got = core.internal.rf.regs_ext.words[v.idx].data;
      |                                  ^~
make: *** [Makefile:40: riscinator-main] Error 1

What caused this, and how can I compile successfully?

@fabianschuiki
Copy link
Contributor

Hey @nn020701, sorry for taking so long to reply! Arcilator has changed a few things about how you interact with the simulation model that it generates. It now produces an eval method instead of separate clock and passthrough ops. Unfortunately we don't have arc-tests hooked up into CI properly yet, such that these breakages slip through the crack. In this case the C++ code in riscinator-main.cpp has to be adjusted slightly to simply call the eval() function instead of a clock() and passthrough().

@nn020701
Copy link
Author

nn020701 commented Nov 1, 2024

Thank you for your reply. After changing it to eval(), there are still new issues, and it seems that there are quite a few more places that need to be modified. However, this issue is not urgent, and I may not need to conduct any more tests related to Riscinator.

g++ -O3 -Wall -no-pie -I/home/zjh/tool/firtool-1.71.0/bin// -I.//elfio/ -I. riscinator/riscinator-main.cpp riscinator.h riscinator.o -o riscinator-main
riscinator/riscinator-main.cpp: In function ‘bool check_results(Core&, uint32_t*, size_t, check_t*)’:
riscinator/riscinator-main.cpp:139:34: error: ‘struct CoreView::<unnamed>’ has no member named ‘rf’
  139 |         auto got = core.internal.rf.regs_ext.words[v.idx].data;
      |                                  ^~
make: *** [Makefile:40: riscinator-main] Error 1

@fabianschuiki
Copy link
Contributor

Sounds good! You might have to add an option like --observe-registers or --observe-ports or --observe-wires to the arcilator call. Initially, all registers, ports, and wires were observed and stored to a waveform, which might be what Riscinator was relying on.

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

2 participants