Assertion to check if all bits get set atleast once in simulation for a multibit vector

In reply to ben@SystemVerilog.us:

This works fine for me but problem is eventually property is not yet supported by all tools AFAIK. Is there any way we can achieve the same without using eventually.


generate for (genvar g_i=0; g_i<4; g_i++) 
  initial begin  // opton2
     wait(go);
     ap_fgsbi: assert property( go |-> strong(fgs[g_i][-> 1]) );    
  end
 endgenerate  

Complete model is at http://SystemVerilog.us/bitset.sv
Results at end of sim

** Error: Assertion error.

Time: 930 ns Started: 50 ns Scope: top.ap_flags File: bitset.sv Line: 15

** Error: Assertion error.

Time: 930 ns Started: 50 ns Scope: top.genblk1[3].ap_fgsi File: bitset.sv Line: 21

** Error: Assertion error.

Time: 930 ns Started: 50 ns Scope: top.genblk2[3].ap_fgsbi File: bitset.sv Line: 28


Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us

  • SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
  • A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
  • Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
  • Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
  • Component Design by Example ", 2001 ISBN 0-9705394-0-1
  • VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
  • VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115