Jump to content


problem with Generating HDL


  • You cannot reply to this topic
1 reply to this topic

#1 Bhaul

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 06 May 2009 - 07:23 PM

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

#2 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 07 May 2009 - 10:19 AM

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
Ralph Bodenner
Impulse Accelerated Technologies, Inc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users