1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
:source-highlighter: pygments
= VERILOG Obfuscate
Script to mangle all names of Verilog components.
== Overview
* The option `Compact Schematic` must be disabled (`-compact off`).
* Macros may not work properly.
* Unix line endings required (No CRLF).
== What is working
* obfuscation of the name of
** modules
** ports
** instances
** wires
** register
** parameter
** defparam
** localparam
* Removing of comments (line comment `//` and block comment `/* */`)
* Preserving of pragmas (e.g. `// synopsys synthesis off`)
* White list of ignored words
* Verilog keywords are ignored
* Preserve top level ports names
* (Optional) Whitespace elimination
* (Optional) Deletion of empty lines
== Experimental
* Obfuscation of paths in ``include` statement
* Obfuscation of macro names (``define`)
* Obfuscation of fileset (`+incdir`, `-F`, `-f`, `-v`, `-y`)
* File hierarchy is preserved, but obfuscated
* names of macros defined in fileset (`*.f`)
== What is not working
* Block/label names are not obfuscated
* Output to single file is not supported
* Ignored code blocks after ``ifdef` are not removed
* Code for testbenches
* Escaped identifiers
* Environment variables in filesets
* If an identifier is defined by macro it is not obfuscated without option
obfuscate macros
* SystemVerilog typedef structs
== Nanotime Example
* Load Aquarius example
** `File` > `Open` > `Read RTL` > Folder Symbol > Select Fileset
`demo/rtl/aquarius/aquarius.f`
** Open tab `Options` and deselect `Compact Schematic`
* Load Obfuscate Userware
** `Tools` > `Plugins` > Select `ObfuscateVerilog`
** Select `Userware` > `Obfuscate Verilog` and generate obfuscated
design.
* Load NanoTime report
** `Tools` > `Plugins` > Select `NanoTime`
** Select `Userware` > `Load Obfuscated NanoTime`
** Select NanoTime report file `demo/api/obfuscate/obfuscatedNanoTimeReport_aquarius.rpt`
** Select ObfuscateMap file `ObfuscateMap.tcl` in export directory.
* Start via cmdline:
/starvisionpro -F demo/rtl/aquarius/aquarius.f -userware demo/api/obfuscate/obfuscate.tcl -userware demo/api/nanotime/nanotime.tcl -compact off
== Examples [source,verilog]
module testB(portA, portB); input portA; /* nasty comment / output portB ; parameter width = 3; / synopsys enum state */
endmodule
module CE4a86e9cb1a5de7fe224fd35721c24ce0(CE3aa51ffcb2262c3c3c664bb89355860a, CE594727775cda8c698690e5d1191e5196); input CE3aa51ffcb2262c3c3c664bb89355860a; output CE594727775cda8c698690e5d1191e5196 ; parameter CEd0121eaacee98ccf1602c9dcd0b03247 = 3; // synopsys enum state endmodule