- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif
hello to everybody i would like to use timestamp to monitoring my application time. In sopc builder i set timer 1 msec . I follow documents and then i include the header file such as the documents told me. but when i compile to download exe file (.elf ) occur a console warning that tell me is notpossible to find header file . Very strange . Somebody already use this function? thanks for helps ciao walterLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you post the warning message you are seeing?
--chris --- Quote Start --- originally posted by pmicro@Jun 26 2006, 06:27 PM http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/biggrin.gif http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/biggrin.gif http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/biggrin.gifhello to everybody
i would like to use timestamp to monitoring my application time.
in sopc builder i set timer 1 msec .
i follow documents and then i include the header file such as the documents
told me.
but when i compile to download exe file (.elf ) occur a console warning that
tell me is notpossible to find header file .
very strange .
somebody already use this function?
thanks for helps
ciao
walter
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16409)
--- quote end ---
--- Quote End ---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include "sys/alt_timestamp.h"# include "my_app.h"
alt_u32 time1; alt_u32 time2; int main(void) { if(alt_timestamp_start()<0) { printf("No timestamp device aviable\n"); } else { time1=alt_timestamp(); } while (1) { ....................... //my application ........................//my application time2=alt_timestamp(); printf("time execution= %u ticks\n",(unsigned int)(time2-time1)); } } "undefined reference to ' alt_timestamp_start ' undefined reference to ' alt_timestamp' In effects these functions are not in the file "sys/alt_timestamp.h" but i found them in the file "altera_avalon_timer_ts .c " I try also to include this file but nothing I cannot understand http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you defined the timestamp timer in the IDE (checkbox on the System Library properties page)? The timestamp functions do not make use of the system clock timer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
could you be clearer?
Please explain to me exactly informations about your question slacker thanks http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif walter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have a "Timestamp timer" defined on the System Library properties page? If you do not, or don't know what I'm referring to, please go look at this page (in the IDE).
The timestamp functions will not be compiled into your System Library unless you have one selected/defined.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
these are the declarations related to the timer.
In sopc builder I have setted as from manual, but here in the file result me "none".You can see at the end of file # define SYSTEM_TIMER_NAME "/dev/system_timer"# define SYSTEM_TIMER_TYPE "altera_avalon_timer"# define SYSTEM_TIMER_BASE 0x00900800# define SYSTEM_TIMER_IRQ 1# define SYSTEM_TIMER_ALWAYS_RUN 0# define SYSTEM_TIMER_FIXED_PERIOD 1# define SYSTEM_TIMER_SNAPSHOT 1# define SYSTEM_TIMER_PERIOD 1# define SYSTEM_TIMER_PERIOD_UNITS "ms"# define SYSTEM_TIMER_RESET_OUTPUT 0# define SYSTEM_TIMER_TIMEOUT_PULSE_OUTPUT 0# define SYSTEM_TIMER_MULT 0.001# define SYSTEM_TIMER_FREQ 50000000 # define ALT_SYS_CLK SYSTEM_TIMER# define ALT_TIMESTAMP_CLK none# define ALT_MAX_FD 32 I follow instruction from manual . It's possible make some change in this file , without regenerate in sopc and compile in quartus II ? If not , how i have to set flags in sopc builder ? thanks for the answers ciao walter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Walter,
I'd advocate having two timers in your SOPC Builder system, one for the system clock timer and one timestamp timer. The reason your design is failing is#define ALT_TIMESTAMP_CLK none
Unless your SOPC Builder system has two timers, already, you'll have to add another one and re-generate/re-compile. You could also use the "system_timer" timer as your timestamp clock, but then you wouldn't have a system clock timer, and I don't advocate that! Both the full_featured and standard "examples" have timestamp timers as well as system clock timers. You should change your SOPC Builder design so that it does too. The key part, that you missed, is that you've got to make sure your System Library properties are properly configured, prior to compiling your application. A quick browse through the Nios II IDE online help yields Timestamp timer - Associates the timestamp driver to a timer device in the SOPC Builder system. The Timestamp timer and the Periodic system timer cannot specify the same physical device.
Unless you have a gigantic system, adding an additional timer to it shouldn't add more than a few seconds of generation/compilation time. Best of luck, - slacker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday i also add a new timer
Generate system and ricompile in quartus II but in the system.h file i only read a new timer added , while the last lines at the end of file was the same "none2 . http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif p.s. if i set "Writebke period " flag i loose full featured option I have to not set this flag from the manual if i want to use timestamp It's very uncredible , every little thing became big in this system To use timestamp is very easy from the manual , but what a have to do is not possible to know http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes... the default for Timestamp timer, in the System Library Properties page, is none. The build process, used by the IDE, will not (cannot, could not) automagically detect your new timer, you have to tell it to include the timestamp timer, by setting on the System Library properties page.
The timestamp timer does, by the way, work. You just have to understand how important the System Library properties page is to the build process. Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes i know
when i build a system in NIOS II IDE , the compiler take the system .ptf , after quartus II compile , and after sopv builder generate. So during building , IDE produce system. h , usiing address base specified in sopc builder , and map all register of all component used . Anyway , i posted the system.h above , and then i added a new timer in cops builder , generate , update in quartus II and "start compilation " again . After that in NIOS II IDE i build or rebuild all . In the system.h file appear a new timer , but the last three lines about timestamp remains the same . At the end i cannot understand what to do , really ...... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif I saw all documentation files , but they only explain how to use timestamp with some sample codes . they explain that it's possible to use timer driver in two ways , like timestamp or system timer and how to set the flags property page in sopc builder ... ...nothing else Tomorrow i try to use my oscilloscope connected to the pc and set one output port bit in the beginner and reset at the end of my program And after try to understand the cycle time . http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok... here's the step-by-step for changing your syslib properties:
1. Right-click on your project, in the IDE, and select "System Library Properties" or right-click on your System Library project and select "Properties". 2. Change "Timestamp timer:" from "None" to whatever your new timer's name. - Take a look at any full_featured design's "high_res_timer" to see how to properly configure an interval timer in SOPC Builder. 3. Click OK to apply the changes. 4. Rebuild your project, and you should see the correct timestamp# def's. in your system.h file. Hopefully, that will get you where you want to go. BTW, both the Dhrystone software example and the software for the custom instruction tutorial make use of timestamp timers. Perhaps, you could refer to these example, in their entirety, prior to moving forward with your development? Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CORRECT !!! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
I try to write TIMER_0 (my second timer in system) direct in the file instead "none" , but after generation IDE overwrite with "none" again. So i try as you suggest , because i saw the post later , and IDE compile correct . After that my code was compiled successfully. I change period from ms to us but the result is 0 (us) NIOS II is the faster system that i never see . http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif Maybe there is other little problem because alt_timestamp return alwais 0 . ...mmmmmmmmmmmmmm http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif Otherwise , Slacker , thank you for your interest you are very nice http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif Now i want to check why doesn't work properly have a good night (for me 'cause in italy now it's 1.30 ) ciao walter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nothing .....
the function alt_timestamp() returns always 0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif ciao walter- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by pmicro@Jul 1 2006, 05:55 PM nothing .....
the function alt_timestamp() returns always 0
http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/sad.gif
ciao
walter
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16602)
--- quote end ---
--- Quote End --- I also faced the problem which the compiler cannot identify the function alt_timestamp_start(). And I tried what slacker suggested, it works!!!! Bingo!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page