- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the division operator require any special library package ?
I am getting this error --- --- Quote Start --- Error (10327): VHDL error at computation2.vhd(90): can't determine definition of operator ""/"" -- found 0 possible definitions --- Quote End ---Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Division should be implemented through lpm_divide Megafunction, when necessary. Quartus has a feature, to infer dividers from HDL code under certain conditions, but it is effectively undocumented in present Quartus Handbook.
Apparently, dividers are inferred from "/" operator for integer type only. You have to use integer range settings of the implied variables to control the divider's operand size.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Extracts from Quartus help: --- Quote Start --- In VHDL, supported arithmetic operators consist of the prefix and binary plus (+) and minus (-) symbols, as well as the operators for multiplication (*) and division (/). See "Section 7.2.3: Adding Operators" and "Section 7.2.4: Multiplying Operators" in the IEEE Std 1076-1993 IEEE Standard VHDL Language Reference Manual for more information. --- Quote End --- --- Quote Start --- In VHDL, multiplying operators perform arithmetic multiplication and division operations on groups and numbers. Supported multiplying operators consist of multiplication (*) and division (/) operators, which are predefined for any integer type. See "Section 7.2.6: Multiplying Operators" in the IEEE Std 1076-1993 IEEE Standard VHDL Language Reference Manual for more information. --- Quote End --- --- Quote Start --- Altera recommends that you use the altfp_div megafunction instead of any other type of floating-point divider function. The altfp_div megafunction supports the following floating-point formats: single precision, double precision, single extended precision. The altfp_div megafunction is available for supported device (Apex II, Apex 20K, Arria GX, Cyclone, Cyclone II, Cyclone III, HardCopy II, HardCopy Stratix, Max II, Stratix, Stratix GX, Stratix II, Stratix II GX, and Stratix III) families. --- Quote End --- Hope this helps- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What are the types of your operands? VHDL only predefines "/" for integer and floating point types. I suggest using IEEE.NUMERIC_STD, which defines "/" for both UNSIGNED and SIGNED types.
Quartus II will infer the LPM_DIVIDE megafunction for "/" though you can control the implementation more finely if you instantiate it yourself.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page