Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

PERFORMANCE_COUNTER_BASE

Hi, I am following performance counter part (tutorial) ' an391 '

And I have a problem.

When I click 'build' from NiosII IDE, I get below message :

////

**** Incremental build of configuration Release for project performance_project ****

make -s all

Compiling checksum_test.c...

Compiling high_res_timestamp_performance_project.c...

../high_res_timestamp_performance_project.c: In function `main':

../high_res_timestamp_performance_project.c:132: error: `PERFORMANCE_COUNTER_BASE' undeclared (first use in this function)

../high_res_timestamp_performance_project.c:132: error: (Each undeclared identifier is reported only once

../high_res_timestamp_performance_project.c:132: error: for each function it appears in.)

make: *** [obj/high_res_timestamp_performance_project.o] Error 1

Build completed

////

By looking at the error lines, I can guess that `PERFORMANCE_COUNTER_BASE' undeclared. So I looked up three files and I couldn't find the above anywhere.

So I declare it as

# define PERFORMANCE_COUNTER_BASE 0

because the line says

/*

* Reset (initialize to zero) all section counters and the global

* counter of the performance_counter peripheral.

*/

PERF_RESET (PERFORMANCE_COUNTER_BASE); <== error line

I could compile it but when I run it as hardware,

It give me below lines and hanging there forever.

//

nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)

Hello from Nios II Performance Checksum Test!

//

I&#39;ve tried to place the above # define PERFORMANCE_COUNTER_BASE 0

at &#39;high_res_timestamp_performance_project.c&#39; first time.

and at first and &#39;checksum_test.c&#39; second time.

Both compiled but result are same.

Just hanging and doesn&#39;t give me back any result.

What could be a problem? I&#39;ve followed the tutorial. And it doesn&#39;t say anything about this. Am I missing something?

I am using QuartusII v5.0 with UP3 board (Cyclone EP1C6Q240C)

Someone says the tutorial is for v5.1. Is that a problem?

I think it&#39;s not a major problem. It seems to be simple problem...

Anybody know this problem, please help me.

YOng.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I could be going out on a limb here, but I&#39;d bet that your hardware (SoPC Builder design) doesn&#39;t have a performance counter....right???

    Cheers,

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    and it must be called "performance_counter" ... check your system.h in the system library...

    Paolo