cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Advisor
Advisor
293 Views
Registered: ‎10-10-2014

math_real integer to real conversion 2017.2 vs 2018.2

Jump to solution

In 2017.2 I could write :

    procedure generate_sinewave
    (
        signal   wave_out           : out std_logic_vector;
        constant kFREQ_HZ           : in real;      -- must be > 0.0
        constant kGAIN              : in real;      -- gain 0.0 ... 1.0, with 1.0 = full-scale                
    ) is

        constant upper_limit    : integer := 2**(wave_out'length) / 2;  -- min value that can be held in signed vecotr
        constant lower_limit    : integer := (-1 * upper_limit)  + 1; -- max value 
        constant amplitude      : real := kGAIN * (upper_limit - 1);    -- multiply with gain         
        constant two_pi_freq    : real := 2 * MATH_PI * kFREQ_HZ;  -- constant factor in sine calculation

in 2018.2, when opening the same file, I get an error on the constant 'amplited' and 'two_pi_freq' calculation:

Error: found '0' definitions of operator "*", cannot determine exact overloaded matching definition for "*"

did something change from 2017.2 -> 2018.2?

I could fix this by writing :

onstant amplitude      : real := kGAIN * (real(upper_limit - 1));

-> I kinda fixed this myself, but I want to double-check:  looks like an explicit conversion has become required in 2018.2 vs 2017.2? Is this correct?

-> where can I find a change log of such things? 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
284 Views
Registered: ‎08-01-2012

Re: math_real integer to real conversion 2017.2 vs 2018.2

Jump to solution

Its actually 2017.2 that was broken. Exclicit conversion should have been required but obviously wasnt.

View solution in original post

1 Reply
Highlighted
Scholar
Scholar
285 Views
Registered: ‎08-01-2012

Re: math_real integer to real conversion 2017.2 vs 2018.2

Jump to solution

Its actually 2017.2 that was broken. Exclicit conversion should have been required but obviously wasnt.

View solution in original post