Changeset 141 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Aug 2, 2010, 8:56:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Operation.h
r88 r141 12 12 namespace behavioural { 13 13 14 #define neg(size,data) (~(data)+1) 15 #define sign(size,data) ((data)>>(size-1)) 16 #define unsigned(size,data) (data) 17 #define signed(size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 #define ovf(size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 19 #define carry(size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 20 #define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 21 #define get_flag(data,flag) (((data)&(flag))!=0) 22 #define concatenation_bool(a,b) (((a)<<1) | (b)) 14 # define neg( size,data) (~(data)+1) 15 # define sign( size,data) ((data)>>(size-1)) 16 # define unsigned(size,data) (data) 17 # define signed( size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 //#define ovf( size,op1, op2, c_in) ((op2^(op1+op2+c_in))&~(op1^op2))>>(size-1); 19 # define ovf( size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 20 # define carry( size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 21 # define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 22 # define get_flag(data,flag) (((data)&(flag))!=0) 23 # define concatenation_bool(a,b) (((a)<<1) | (b)) 23 24 24 25 }; // end namespace behavioural
Note: See TracChangeset
for help on using the changeset viewer.