User guide
E-67
PLI Access Routines
write_error += vcsSpWriteString(esp,
"This text will *not* be encrypted.\n");
write_error += vcsSpEncodeOn(esp);
write_error += vcsSpWriteString(esp,
"This text *will* be encrypted.");
write_error += vcsSpWriteChar(esp, ’\n’);
write_error += vcsSpEncodeOff(esp);
write_error += vcsSpWriteString(esp,
"This text will *not* be encrypted.\n");
/* Clean up */
write_error += fclose(fp);
vcsSpClose(esp);
if (write_error) {
printf("Error while writing to ’%s’\n", filename);
}
}
Caution
If you are encrypting SDF or Verilog code that contains include
directives, you must switch off encryption (vcsSpEncodeOff),
output the include directive and then switch encryption back on. This
ensures that when the parser begins reading the included file, it’s in
a known (non-decode) state.
If the file being included has proprietary data it can be encrypted
separately. (Don’t forget to change the ‘include compiler directive
to point to the new encrypted name.)