I work with Virtex 4 FX 12 LC Development Kit and tried to implement a very easy program, where input equals output.
When I launch XMD I alsways get these ERROR messages:
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c: In function 'config_IntegralController':
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: 'co_loc' undeclared (first use in this function)
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: (Each undeclared identifier is reported only once
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: for each function it appears in.)
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c: In function 'co_initialize':
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:97: warning: return makes pointer from integer without a cast
make: *** [integral/executable.elf] Error 1
Done!
///////////////////////////////////////////////////////////////////////////////
//
// Generated by Impulse CoDeveloper
// Impulse C is Copyright© 2003-2007 Impulse Accelerated Technologies, Inc.
//
// IntegralController_hw.c: includes the hardware process and configuration
// function.
//
// See additional comments in IntegralController.h.
//
#include "co.h"
#include "cosim_log.h"
#include "IntegralController.h"
#ifdef IMPULSE_C_TARGET
#include "xio.h"
#include "xparameters.h"
#include "apu_if.h"
#endif
Here you can see the hw.c
// Software process declarations (see IntegralController_sw.c)
extern void Producer(co_stream Phasedifferenz);
extern void Consumer(co_stream Piezovolt);
//
// This is the hardware process.
//
void Integration(co_stream Phasedifferenz, co_stream Piezovolt)
{
co_int32 nSample;
IF_SIM(int samplesread; int sampleswritten;)
IF_SIM(cosim_logwindow log;)
IF_SIM(log = cosim_logwindow_create("Integration")
do { // Hardware processes run forever
IF_SIM(samplesread=0; sampleswritten=0;)
co_stream_open(Phasedifferenz, O_RDONLY, INT_TYPE(STREAMWIDTH));
co_stream_open(Piezovolt, O_WRONLY, INT_TYPE(STREAMWIDTH));
// Read values from the stream
while ( co_stream_read(Phasedifferenz, &nSample, sizeof(co_int32)) == co_err_none ) {
#pragma CO PIPELINE
IF_SIM(samplesread++
co_stream_write(Piezovolt, &nSample, sizeof(co_int32));
IF_SIM(sampleswritten++
}
co_stream_close(Phasedifferenz);
co_stream_close(Piezovolt);
IF_SIM(cosim_logwindow_fwrite(log,
"Closing filter process, samples read: %d, samples written: %d\n",
samplesread, sampleswritten)
IF_SIM(break;) // Only run once for desktop simulation
} while(1);
}
//
// Impulse C configuration function
//
void config_IntegralController(void *arg)
{
co_stream Phasedifferenz;
co_stream Piezovolt;
co_process Integration_process;
co_process producer_process;
co_process consumer_process;
IF_SIM(cosim_logwindow_init()
Phasedifferenz = co_stream_create("Phasedifferenz", INT_TYPE(STREAMWIDTH), STREAMDEPTH);
Piezovolt = co_stream_create("Piezovolt", INT_TYPE(STREAMWIDTH), STREAMDEPTH);
producer_process = co_process_create("Producer", (co_function)Producer,
1,
Phasedifferenz);
Integration_process = co_process_create("Integration", (co_function)Integration,
2,
Phasedifferenz,
Piezovolt);
consumer_process = co_process_create("Consumer",(co_function)Consumer,
1,
Piezovolt);
co_process_config(Integration_process, co_loc, "pe0");
}
co_architecture co_initialize(int param)
{
return(co_architecture_create("IntegralController_arch","Generic",config_IntegralController,(void *)param));
}
If anyone know how to solve this problem it would be great.
Greetings
Ramona












