commit | e83b55ed2a26c715351b515a4ee132953c6fa843 | [log] [tgz] |
---|---|---|
author | Rupert Swarbrick <rswarbrick@lowrisc.org> | Tue May 12 11:44:04 2020 +0100 |
committer | sriyerg <46467186+sriyerg@users.noreply.github.com> | Tue Jun 02 13:01:40 2020 -0700 |
tree | be321d628c0a946dcf9001973c46d17406e1bdda | |
parent | 5f562a9a7f803729bf9321c6084b40818edf8da2 [diff] |
[dvsim] Small tidy-ups in dvsim.py command line parsing - Arguments with action 'store_true' already get a default of False, so don't bother doing that explicitly. - Simplify how we take arguments in the FlowCfg constructor. Note that this wouldn't be equivalent code if we modified self.items, self.list_items or self.select_cfgs. But we don't. - Rename -select_cfgs to --select-cfgs (apparently this was the intended name, based on PR feedback). Default to None. This means that passing --select-cfgs with no arguments is now different from not passing it at all, which is probably the behaviour we want. - Tidy up the logic in prune_selected_cfgs to allow self.select_cfgs to be None. And write the filter as a 1-line list comprehension rather than using list's remove method. - Print an error if the user wrongly passed -select_cfgs for a non-master config (before this patch, we just ignored the argument). - Use None as a default reseed value rather than -1. I think it's probably better to get an error if we forget to set reseed somewhere than to get -1*reseed_multiplier iterations, then loop over range(-10) tests (which is the empty sequence) without any error. - Pull the FlowCfg factory logic into a separate factory function in dvsim.py called make_config(). - Default to None for --tool and print an error if a simulation run has no tool on the command line or in a non-master-config config file. This previously failed rather mysteriously when it substituted the empty string for {tool} when constructing filenames. - Default to None for --profile. We have to default to a string (we pick something clearly bogus) in the SimCfg constructor so that interpolation works when --profile is not set. This should have no effect, because no config file should use {profile} except in a profile build_mode. But it's probably good to have something that makes it clear what's going on. - Use nargs=? for the --profile argument. Now "--profile" means "profile for time". If you want to explicitly specify how to profile, you can do that too ("--profile=time" or "--profile=mem"). - Slightly change the semantics of --list. If not specified, it does nothing. If passed with no arguments (nargs is now *, not +), it lists targets for all categories. If passed with some categories (now checked against a list of valid options), it lists targets that match the categories. - Default to None for --branch; move comment into a docstring in the resolve_branch function. - Use choices=... to force sensible values when using --profile, --verbosity or --verbose. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).