Jump to content


Consumer Producer Problem


  • You cannot reply to this topic
No replies to this topic

#1 Henning

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 October 2009 - 03:21 AM

Hello,
I wrote a stream consumer and producer function with the intention to use the same input and output files for the hdl-simulation.

Here are the prototypes:
CODE
void datFileSource(co_stream output_stream, char* fileString);
void datFileSink(co_stream input_stream, char* fileString);


This compiles and runs as software but leads to errors at hardware generation:
1>Unexpected type (t:g2) as parameter of datFileSource.
1>make: *** [ImpulseProject_Binning.sic] Error 1


If I just define dummy functions for consumer and producer that only open and close the stream - hardware genaration is working.
My workaround is to have two configurations for hardware and software genaration and exclude the hardware configuration file from visual studio build. I'm just wondering if this strategy is sufficient.
It's clear that one can not read and write files from hardware but the parser should recognise that these functions also just open and close a stream.

Best reagrds,
Henning





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users