> `define IS_SIGNED(x) &(((((x) << $bits(x)) + 1'sb1) << >($bits(x)-1)) >>> $bits(x)) A simpler variation that should work also: `define IS_SIGNED(x) &(((x) | ~1'sb0) >>> $bits(x)) An even simpler version that should work in Verilog too: `define IS_SIGNED(x) (((x) | ~0) < 0) Steven Sharp sharp@cadence.comReceived on Fri Jul 28 11:44:43 2006
This archive was generated by hypermail 2.1.8 : Fri Jul 28 2006 - 11:44:58 PDT