# PHV error on if condition

**URL:** <https://forum.p4.org/t/phv-error-on-if-condition/397>\
**Category:** Getting Started with P4\
**Created:** [July 2, 2022, 3:39pm UTC](https://forum.p4.org/t/phv-error-on-if-condition/397 "2022-07-02T15:39:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Big\_Blue\_Tuna\_Fish](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@Big\_Blue\_Tuna\_Fish](https://forum.p4.org/u/Big_Blue_Tuna_Fish)\
**Post date:** [July 2, 2022, 3:39pm UTC](https://forum.p4.org/t/phv-error-on-if-condition/397/1 "2022-07-02T15:39:21Z")

</div>

Hello,

I am having following error while compiling .p4 program on Tofino model:

error: : condition too complex, limit of 4 bytes + 12 bits of PHV input exceeded  
if (a - b)\>0){  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
I have no clue of what’s causing this error, can anyone give some advice please?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![andyfingerhut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/andyfingerhut/32/17_2.png) [@andyfingerhut](https://forum.p4.org/u/andyfingerhut)\
**Post date:** [July 3, 2022, 6:17pm UTC](https://forum.p4.org/t/phv-error-on-if-condition/397/2 "2022-07-03T18:17:10Z")

</div>

For questions about Tofino and its P4 compiler and run time, if you are an academic member you should ask via a forum at the Intel Connectivity Research Program [Advance Networking in the Intel® Connectivity Research Program](https://intel.com/icrp)

If you are a commercial Tofino user, you should ask via the support channels provided to you as a commercial user.

---

<div class="post-metadata">

**Author:** ![Faris](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/faris/32/134_2.png) [@Faris](https://forum.p4.org/u/Faris)\
**Post date:** [July 4, 2022, 3:09pm UTC](https://forum.p4.org/t/phv-error-on-if-condition/397/3 "2022-07-04T15:09:28Z")

</div>

it seems there is an error in your syntax, you are missing a parenthesis  
maybe it should be:  
if ( (a - b) \> 0 ) {  
…  
}
