# SystemVerilog Constraint Help for Negative/Postiive numbers

**URL:** <https://verificationacademy.com/forums/t/systemverilog-constraint-help-for-negative-postiive-numbers/38197>\
**Category:** SystemVerilog\
**Tags:** signed, SystemVerilog, systemverilog-constraint\
**Created:** [October 9, 2020, 1:38am UTC](https://verificationacademy.com/forums/t/systemverilog-constraint-help-for-negative-postiive-numbers/38197 "2020-10-09T01:38:04Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ABD\_91](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/c77e96/32.png) [@ABD\_91](https://verificationacademy.com/forums/u/ABD_91)\
**Post date:** [October 12, 2020, 6:35pm UTC](https://verificationacademy.com/forums/t/systemverilog-constraint-help-for-negative-postiive-numbers/38197/6 "2020-10-12T18:35:42Z")

</div>

_In reply to [kk9110](https://verificationacademy.com/forums/t/systemverilog-constraint-help-for-negative-postiive-numbers/38197/5):_

Besides the ‘signed’ keyword I believe **you have changed the Packed Dimensions too in Original Code !!**

[Previously it was [7:0] for all 3 Variables . ]

Anyways with [15:0] there are Chances of Overflow too .

(1) Also LIMIT is 200 which is 32-bit Signed .  
**(200) in Decimal is (C8) in hexadecimal .**

**Why are you expecting it to be 3H ??**

(2) Try to display all 3 Variables in **“%0d”** Format String

---

_[View the full topic](https://verificationacademy.com/forums/t/systemverilog-constraint-help-for-negative-postiive-numbers/38197)._
