Forum Discussion

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

Getting the simulation time in a testbench

Hi there,

does anyone know how to get the simulation time in a VHDL testbench?

Is there a better method than just adding how much time was "wait"ed?

Thanks for any reply,

Kjellski

2 Replies

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

    In VHDL

    define a variable

    variable whatsTheTime : time;

    use the now function

    whatsTheTime := now;

    That will give you the elasped simulation time.

    Hope this helps
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you very much,

    that´s what I was looking

    for.

    Greetings,

    Kjellski