-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[svsim] Escape '$' in defines for VCS only
Add an abstract function to `svsim.Backend` which can be used to control how define key and values will be escaped. Add escaping for '$' for VCS only. This is done to work around what I think is a difference in how VCS and Verilator handle the `+define+key=value` command line argument. In svsim, we call both like the following (this is a key only, no value): <tool> '+define+Foo$Bar' While Verilator will accept this, VCS will not and instead wants: <tool> '+define+Foo\$Bar' As far as I can tell, the problem seems to be the single quotes not being respected by VCS. This is _likely_ due to the fact that the VCS entrypoint is shell and may have some oddities in how it is handling command line options. (This is speculation.) I expect that this could have manifested for anything that was using a Verilog system function, e.g.., `+define+RANDOM+$random`. For that specific case, we were already escaping it internally. The immediate need for this is to get inline layers and their `$`-ridden ABI (that I wrote...) working with VCS. They are already working with Verilator. Signed-off-by: Schuyler Eldridge <[email protected]>
- Loading branch information
Showing
4 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters