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
Thanks everybody very much. I had already done Modelsim - VHDL. If add 220pack.vhd/220model.vhd in to project and compile it to folder lpm you can work with lpm library in modelsim. Thanks everybody again.
- Altera_Forum
Honored Contributor
--- Quote Start --- Usually altera_modelsim will have these lpm/altera_mf libraries ready from installation. --- Quote End --- Hi Kaz How's about altera_modelsim? It's a single software or built-in with quartus software? Why I don't see it in my computer? Thank you very much. - Altera_Forum
Honored Contributor
--- Quote Start --- All Quartus specific libraries (LPM and device specific) have been installed during initial ModelSim installation (some ModelSimDE6.1 or 6,2 version). Unlike when simulating Verilog, I don't remember missing library issues with VHDL designs. But I don't have ModelSim installed on my computer now and can't check these problems. An additional remark related to your previously posted waveform. You didn't ever mention a device family. The timing could be explained if either belonging to a very slow logic family, or if the synthesis options in effect would allow to move an output register. --- Quote End --- I'm sorry when i forgot mention a device family. I use DE2-70 (Cyclone II) - EP2C70F896C6 - Altera_Forum
Honored Contributor
--- Quote Start --- You can precompile most libraries in Modelsim. Usually altera_modelsim will have these lpm/altera_mf libraries ready from installation. Otherwise you can precompile as follows: go to modelsim => compile => set library name to lpm => navigate to altera folders that contain 220pack.vhd/220model.vhd. select them and compile. --- Quote End --- I don't know, why menu compile of my Modelsim software is not active. I can not choose it. I add 220pack.vhd/220model.vhd to my project and compile => not ok I can not make new library from "a new library and a logical mapping to it" or "a map to an existing library" to folder that contain 220pack.vhd/220model.vhd file. This is my video: Add 220pack.vhd/220model.vhd to project and compile them: http://www.mediafire.com/?44i1sj5bgnkduty Can not make new library: http://www.mediafire.com/?53zp5xyrpd2zdjk Can not make new library: http://www.mediafire.com/?krc4l1g5u5uyayj Could you check it for me. Thank alot - Altera_Forum
Honored Contributor
All Quartus specific libraries (LPM and device specific) have been installed during initial ModelSim installation (some ModelSimDE6.1 or 6,2 version). Unlike when simulating Verilog, I don't remember missing library issues with VHDL designs. But I don't have ModelSim installed on my computer now and can't check these problems.
An additional remark related to your previously posted waveform. You didn't ever mention a device family. The timing could be explained if either belonging to a very slow logic family, or if the synthesis options in effect would allow to move an output register. - Altera_Forum
Honored Contributor
--- Quote Start --- Last time I used it, all LPM libraries simulated fine in ModelSim. Sorry, I also don't understand about the negative number problems. At least, I wasn't aware of it (since Quartus V2.0). --- Quote End --- Really? LPM library took me a lot of time. I use Modelsim plus 5.7d and Quartus 7.2 Could you help me step by step with it? - Altera_Forum
Honored Contributor
--- Quote Start --- The output is not valid until CNT is 2 anyway, so until then all signals are rubbish. --- Quote End --- Valid result or not, a registered output can't change arbitrarily. Or the design's timing is completely broken. --- Quote Start --- Because Modelsim does not support for LPM library. And when I use multiply command directly, the result's not true with the negative number. --- Quote End --- Last time I used it, all LPM libraries simulated fine in ModelSim. Sorry, I also don't understand about the negative number problems. At least, I wasn't aware of it (since Quartus V2.0). - Altera_Forum
Honored Contributor
--- Quote Start --- You can precompile most libraries in Modelsim. Usually altera_modelsim will have these lpm/altera_mf libraries ready from installation. Otherwise you can precompile as follows: go to modelsim => compile => set library name to lpm => navigate to altera folders that contain 220pack.vhd/220model.vhd. select them and compile. --- Quote End --- Thank Kaz I had done that a lot of time but it still error (Modelsim said, they do not found lpm library). I will make it step by step and send it to you, i hope you check it for me. Thanks again - Altera_Forum
Honored Contributor
--- Quote Start --- The output is not valid until CNT is 2 anyway, so until then all signals are rubbish. --- Quote End --- Thank Tricky. I had check this many times but I still did not know why the output have a lot of value. When I use this utility as a component for my project, the waveforms not nice. When i multiply -400x8, the final value still ok. but there are more than 10 strange value before the final value. (I attached waveform in this message) I don't know how to correct it. - Altera_Forum
Honored Contributor
--- Quote Start --- Dear FvM I want to implement Multiplication command in VHDL. Because Modelsim does not support for LPM library. And when I use multiply command directly, the result's not true with the negative number. In this method, I multiply two positive number, and use sign<=A(15)xor B(15); to check the sign of A and B. If sign=0 => the result's positive. else the result's negative. When I simulate with the waveforms, it appear strange value. I did not understand it. Do you have other idea for this? --- Quote End --- You can precompile most libraries in Modelsim. Usually altera_modelsim will have these lpm/altera_mf libraries ready from installation. Otherwise you can precompile as follows: go to modelsim => compile => set library name to lpm => navigate to altera folders that contain 220pack.vhd/220model.vhd. select them and compile.