Forum Discussion
Altera_Forum
Honored Contributor
15 years agoDevide in VHLD
I want to implement this function : A<= B/x"A", when I compile, the Quartus put a notice: "/" used but didn't declare.
When I try with "*" (multiply) or "+" (add), it is ok. I don't know this error, Please help me. Thank you very much.37 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- take a look at the ModelSim documentation: http://www.altera.com/literature/hb/qts/qts_qii53001.pdf --- Quote End --- Thank you very much. - Altera_Forum
Honored Contributor
take a look at the ModelSim documentation:
http://www.altera.com/literature/hb/qts/qts_qii53001.pdf - Altera_Forum
Honored Contributor
When I use Modelsim to simulate VHDL code, It show an error with LPM library?
I want to use devide command with lpm library, what should I do? Thank you very much. - Altera_Forum
Honored Contributor
Thank you very much. I had finish my exercise. I used lpm_devide.
- Altera_Forum
Honored Contributor
"/" for integers is not part of std_logic_arith, it is part of the standar library.
- Altera_Forum
Honored Contributor
--- Quote Start --- The Std_logic_arith library does not have a divide function. --- Quote End --- It has, but only for integer data type. numeric_std supports inference of divider MegaFunction for signed and unsigned data types. - Altera_Forum
Honored Contributor
The Std_logic_arith library does not have a divide function. The numeric_std library has a divide function, so try that instead.
BUT - Divide is very resource intensive, and doing it in 1 clock cycle will cause the FMax to drop. Use the lpm_divide megafunction instead.