Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Error 10511 - Arctan

Altera_Forum
Honored Contributor II
2,324 Views

Hello, 

 

I have receive the message 

 

 

--- Quote Start ---  

Error (10511): VHDL Qualified Expression error at main.vhd(37): ARCTAN type specified in Qualified Expression must match integer type that is implied for expression by context 

--- Quote End ---  

 

 

I'd like to known what type of integer to give it. 

 

Thank.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,526 Views

Right click on the message and click "Help". What does it tell you? 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,526 Views

When I click "HELP", I receive 

 

 

--- Quote Start ---  

 

Change the type you specify for an expression to be the same as the implied expression type, or change the context in which the expression occurs so the implied expression type is the same as the type you specify. 

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
1,526 Views

You should possibly mention, where the ARCTAN typed definitions comes from. With standard libraries, I'm only aware of the ARCTAN function in IEEE.MATH_REAL, which has a real type argument and result.

0 Kudos
Altera_Forum
Honored Contributor II
1,526 Views

Agree with FvM. arctan returns real results, but reals are non-synthesizable constructs in FPGAs. One way is to recast the result back to a synthesizable type, such as integer. 

variable x:real; q:=integer(arctan(x));
0 Kudos
Reply