Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Question about the Avalon Performance Counter

Altera_Forum
Honored Contributor II
1,088 Views

1. alt_get_cpu_freq() is not defined by "altera_avalon_performance_counter.h",  

which header file can I use for this function? 

2. When I run the program using Nios II instruction set simulator, it gave me a  

warning : "SOPC Builder system component performance_counter_0 is not  

supported by the simulator. Simulation may be incorrect if your software  

attempts to access it". Also I got an error: "Error! Failed memory access in 

component cpu_0 - Reading data 0x0 from uninitialized memory (addr =  

0x3ff68) Error! : Simulation failed in component cpu_0 at instruction 3257 

(PC=0x21e4 instr=0x24000317)." So, which tool except Modelsim can I use to 

run the program with performance counter? Actually, Modelsim is very slow if 

running a very large code. 

 

Thank you very much!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
350 Views

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

1. alt_get_cpu_freq() is not defined by "altera_avalon_performance_counter.h",   

    which header file can i use for this function? 

--- Quote End ---  

 

 

are you sure? I have it in the file  

components/altera_avalon_performance_counter/HAL/inc/altera_avalon_performance_counter.h 

... it's the last function declared! 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

2. when i run the program using nios ii instruction set simulator, it gave me a  

    warning : "sopc builder system component performance_counter_0 is not  

    supported by the simulator. simulation may be incorrect if your software   

    attempts to access it".  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

I think the simulator only implements a few basic peripherals... 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

2. also i got an error: "error!  failed memory access in 

    component cpu_0 - reading data 0x0 from uninitialized memory (addr =   

    0x3ff68) error! : simulation failed in component cpu_0 at instruction 3257 

    (pc=0x21e4 instr=0x24000317)."  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

In the simulator, You cannot read from a location that has not been previously written... that&#39;s typically a bug in the software (unless you want to read some random values...)...  

 

In any case look also at this post:  

http://forum.niosforum.com/forum/index.php?showtopic=314&hl= (http://forum.niosforum.com/forum/index.php?showtopic=314&hl=

 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

so, which tool except modelsim can i use to 

    run the program with performance counter? actually, modelsim is very slow if 

    running a very large code. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

I think you have to use the real hardware :-( 

 

Paolo
0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Thank you very much, paolo http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

 

--- Quote Start ---  

originally posted by paolo.gai+feb 8 2006, 03:16 am--><div class='quotetop'>quote (paolo.gai @ feb 8 2006, 03:16 am)</div> 

--- quote start ---  

<!--quotebegin-ruling@Feb 7 2006, 11:55 PM 

1. alt_get_cpu_freq() is not defined by "altera_avalon_performance_counter.h",   

    which header file can i use for this function? 

--- Quote End ---  

 

 

are you sure? I have it in the file  

components/altera_avalon_performance_counter/HAL/inc/altera_avalon_performance_counter.h 

... it&#39;s the last function declared! 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

2. when i run the program using nios ii instruction set simulator, it gave me a  

    warning : "sopc builder system component performance_counter_0 is not  

    supported by the simulator. simulation may be incorrect if your software   

    attempts to access it".  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

I think the simulator only implements a few basic peripherals... 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

2. also i got an error: "error!  failed memory access in 

    component cpu_0 - reading data 0x0 from uninitialized memory (addr =   

    0x3ff68) error! : simulation failed in component cpu_0 at instruction 3257 

    (pc=0x21e4 instr=0x24000317)."  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

In the simulator, You cannot read from a location that has not been previously written... that&#39;s typically a bug in the software (unless you want to read some random values...)...  

 

In any case look also at this post:  

http://forum.niosforum.com/forum/index.php?showtopic=314&hl= (http://forum.niosforum.com/forum/index.php?showtopic=314&hl=

 

 

 

--- Quote Start ---  

originally posted by ruling@Feb 7 2006, 11:55 PM 

so, which tool except modelsim can i use to 

    run the program with performance counter? actually, modelsim is very slow if 

    running a very large code. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12614) 

--- quote end ---  

 

--- Quote End ---  

 

 

I think you have to use the real hardware :-( 

 

Paolo 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12624)</div> 

[/b] 

--- Quote End ---  

0 Kudos
Reply