Trusster Forums » Technical Support

Active HDL (Windows)

(2 posts)
  • Started 4 months ago by shimrod
  • Latest reply from Mike Mintz

  1. shimrod
    Member

    Hi

    Im trying to get teal (1.40b) and Truss to work with Active HDL 8.2 under windows XP, with pthreads.2 and the mingw gcc compiler that comes with the simulator.
    I have managed to compile teal (PLI 1) and some of the tests passes. However the mutex_test crashes the simulator. I tried to play with the number of threads and up to 4 works. When I change the no of iterations to 1 I can create many (250) threads. So it seems to me that something with the mutex fails.

    Regarding Truss, I can't compile since the different implementation of pthread_t.
    Truss seems to rely on the id being 0 after thread cancelled?
    Also this seems redundant since teal::stop_Thread is calling both ptrhead_cancel and pthread_join.

    Anyone who has some ideas? Or should I give up and move to linux and a proper simulator?

    Im not an C++ (or C) expert and the code is quite complex to follow.

    Thanks and best regards
    Rolf

    Posted 4 months ago #
  2. Mike Mintz
    Key Master

    Hi Rolf,

    Thanks for trying Teal/Truss and working on these run time issues. Yeah the synch and mutex code is just ugly.

    I have good contacts at Aldec and will get them to try teal on windows. I know they use teal on Linux in their regression suite.

    If you can get me a stack dump of the crash I will take a look.

    As for truss, can you get me the error from the compiler. I agree that I made a bad assumption that pthread_t was an integral type. You can see in the run_loop class (just below the thread class in truss_thread.h) that I use a bool to track the state.

    As for the redundant code in stop(), the idea it to protect if you call stop() again. pthread does not handle a second cancel or join very well.

    Aldec is a proper simulator.

    It seem to me you are following the code quite well ! I have been coding c++ for 20 years now and would not consider myself an expert.

    I will get back to you when I hear from aldec.

    Take Care,
    mike

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.