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

Make FGP opt-in #28

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sim/vcs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def run_vcs(self) -> bool:
"-debug_access+all" # since I-2014.03, req'd for FSDB dumping & force regs
]

if self.version() >= self.version_number("M-2017.03"):
if self.get_setting("sim.vcs.fgp") and self.version() >= self.version_number("M-2017.03"):
args.append("-fgp")

if timescale is not None:
Expand Down Expand Up @@ -329,7 +329,7 @@ def run_simulation(self) -> bool:
# setup simulation arguments
args = [ self.simulator_executable_path ]
args.extend(exec_flags_prepend)
if self.version() >= self.version_number("M-2017.03"):
if self.get_setting("sim.vcs.fgp") and self.version() >= self.version_number("M-2017.03"):
# num_threads is in addition to a master thread, so reduce by 1
num_threads=int(self.get_setting("vlsi.core.max_threads")) - 1
args.append("-fgp=num_threads:{threads},num_fsdb_threads:0,allow_less_cores,dynamictoggle".format(threads=max(num_threads,1)))
Expand Down
5 changes: 5 additions & 0 deletions sim/vcs/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ sim.vcs:
# VCS version to use.
# Used to locate the binary - e.g. the 'M-2017.03' in ${synopsys.synopsys_home}/vcs/M-2017.03/bin/vcs
version: "P-2019.06-SP2-5"

# Option to turn on Fine-Grained Parallelism (FGP)
# Not all designs benefit from parallelized simulation.
# Use at your own risk - it is known to be buggy!
fgp: false