Is it possible to sample a signal on the same edge on which it was driven in sv?

In reply to hisingh:
I show the SystemVerilog time slot regions graphically at
https://verificationacademy.com/forums/systemverilog/sampling-point-assertions

by sample the signal on same time stamp on which it was driven you mean you want the signal just before it changed, then you can do something like


always_comb @sig sig_before=$sampled(sig); 
// Function $sampled returns the sampled value of the expression for that timestep.

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr

** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448

  1. SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
  2. Free books: Component Design by Example FREE BOOK: Component Design by Example … A Step-by-Step Process Using VHDL with UART as Vehicle | Verification Academy
    Real Chip Design and Verification Using Verilog and VHDL($3) Amazon.com
  3. Papers: