Help - Search - Members - Calendar
Full Version: problem with Generating HDL
Impulse Support Forums > Impulse Forums > General Discussions
Bhaul
Hi,
I have problem with gernerating HDL from Simple c programm written for subtraction.I am able to get results like build software simulation Executable ,launch software simulation Executable in Impulse CoDeveloper software.When i click Generate HDL option i get error message like ............======== Building target 'build' in file _Makefile ========
make: *** No rule to make target `sub_hw.c', needed by `addition.i'. Stop.

======== Build of target 'build' complete ========
and here i have attached Impulse Codeveloper softawre program window as follows:
//ifdef WIN32 // Compiling on Windows
#include <windows.h>
//endif */
#include <stdio.h>
#include "co.h"

#ifdef MONITOR
#include "cosim_log.h"
#endif

// Include the following prototype in your main application source file:
//
void sub()

;


/////////////////////////////////////////////////////////////
// This is assumed to be a hardware process compatible with
// CoBuilder. Refer to the CoDeveloper and Impulse C
// documentation for C language constraints and other tips
// on how to write C functions for hardware.
//
int main()

{
int a,b,c;
//clrscr();
//printf("enter the numbers a,b");
printf("enter the numbers a \n");
scanf("%d",&a);
printf("enter the numbers b \n");
scanf("%d",&b);
//scanf("%d& %d",&a&b);
c=a-b;
printf("a-b=%d",c);
getch();
return 0;
}
/*ifdef MONITOR
IF_SIM(cosim_logwindow log_sub;)
IF_SIM(log_sub = cosim_logwindow_create("sub");)
endif*/


// The outer loop is assumed to be your primary data source for this
// run function. Modify as needed.



/////////////////////////////////////////////////////////////
// Use the following as a guideline for creating your
// configuration function. The following statements will
// declare and create the Impulse C process and stream
// objects you need to use the run process.
//
/*co_process process_sub;
#define BUFSIZE 2
process_sub = co_process_create("sub", (co_function)sub,
0 + 0,
);
*/
thanks and regards,
Bhaul
RalphBodenner
Hi Bhaul,

I would recommend starting from a template project using the File > New Project menu, and preserving the structure of that project; the processes, definitions of the configuration function and co_initialize, and a main function that calls co_execute and co_initialize are all required for HDL generation to succeed.

Regards,
Ralph
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.