Prev: bit vs std_logic (was Re: Simulation of VHDL code for a vendingmachine)
Next: working with ADC and DAC together
From: Griffin on 18 Jan 2010 16:40 Hello, I'm trying to implement code that reads in some software registers from a peripheral after constant time intervals (ideally, a microsecond or so). I know that EDK comes with a hardware timer (xps_timer) and what I think is a software timer (fit_timer) and I know how to add them to my project as well as attach them to the PLB, but I haven't been able to find any documentation (xapp, etc.) as to how to use either to actually time some events. In a nutshell, I need my code to execute as follows: while(some condition) do { -read in software register (their values change with time) -store the value to ddr to be used later -wait 1 microsecond (or any arbitrary time). } I need to make sure that the time intervals between every time the software register is read in are the same, always, *and* I need to know how long that interval is, which is why I can't use a simple while loop. From what I've seen on the Internet, using one of these two timers seems to be the way to go. Any advice / suggestions / examples would be greatly appreciated. I'm using EDK 11.2 . Thanks in advance. -Sean. |