about 1 year ago

## GSoC #4: Point Alignment of Fixed-Point Type

In the previous post, I thought the point alignment of fixbv should be implemented in a short time. Soon I found myself wrong.

After fixing a compatibility bug in the unit test test_fixbv.py, the problem of point alignment has been revealed.

If point alignment only solved in _fixbv.py, in the case of a variable of Signal plus or minus a variable of fixbv, MyHDL simulator will throw a problem. So I have to implement both in Signal.__add__ and fixbv.__add__. Also, I have to consider if they plus or minus intbv.

So, it causes a problem of cross import. I posted this StackOverflow question and you may see the implementation.

Temporarily, my solution is (in fixbv.__add__):

This implementation only considered fixbv and Signal. However, if I consider intbv, things might be more complex.

It leaves a question I am going to solve now.