Repeat count for wait

Proposal Editing Information

  • Who Updates: JimLewis, <Add YourName >, ...
  • Date Proposed: 2012-08-19
  • Date Last Updated: 2012-08-19
  • Priority:
  • Complexity:
  • Focus: Testbench

Requirement Summary

Add a repeat count to wait

Related and/or Competing Issues: none

Use Model

If PSL notation would work, it would be better to use that

wait until clk='1' repeat 20 ; 

Proposal

Questions

General Comments

This is easily implemented as a procedure (I have tick(clk,20) in my own library)

I wonder if we should keep our language changes to things which are unachievable or cause much more unpleasantness than this?

-- MartinThompson - 2012-09-14

Point taken Martin and I have similar procedures for enhancing 'wait' statements. However, I am very much in favour of enhancments such as this that can reduce code in a verification environment and can enhance/speed-up comprehension for maintainability issues.

In fact I would like to add an extra: I am often wrapping 'wait' statements inside 'if' statements to check for the condition before waiting for it. I would add an either/or to the 'repeat' addition giving a new format as shown:

wait_statement ::=

[ label : ] wait [ sensitivity_clause ] [ condition_clause ] [ timeout_clause ] ;

sensitivity_clause ::= on sensitivity_list

sensitivity_list ::= signal_name { , signal_name }

condition_clause ::= until condition [ repeat positive_expression | check ]

condition ::= boolean_expression

timeout_clause ::= for time_expression

-- Brent Hayhoe - 2012-10-08

I've just noticed that I'm not the first to want the 'check' functionality, it was put forward here:

http://www.eda.org/isac/IRs-VHDL-2002/IR2108.txt

-- Brent Hayhoe - 2012-10-11

Almost every project seems to have a waitclk() procedure somewhere. I think it's a good idea to provide a standard way to do that.

-- GuyEschemann - 2013-01-16

<Brent Hayhoe> 2014-03-20 - The repeat function will also give a neat method for waiting multiple delta cycles:

wait for 0 ns repeat 20 ; 

</Brent Hayhoe>

Supporters

-- Brent Hayhoe - 2012-10-08

-- MortenZilmer - 2015-01-21

-- PatrickLehmann - 2016-02-19

Add your signature here to indicate your support for the proposal

Topic revision: r10 - 2020-02-17 - 15:35:02 - JimLewis
 
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback