Skip to content

Commit

Permalink
[opentitantool] Run "nice"r sims
Browse files Browse the repository at this point in the history
Fix some timing issues by running sims with nice -5 to ensure test
harnesses don't get starved of threads. This should solve some batch
testing problems with a large number of threads serving verilator
simulations.

Signed-off-by: Drew Macrae <[email protected]>
  • Loading branch information
Drew Macrae committed Dec 21, 2022
1 parent 447bf43 commit ec1653c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sw/host/opentitanlib/src/transport/verilator/subprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ pub struct Subprocess {
impl Subprocess {
/// Starts a verilator [`Subprocess`] based on [`Options`].
pub fn from_options(options: Options) -> Result<Self> {
let mut command = Command::new(&options.executable);
let mut command = Command::new(String::from("nice"));
let mut args = Vec::new();

args.push(String::from("-5"));
args.push(options.executable.to_string());
if !options.rom_image.is_empty() {
args.push(format!("--meminit=rom,{}", options.rom_image));
}
Expand Down

0 comments on commit ec1653c

Please sign in to comment.