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

Running a Simple Evaluation #45

Open
ashuthosh-mr opened this issue Jun 6, 2023 · 7 comments
Open

Running a Simple Evaluation #45

ashuthosh-mr opened this issue Jun 6, 2023 · 7 comments

Comments

@ashuthosh-mr
Copy link

ashuthosh-mr commented Jun 6, 2023

Hi,

I am trying to run a simple evaluation using chipyard's standalone mode. My chipyard version is 1.8.1. When I execute the command "make SUB_PROJECT=constellation BINARY=none CONFIG=EvalTestConfig00 MODEL=EvalHarness run-binary-debug" inside /chipyard/sims/verilator,
I get these:
Constellation: test Checking full connectivity
Constellation: test Checking virtual subnet connectivity
Constellation: test Checking for possibility of deadlock
Constellation: test Finished parameter validation
Constellation: test Starting NoC RTL generation
Constellation: test Finished NoC RTL generation
And then,
I get few errors such as:
[error] Picked up JAVA_TOOL_OPTIONS: -Xmx8G -Xss8M -Djava.io.tmpdir=/home/chips/Storage/willi/chipyard/.java_tmp
[error] WARNING: Empty *.mems.conf file. No memories generated
In the end, I get: %Error: Specified --top-module 'TestHarness' was not found in design.
%Error: Exiting due to 1 error(s)
However, a noceval.cfg is generated. But I still get: %Error: Specified --top-module 'TestHarness' was not found in design.
%Error: Exiting due to 1 error(s) after rerunning the simulation.

What might be going wrong? Also, I am refering https://constellation.readthedocs.io/en/latest/Evaluation/index.html

Thanks

@ashuthosh-mr
Copy link
Author

Update on this.

There was an issue with makefile which always took TestHarness as top-module. I changed it to EvalHarness, it worked.

However, I came up with new errors: /home/mypc/chipyard/.conda-env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: TrafficEval.o: in function netrace_traffic_eval_t::ingress_tick(unsigned long, unsigned long, char, bool, bool)': TrafficEval.cpp:(.text+0x15f5): undefined reference to nt_read_packet'
and few more undefined references to others as well.

Finally an error: make: *** [Makefile:232: /home/mypc/chipyard/sims/verilator/simulator-constellation.test-EvalTestConfig00-debug] Error 2

@jerryz123
Copy link
Collaborator

I'll try this right now,

@jerryz123
Copy link
Collaborator

Can you try chipyard 1.9.1?

@ashuthosh-mr
Copy link
Author

I tried setting 1.9.1 from scratch. I got upto this point with no problems: Setup complete!
To generate simulator RTL and run metasimulation simulation, source env.sh
To use the manager to deploy builds/simulations on EC2, source sourceme-f1-manager.sh to setup your environment.
To run builds/simulations manually on this machine, source sourceme-f1-full.sh to setup your environment.
.
.
Then I got an error:
/home/mypc/chipyard/software/firemarshal/logs/br-base-build-2023-06-09--15-45-23-PVXUBEWNN88O8K89.log
. /home/mypc/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/host-init.sh
. /home/mypc/chipyard/software/firemarshal/images/firechip/br.947c/br.947c.img
TaskError - taskid:/home/mypc/chipyard/software/firemarshal/images/firechip/br.947c/br.947c.img
PythonAction Error
Traceback (most recent call last):
File "/home/mypc/chipyard/.conda-env/lib/python3.10/site-packages/doit/action.py", line 461, in execute
returned_value = self.py_callable(*self.args, **kwargs)
File "/home/mypc/chipyard/software/firemarshal/boards/firechip/distros/br/br.py", line 193, in buildBaseImage
wlutil.run(['make'], cwd=br_dir / "buildroot", env=env)
File "/home/mypc/chipyard/software/firemarshal/wlutil/wlutil.py", line 527, in run
raise sp.CalledProcessError(p.returncode, prettyCmd)
subprocess.CalledProcessError: Command 'make' returned non-zero exit status 2.

ERROR: Failed to build workload br-base.json
Log available at: /home/mypc/chipyard/software/firemarshal/logs/br-base-build-2023-06-09--15-45-23-PVXUBEWNN88O8K89.log
ERROR: FAILURE: 1 builds failed
.
.
.
However, The env.sh was incomplete. So, I used the env.sh of 1.8.1 and made an env.sh file with necessary changes. Simulating a rocket core, hello world worked fine.

Coming to constellation's test harness, no errors.
Evaluation framework worked further than it was before(1.8.1) but I still got an error with the make.

This is what I got:
.
.
.
chipyard/sims/verilator/generated-src/constellation.test.EvalHarness.EvalTestConfig00/gen-collateral/netrace.h:42:48: error: invalid conversion from 'void*' to 'nt_dep_ref_node_t**' {aka 'nt_dep_ref_node**'} [-fpermissive]
42 | #define nt_checked_malloc(x) _nt_checked_malloc(x,FILE,LINE)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| void*
.
.
.
make[1]: *** [VEvalHarness.mk:90: netrace.o] Error 1
make[1]: Leaving directory '/home/mypc/chipyard/sims/verilator/generated-src/constellation.test.EvalHarness.EvalTestConfig00/constellation.test.EvalHarness.EvalTestConfig00.debug'
make: *** [Makefile:231: /home/mypc/chipyard/sims/verilator/simulator-constellation.test-EvalTestConfig00-debug] Error 2

@jerryz123
Copy link
Collaborator

Sorry, it looks like the way verilator invokes g++ just fundamentally breaks the netrace headers.
If you have access to VCS, you can follow the VCS flow.

If not, then the only other solution would be to comment out all references to trace in the evaluation harness C++ driver, including the #includes on netrace.h.

@ashuthosh-mr
Copy link
Author

Alright. What might cause on commenting out the references and netrace.h?

@jerryz123
Copy link
Collaborator

You would not be able to run the C++ evaluation harness with netrace-provided trace files as the traffic source.

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