* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 ncsim pthread vhpi instabilities 

Last post Mon, Oct 8 2007 1:43 PM by archive. 0 replies.
Started by archive 08 Oct 2007 01:43 PM. Topic has 0 replies and 2735 views
Page 1 of 1 (1 items)
Sort Posts:
  • Mon, Oct 8 2007 1:43 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    ncsim pthread vhpi instabilities Reply

    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 by jozefkruger
    • Post Points: 0
Page 1 of 1 (1 items)
Sort Posts:
Started by archive at 08 Oct 2007 01:43 PM. Topic has 0 replies.