Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

ModelSim Altera Starter Edtion 10.0d - set EndTime

The Simulate - Runtime Option, lets me define a default Run time of say 1us. Then upon Simulate - Start simulation, the view changes, goes to Simulate and The Run Length can be checked, it still is 1us. Upon Run -All, the executed time ends at 10ns, coincidental the cycle time of the simulation.

I somehow wasn't able to find the proper way to set the end time.

Rene

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It will stop automatically if there is not more similation to run (eg. your clock has stopped clocking).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Naa. It didn't even start. It stops after 10ns, and I have a cycle time of 10ns.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    could it be stuck in an infinite loop?

    can you post some source code?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm a couple steps further. Indeed the simulation runs until no changes occur. Meaning I have to gate the clock like :

    -- Clock Generator

    process begin

    clock <='0';

    wait until Reset = '1';

    wait for clockcycle;

    while Reset = '1' loop

    clock <= '1';

    wait for clockcycle/2;

    clock <= '0';

    wait for clockcycle/2;

    end loop;

    wait;

    end process;

    The gate process :

    -- Reset

    process begin

    Reset <= '0';

    wait for Clockcycle;

    Reset <= '1';

    wait for EndOfTime;

    Reset <= '0';

    wait;

    end process;

    Otherwise it runs forever. Clearly ignoring my wish with the End Time.

    And even stranger, I have to set the stuff up with a reset = 1 otherwise it also runs forever without a result.

    -- main

    begin

    data <= "00000011";

    latch <= '1';

    cnten <= '1' ;

    Reset <= '1'; -- must be 1 here !!!

    Now, at least I get a simulation going...

    Thanks a lot this far.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you cannot assign reset inside and outside the process. This will cause reset to be 'X'