You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized in the below operation wrong return value Z is generated during the summation of X and Y:
unsigned<64> foo(unsigned<32> X, unsigned<32> Y){
unsigned<64> Z = X + Y;
return Z;
}
I believe this is due to the fact that X and Y are translating to C types (etiss_uint32) and their summation also returns etiss_uint32 which drops the overflow value(32nd bit).
But coredsl2 manual guarantees no dropping is occurring by simply setting the width of the result value to wr = max(w1 + 1, w2 + 1). Should not M2-ISA-R also guarantee this? This is leading to a lot of unexpected behaviors.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
This is indeed an oversight in the implementation of at least the ETISS code generator. CoreDSL type promotion rules are more or less ignored completely in M2-ISA-R as of now, therefore standard C type promotion rules are used in ETISS. I will look into this, but it will probably take a moment to properly fix.
I realized in the below operation wrong return value
Z
is generated during the summation of X and Y:I believe this is due to the fact that
X
andY
are translating to C types (etiss_uint32
) and their summation also returnsetiss_uint32
which drops the overflow value(32nd bit).However when I do casting explicitly as follows:
It works pretty well.
But coredsl2 manual guarantees no dropping is occurring by simply setting the width of the result value to
wr = max(w1 + 1, w2 + 1)
. Should not M2-ISA-R also guarantee this? This is leading to a lot of unexpected behaviors.Thanks a lot!
The text was updated successfully, but these errors were encountered: