• 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. Hardware/Software Co-Development, Verification…
  3. ncsim pthread vhpi instabilities

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 48
  • Views 12748
  • 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

ncsim pthread vhpi instabilities

archive
archive over 17 years ago

Hi, I'm using the vhpi interface in ncsim to connect a processor simulator written in C to a VHDL simulation. This all seems to work fine accept for seemingly random crashes (segmentation faults mostly). Sometimes a simulation runs fine for quite a while and sometimes it crashes very quickly. Our C model uses pthreads to simulate the different parts of the processor and it uses semaphores (from libc) to synchronize between the ncsim pthreads and our own pthreads (which are scheduled by our own thread scheduler). The behaviour I see is that calls to the function "sem_wait" get interrupted and return without having acquired the semaphore. Can it be that ncsim is sending interrupts to its threads? Also, when attaching GDB to the ncsim process, the thread behaviour changes and it gives a segfault somewhere else. All in all I'm unable to pinpoint the exact problem, so I'm asking if anybody knows more about the way ncsim treats its threads. BTW, I'm using ncsim 5.7 at the moment.. are there any known bugs with this version perhaps? Thanks very much for your time. Jozef


Originally posted in cdnusers.org by jozefkruger
  • 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