# Assertion for Connectivity Check

**URL:** <https://verificationacademy.com/forums/t/assertion-for-connectivity-check/36818>\
**Category:** SystemVerilog\
**Tags:** SVA, SystemVerilog\
**Created:** [November 18, 2019, 5:48am UTC](https://verificationacademy.com/forums/t/assertion-for-connectivity-check/36818 "2019-11-18T05:48:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvuvmsv](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/a4c791/32.png) [@dvuvmsv](https://verificationacademy.com/forums/u/dvuvmsv)\
**Post date:** [November 18, 2019, 5:48am UTC](https://verificationacademy.com/forums/t/assertion-for-connectivity-check/36818/1 "2019-11-18T05:48:36Z")

</div>

Hello,

I have a Mixed Signal DUT. Some of the Registers in Digital Domain  
are connected to some ports of Analog Blocks like PLL, Mixer etc.  
There are many such connections. I wanted to use Assertions to check the  
connectivity of a Register bit connection to Analog Block input.

Can I use Immediate assertion like  
assert (Reg[10] == tb.dut.anblock.mixer.port1) $error(" Connection Error ");

or Concurrent Assertion like below

property con\_check  
Reg[10] → tb.dut.anblock.mixer.port1;  
endproperty

assert property (@posedge clock) con\_check;

Thanks  
JeffD

---

<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:** [November 18, 2019, 6:07am UTC](https://verificationacademy.com/forums/t/assertion-for-connectivity-check/36818/2 "2019-11-18T06:07:39Z")

</div>

_In reply to [dvuvmsv](https://verificationacademy.com/forums/t/assertion-for-connectivity-check/36818):_  
From my SVA book: The immediate assertion statements can be specified anywhere a procedural statement is allowed to be specified; this includes **always, always\_ff, always\_comb, always\_latch, initial, final**. They can also be specified in functions and tasks, in modules, checkers, programs, and classes.42 The simple immediate assertion statement can be one of the following:  
6. assert to specify that the expression holds for the design  
7. assume to specify the expression is an assumption for the environment  
8. cover to monitor the expression evaluation for coverage  
Thus,

```verilog

always_comb 
 a_port1: assert #0 (Reg[10] == tb.dut.anblock.mixer.port1) 
     else $error(" Connection Error ");
// Note that gate delays may cause false errors if the concerns are really at clock edges. 

// Concurrent assertions are better is you are only concerned about values 
// being the same at clocking events. 
 apr_port1: assert property (@ (posedge clk) Reg[10] == tb.dut.anblock.mixer.port1) else $error(" Connection Error ");
// No need to declare the property if you are not using local variables or arguments. 
 

```

Ben Cohen  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)  
For training, consulting, services: contact [Home - My cvcblr](http://cvcblr.com/home)

- [SVA Handbook 4th Edition, 2016 ISBN 978-1518681448](http://goo.gl/JOfuEB)
- 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 978-1539769712](https://goo.gl/d10QHh)
- 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

* * *

1. SVA Alternative for Complex Assertions  
[Verification Horizons - March 2018 Issue | Verification Academy](https://verificationacademy.com/news/verification-horizons-march-2018-issue)
2. [SVA: Package for dynamic and range delays and repeats | Verification Academy](https://verificationacademy.com/forums/systemverilog/sva-package-dynamic-and-range-delays-and-repeats)
3. SVA in a UVM Class-based Environment  
[SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy](https://verificationacademy.com/verification-horizons/february-2013-volume-9-issue-1/SVA-in-a-UVM-Class-based-Environment)
