# I have a share module(used inside many other modules) with parameterizable input/output bus width. How do I write SVA so that I don't have to bind individual instance?

**URL:** <https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, system-verilog-assertion-SVA\
**Created:** [March 18, 2014, 12:29am UTC](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260 "2014-03-18T00:29:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![okc1771](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/o/c6cbf5/32.png) [@okc1771](https://verificationacademy.com/forums/u/okc1771)\
**Post date:** [March 18, 2014, 12:29am UTC](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260/1 "2014-03-18T00:29:18Z")

</div>

module sync\_dff#(parameter [31:0] SIZE = 32’d1) (clk,rstn,in,out);  
input clk,rstn;  
input [SIZE-1:0] in,out;  
…  
…  
endmodule

This module is being used in many locations. Some with SIZE = 1, some with SIZE = 2, and some with SIZE = 8…etc. Is it possible to create a generic property for this module with different SIZE definition? If possible, what is the easiest way to bind without binding instance individual according to the SIZE?

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [March 18, 2014, 4:22pm UTC](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260/2 "2014-03-18T16:22:46Z")

</div>

There is no way to bind to a specific parametrization of a target module other by instance name. However, you may want to look at the SystemVerilog **checker** construct. A checker does not require explicit type in its port list. Make sure your simulator version supports it before going any further. Questa 10.3 does.

---

<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:** [March 18, 2014, 4:47pm UTC](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260/3 "2014-03-18T16:47:36Z")

</div>

properties and sequences can have formal arguments that can be untyped. You can’t use the bind because the binding module would have parameters that would need to be sized in the binding. However, you can use the `include of a file where the properties use untyped formal arguments. BTW, with the `include, you don’t need to have the properties with arguments, Below is an example.

```auto
// file props.sv
  property p_go2(datain,
  		 dataout);
  	go |=> datain==dataout+1'b1; 
  endproperty; 
  ap_go_with_include: assert property(@(posedge clk) p_go2(data_in, data_out));  

//file sync_ff
module sync_dff#(parameter [31:0] SIZE = 32'd1) 
	(input bit clk,rstn, go, 
	  input logic[SIZE-1:0] data_in,
	  output logic[SIZE-1:0] data_out);
	
  `include "props.sv"
  // property with typed formal arguments
  property p_go(logic[SIZE-1:0] datain,
  		logic[SIZE-1:0] dataout);
  	go |=> datain==dataout+1'b1; 
  endproperty; 
  ap_go: assert property(@(posedge clk) p_go(data_in, data_out)); 
// ...
endmodule

// This module is being used in many locations. 
// Some with SIZE = 1, some with SIZE = 2, and some with SIZE = 8...etc. 
// Is it possible to create a generic property for this module with different SIZE definition?
// If possible, what is the easiest way to bind without binding instance individual according to the SIZE?

```

* * *

Ben Cohen Training for VMM, SVA (831) 345-1759  
[http://www.systemverilog.us/](http://www.systemverilog.us/) [ben@systemverilog.us](mailto:ben@systemverilog.us)

- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- SystemVerilog Assertions Handbook, 2005 ISBN 0-9705394-7-9
- 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

* * *

---

<div class="post-metadata">

**Author:** ![okc1771](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/o/c6cbf5/32.png) [@okc1771](https://verificationacademy.com/forums/u/okc1771)\
**Post date:** [March 19, 2014, 9:07pm UTC](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260/4 "2014-03-19T21:07:31Z")

</div>

_In reply to [wilson\_on](https://verificationacademy.com/forums/t/i-have-a-share-module-used-inside-many-other-modules-with-parameterizable-input-output-bus-width-how-do-i-write-sva-so-that-i-dont-have-to-bind-individual-instance/29260/3):_

Thanks. I guess whenever module has parameterable input/output, I have to add the property inside the module instead of using binding.
