• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. verilogA encryption for spectre

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 128
  • Views 20604
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

verilogA encryption for spectre

Fabb
Fabb over 11 years ago

Hello,

 

I would like to encrypt a compact analog model written in verilogA and executed with spectre and ultrasim.

In the spectre doc, I found that a netlist could be encrypted wtih

spectre_encrypt [-i input_file] [-o output_file] [-all]

but what about a verilogA file?

 Regards,

 

Fabrice

  • Cancel
  • Quek
    Quek over 11 years ago

    Hi Fabrice

    You cannot use spectre_encrypt on a veriloga file. You will need to use ncprotect. Would you please refer to COS article 11203304 for more details?
    unix> ncprotect -extension vap -language vlog -autoprotect mymodule.va

    The above command will encrypt the "mymodule.va" file and create a new encrypted file called "mymodule.va.vap".



    Best regards
    Quek

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Fabb
    Fabb over 11 years ago

     Thank you very much, it works perfectly.

     

    regards,

     

    fab

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • UUinfini
    UUinfini over 11 years ago

    Hello Quek,

    I have used your method to encrypt my file "veriloga.va", it works well. However I don't understand why because we didn't set a password, and we can always open the ".va" file freely, it hasn't been encrypted. Could you please explict it to me? Thank you.

    Best regards,

    UU

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    I don't understand your question - you said it works well, and then said that it wasn't encrypted. Presumably it can't be both? The original file does not get encrypted - it leaves it as is. You end up with an encrypted file with the suffix ".vap" with the instructions that Quek gave - and this is using the standard Cadence key (keyname CDS_KEY). It's possible to use other key pairs - search in the INCISIVE documentation using cdnshelp for "-rsakeygenerate" and more details can be found on how to manage a key database.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • UUinfini
    UUinfini over 11 years ago

     Thank you for your reply. I meant that the instruction can be executed and ".vap" file and ".log file " are created but the original file does not get encryted. What do you mean by "INCISIVE documentation", I have found the words "encryption", "encrypt", "key", "protect" etc. in the "virtuoso documentation " in "help", but I found nothing. Do you know why? Thank you.

    Regards,

    UU

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    The original file is not supposed to be touched - the .vap file is the encrypted equivalent of the original file - so you could use that wherever you were using the VerilogA file. Most encryption tools work that way (e.g. pgp, gpg) - they leave you the plain text file because that's probably your master file and you don't want to lose it!

    The "ncprotect" command is supplied in both the MMSIM stream and the INCISIV stream (which is where the digital and mixed-signal simulators live). There is some documentation in the MMSIM stream - so if you run `cds_root spectre`/tools/bin/cdnshelp and then search for "ncprotect" you'll find some information. If you have the digital or AMS simulators installed and in your path, there's more information in the INCISIV stream documentation - so run `cds_root irun`/tools/bin/cdnshelp and search for "-rsakeygenerate". That's only if you really need to have specific public/private key pairs, which is quite possibly overkill for what you need - the default behaviour (as I said) is to use a Cadence key.

    Regards,

    Andew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • UUinfini
    UUinfini over 11 years ago

    I have found "ncprotect", and did the encryption. However, ".vap" can't be used for simulation, do you think it's normal or not? If it can't be used for simulation, the encryption will be unuseful.

    Regards,

    UU

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

     Why can't it be used for simulation? From the command line, using this in a spectre netlist:

    ahdl_include "mymodel.va.vap" 

    works fine. If you want it to be in a veriloga view inside  a Virtuoso library, there's nothing to stop you renaming the ".vap" to "veriloga.va" - it will still work OK. There's nothing special about this .vap suffix.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • UUinfini
    UUinfini over 11 years ago

     I have deleted ".vap" and it works well. Thank you very much for your help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Amar Kumar
    Amar Kumar over 5 years ago

    Hello there,

    I have encrypted a simple verilog file using "spectre_encrypt" command.

    When i try to simulate it using "spectre" , it gives pragma error.

    ERROR (VACOMP-1588): "verilog_enc_line.v", line 12: Could not decrypt the encrypted file.
    invalid or unknown or incomplete pragma specification 'NO ERROR'
    Check that the encryption key is valid and that the version of the encryptor for this file is compatible with (not
    newer than) the version of the decryptor.
    ERROR (VACOMP-1588): "Error: unexpected EOF or end of line//pragma protect begin_protected"
    "verilog_enc_line.v", line 13: Could not decrypt the encrypted file.
    invalid or unknown or incomplete pragma specification 'invalid or unknown or incomplete pragma specification 'NO
    ERROR''
    Check that the encryption key is valid and that the version of the encryptor for this file is compatible with (not
    newer than) the version of the decryptor.

    My "run Simulation" file looks like below.

    rsim (a b) simpleres
    simulator lang = spectre
    ahdl_include "verilog_enc_line.v"
    tran tran stop=10n errpreset=conservative write="spectre.ic" writefinal="spectre.fc" annotate=status maxiters=5

    Any help is appreciated.

    Thanks & Regards,

    Amar

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information