Problems with running Cadence DPI examples

Source: Internet
Author: User

The kids shoes that do ASIC verification can learn systemopengl DPI, which allowsCodeDirectly call C or C ++ sub-ProgramAnd is simpler than that of the Tilde-PLI. For comparison with PLI, refer to the followingArticle:
English: http://www.moditek.com/expofile/stuart-pli-dpi.pdf
Http://www.sutherland-hdl.com/papers/2004-SNUG-paper_Verilog_PLI_versus_SystemVerilog_DPI.pdf.

Recently, DPI was used to build a NIST-based RM to verify the encrypted module blockcipher after hardware implementation. The import to testbench contains different modes in crypto ++ Library (ECB, CBC, etc) to compare DUT output and RM output.

Beginners can use examples provided by Cadence to learn how to run these examples in the installation directory/Cadence/incisiv111/doc/dpiengrntbkof the cadence tool.

When running the DPI instance provided by Cadence, follow the instructions in the PDF, there are "one-step" (Irun) and "four-step" (ncvlog, ncelab, GCC, ncsim) two running modes. When the "Four Steps" are used, errors may occur. The following prompt is displayed:

 
Unable to load the default library libdpi ../libdpi. So: cannot open shared object file: no such file or directory.

ApparentlyC LanguageThe so file generated by the file is not correctly loaded by ncsim. What is the problem?

The problem occurs on the GCC compilation option! The Linux server is usually 64-bit, so it is compiled with GCC. the so shared library is also 64-bit, and the DPI program itself is 32-bit, so it cannot be found after the program runs. so shared library. You only need to add "-M32" to the GCC compilation option on the PDF file, as shown below:

 
Gcc-M32-FPIC-shared-O libdpi. So adder. C-I $ cds_inst_dir/tools/Inca/include ($ cds_inst_dir is the installation directory of cadence incisiv)

Here we will briefly list the corresponding simulation commands.

The "one-step" command is as follows:

 
Irun-SV top. V adder. c

The "four-step" command is as follows:

 
1 ncvlog-SV top. v2 ncelab-access + RWC work. topincident3 gcc-M32-FPIC-shared-O libdpi. so adder. c-I $ cds_inst_dir/tools/Inca/include4 ncsim work. top

For more DPI information, see http://www.doulos.com/knowhow/sysverilog/tutorial/dpi/ and systemopengl lrm.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.