Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4606954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:38:10+00:00 2026-05-22T00:38:10+00:00

I work on a high-level simulator written in C++ for some hardware that is

  • 0

I work on a high-level simulator written in C++ for some hardware that is written in System Verilog.

The System Verilog code includes a number of functions that contain only logic (that is, nothing time-consuming, no flip-flops). I want to reuse this code in my C++ simulator.

Is there any way to reuse these functions in C++ (or C, which is easily linked into C++) by way of:

  • Converting System Verilog to C/C++ before compilation?
  • Compiling the System Verilog to functions callable by C/C++?
  • Any other way?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:38:11+00:00Added an answer on May 22, 2026 at 12:38 am

    Typically this kind of integration is done in the other direction, meaning calling C/C++ routines from Verilog. Of course, that only makes sense for verification components, obviously that can’t be synthesized. The most likely environment to do what you want is a SystemC/Verilog cosimulation, but that implies both the use of a Verilog simulator (which you explicitly don’t want), and a C model using SystemC.

    Simulators seeking high performance often generate C or native code. I’m not aware of any way to extract specific functions from the generated code in VCS (the simulator I’m most familiar with), but it might be possible to do so with one of the open source simulators. Any commercial (i.e., licensed) simulator is unlikely to support generating code that you can run without a license. I’m not sure if your desire to use the Verilog functions independent of the simulator is driven by licensing, runtime overhead, tool installation burden, or something else entirely.

    I’m assuming you don’t maintain the SystemVerilog routines, so it may not be possible to change the way they’re implemented. However, if it is possible, one common strategy when functionality is needed both in C and in Verilog is to write code generators that can transform a single definition into C and Verilog implementations.

    Another more esoteric possibility is SystemC synthesis. It is relatively new and I don’t have experience with it, but if you have access to the tools and they work for your functions, it would allow you to reuse a C implementation for C models, hardware simulation, and synthesis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At work, we have multiple branches that we may be working on at any
I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially
At work we are currently still using JUnit 3 to run our tests. We
At work we are being asked to create XML files to pass data to
I work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
I work with C# at work but dislike how with webforms it spews out
I work on a complex application where different teams work on their own modules
I work a lot with network and serial communications software, so it is often
At work today, I came across the volatile keyword in Java. Not being very
At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.