presto
Member level 1
Re: Do you guys really use the function & Procedure in V
I believe function and procedure are useful in VHDL for both simulation and synthesis.
It is actually a kind of abstraction and hence leads to better code maintainance and design reuse. Although the function and procedure sound like sub-routine in the software, they are really different. You might tread a VHDL function like a normal piece of software function. But when you using the procedure, it's good to have a clear picture about what kind of hardware the procedure will be. Otherwise, your procedure may not be synthesisable. (please refer to IEEE 1076.6 for synthsisable sub-set of the VHDL.)
For example, you can use fuction to do type convert; you can use procedure for encoding/coding a composite signal. And they can be used for both simulation and synthesis.
I believe function and procedure are useful in VHDL for both simulation and synthesis.
It is actually a kind of abstraction and hence leads to better code maintainance and design reuse. Although the function and procedure sound like sub-routine in the software, they are really different. You might tread a VHDL function like a normal piece of software function. But when you using the procedure, it's good to have a clear picture about what kind of hardware the procedure will be. Otherwise, your procedure may not be synthesisable. (please refer to IEEE 1076.6 for synthsisable sub-set of the VHDL.)
For example, you can use fuction to do type convert; you can use procedure for encoding/coding a composite signal. And they can be used for both simulation and synthesis.