# Why assertion failure at 15ns

**URL:** <https://verificationacademy.com/forums/t/why-assertion-failure-at-15ns/47318>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, assertion\
**Created:** [May 14, 2024, 1:11pm UTC](https://verificationacademy.com/forums/t/why-assertion-failure-at-15ns/47318 "2024-05-14T13:11:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amir\_sharfu](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/amir_sharfu/32/1605_2.png) [@amir\_sharfu](https://verificationacademy.com/forums/u/amir_sharfu)\
**Post date:** [May 14, 2024, 1:11pm UTC](https://verificationacademy.com/forums/t/why-assertion-failure-at-15ns/47318/1 "2024-05-14T13:11:17Z")

</div>

Failing at initial stage means @5ns , because unable to execute $past condition.  
but it must be pass at @15ns -

> **[EDA Playground](https://www.edaplayground.com/x/KPGe)**
>
> Edit, save, simulate, synthesize SystemVerilog, Verilog, VHDL and other HDLs from your web browser.

---

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/4533_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [May 14, 2024, 8:24pm UTC](https://verificationacademy.com/forums/t/why-assertion-failure-at-15ns/47318/2 "2024-05-14T20:24:00Z")

</div>

1800: $past returns the sampled value of expression1 in a particular time step strictly prior to the one in which $past is evaluated (see 16.5.1 for the definition of sampling in past clock ticks). If number\_of\_ticks equals k and if ev is the event expression underlying clocking\_event, then the particular time step is the kth strictly prior time step in which the event ev iff expression2 occurred. **If there do not exist k strictly prior time steps in which the event ev iff expression2 occurred, then the value returned from the $past function is the default sampled value of expression1 (see 16.5.1).**  
Thus, for

```auto
// THough a==1, b==1 at initialization, their default values is 1'b0
b |-> ($past(a,2) == 1 )
// at t15, ($past(a,2) == 0) because the default values of b is 0

```

Ben Cohen  
[Ben@systemverilog.us](mailto:Ben@systemverilog.us)  
Link to the list of papers and books that I wrote, many are now donated.

> **[Cohen\_Links\_to\_papers\_books.pdf](https://systemverilog.us/vf/Cohen_Links_to_papers_books.pdf)**
>
> 102.86 KB
