Closed rahultadak closed 4 days ago
Is there documentation anywhere about how these directives work exactly? They aren't covered in the LRM -- are they literally identical to the corresponding pragma directives?
That is a good question. I've not actually created protected code using this, but I've seen protected code failing compile with slang. I could probably recreate this and put in a log here.
In the meantime, this is the closest I've found to a description on how this might work.
https://redirect.cs.umbc.edu/portal/help/VHDL/verilog/compiler_directives.html
Without going into too much detail, I have something like this in a file:
`protected
...
...
`endprotected
Trying to run it with slang like this:
$ slang file.svp
file.svp:line:1: error: unknown macro or compiler directive '`protected'
`protected
^
I removed the details of the files and line numbers.
We also encountered this under the SNPS VIP flow.
While I'm not saying Slang shouldn't support this, as customers you should also contact SNPS and ask them to deliver LRM compliant code. i.e. they should be using `pragma protect, not `protected. Avery VIPs do this properly.
Added in 2daa108eede929b7e5fabe8b2e09402898627f04
Based on issue #612 and my experience with v6.0, slang doesn't seem to support older code protection directives described below:
After encrypting source code tagged as above it is turned into:
Is. it possible to add support for these kinds of protected blocks so that usage of slang on IPs written with the older methods are still supported?