cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
724 Views
Registered: ‎07-07-2017

XSIM wait statement timeout issue

The timeout clause in a wait statement seems not work, in case the HDL entity is instantiated more than once.

 

Next code works as expected in ModelSim.

However, in XSIM (2016.4) a timeout does not occur as long as pwm events occur in other instances.

 

    p_pwm : process
        variable previous_pwm_event : time := 0 ns;
        variable v_pwm_low_period   : time;
        variable v_pwm_high_period  : time;
    begin
        pwm_event : wait until pwm'event for 0.4 ms;
        if (pwm'event) then
            if (pwm = '1') then
                v_pwm_low_period := now - previous_pwm_event;
            else
                v_pwm_high_period := now - previous_pwm_event;
            end if;
            pwm_dutycycle_i    <= real(v_pwm_high_period / 1 ns) / real((v_pwm_low_period + v_pwm_high_period) / 1 ns);
            pwm_freq_i         <= real(1 sec /(v_pwm_low_period + v_pwm_high_period));
        else
            pwm_dutycycle_i <= 0.0;
            pwm_freq_i      <= 0.0;
        end if;
        previous_pwm_event := now;
    end process p_pwm;

0 Kudos
1 Reply
Highlighted
Moderator
Moderator
652 Views
Registered: ‎06-24-2015

Re: XSIM wait statement timeout issue

@ronaldg

 

Can you give it a try with XSIM in Vivado 2017.3?

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).
0 Kudos