| Author |
Message |
chaitu2k
Joined: 27 Apr 2004 Posts: 58 Helped: 1
|
27 Jan 2005 15:58 fuction call within state machine.execution time of function |
|
|
|
|
when u call a function within a state in combinational state machine process block
such as
when s1:
return_value_orsome siganl<= fucntion();
some asssignments;
...
....some more statements
ns<=s2;
how many clock cycles does the fuction take to return a value.....and wht does the function execution time depend on....can anyone pls explain so send a short document
|
|
| Back to top |
|
 |
Google AdSense

|
27 Jan 2005 15:58 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
r_e_m_y
Joined: 02 Oct 2003 Posts: 77 Helped: 1
|
27 Jan 2005 18:24 Re: fuction call within state machine.execution time of func |
|
|
|
|
Hi chaitu2k,
I don't think that you can use a synchronous function (that means it contains clocked process = Flip Flop) to affect a signal in an combinatorial process.
The function may only generate combinatorial.
If your signal "return_value_orsome siganl" is clocked somewhere else, the function shall return its value befor the clock edge.
Typically, the function shal work a your global clock frequency. (post synthesis timing report).
be careful if you use different functions to affect your signal "return_value_orsome siganl" in the other states : in synthesis, this will complexify the logic equations, and so you can obtain a very bad maximum frequency value...
I hope this will help you
|
|
| Back to top |
|
 |
sarath51
Joined: 11 Dec 2002 Posts: 143 Helped: 7
|
27 Jan 2005 20:10 Re: fuction call within state machine.execution time of func |
|
|
|
|
| Function should not have any timing delay etc, so it should get assigned in the same clock cycle
|
|
| Back to top |
|
 |