Error on counting distance between 2 rising edges

Status
Not open for further replies.

TheBrian

Newbie level 4
Joined
Nov 5, 2009
Messages
7
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Location
Jakarta, Indonesia
Activity points
1,316
I'm trying to count distance between two rising edges. i found a problem when i install the program into my Xilinx Spartan 3 starter kit, which the output is different from what i expected. The process is simply:


clk_div is an enable signal and sync with the clk. The simulation result using ISE 9.2i was perfect but the result when the whole program is installed is not as what i expected. After i check for errors, i found out that the temp signal is not incrementing. The value of signal temp is incrementing only once for any kind of inputs (so the velocity is always 1)

Does anybody know how can the error occur and how to fix it??

So far, i can only think that there's delay inside the FPGA which messed up the counting. Is it possible?? Will it help if i build a state machine for the signals??

sorry if my english and explanation is catastrophic.. THX!!!

Cheers,
Brian Angg
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…