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

Executing more than one testbench #109

Open
rjfnobre opened this issue Nov 21, 2016 · 3 comments
Open

Executing more than one testbench #109

rjfnobre opened this issue Nov 21, 2016 · 3 comments

Comments

@rjfnobre
Copy link

How can I use more than one instance of the mor1kx simulator at the same time, and still be able to kill the instance that is giving me problems (e.g., takes more than 10 seconds to terminate)?

Right now I'm able to execute one instance at the time, killing it with 'pkill -f Vorpsoc_top' if it takes more than 10 seconds to terminate by itself, but I would like to be able to use more than a core/cpu at the time by running multiple instances of the simulator.

// EXECUTE ONCE ON STARTUP
timelimit -t10 fusesoc sim --sim=verilator --build-only mor1kx-cappuccino

// LOOP
fusesoc sim --sim=verilator --keep mor1kx-cappuccino --elf-load /tmp/application > info.dat
pkill -f Vorpsoc_top

@olofk
Copy link
Member

olofk commented Nov 21, 2016

Hmm... that's a good question, but unfortunately I can't give you a good answer. Maybe the best way to do it is to create a custom script that launches all instances in the background and records the pid of each one. In python, this could likely be done by launching each fusesoc process with subprocess.Popen, check if they are still alive with subprocess.poll and kill with subprocess.terminate or subprocess.kill. Something similar could probably be done in a shell script or other programming languages as well, but I'm not really sure how

@olofk
Copy link
Member

olofk commented Nov 21, 2016

ok, I got a little curious, so I decided to implement it myself as a python script. This launches all the OpenRISC tests, saves the contents of stdout and stderr of each one and kills them after 10 seconds. Change to your liking and let me know if it works

@rjfnobre
Copy link
Author

Thanks for the fast reply.

I will test that and report back to you.

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