# GSoC fixbv #3: Current Progress and Plans for Implementing fixbv

**URL:** https://discourse.myhdl.org/t/gsoc-fixbv-3-current-progress-and-plans-for-implementing-fixbv/203
**Category:** Synopsis
**Created:** [June 27, 2017, 5:17am UTC](https://discourse.myhdl.org/t/gsoc-fixbv-3-current-progress-and-plans-for-implementing-fixbv/203 "2017-06-27T05:17:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![qrqiuren](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/qrqiuren/32/58_2.png) [@qrqiuren](https://discourse.myhdl.org/u/qrqiuren)
#### Post date: [June 27, 2017, 5:17am UTC](https://discourse.myhdl.org/t/gsoc-fixbv-3-current-progress-and-plans-for-implementing-fixbv/203/1 "2017-06-27T05:17:27Z")

</div>

Original link to my blog: [http://qren.logdown.com/posts/2017/06/27/1924551](http://qren.logdown.com/posts/2017/06/27/1924551)

Blog begins:

* * *

Hello, people.

I should say “Long time no see” since I have not written blogs since about 2 or 3 weeks ago. Sorry for that.

The first evaluation is coming soon. I hope my blog would make it.

# Related Source Code

I have opened [MEP-111](https://github.com/qrqiuren/myhdl/tree/mep-111) branch on GitHub for this project. I also opened a [PR](https://github.com/myhdl/myhdl/pull/228) to the [GSoC](https://github.com/myhdl/myhdl/tree/gsoc) branch in the upstream.

All the progress of this project can be checked in these problems.

# Problems

The front end of `fixbv` (the part for MyHDL simulation usage) has been roughly implemented by [cfelton](https://github.com/cfelton/myhdl/tree/mep111_fixbv). Although it has some issues, I may adopt it as a good start.

There are some issues in cfelton’s implementation:

1. At his time of implementation, MyHDL supports only Python 2.x. So the compatibility between 2.x and 3.x has not been considered.
2. Compiler backend has not been implemented.
3. In `fixbv. __init__ `, `round_mode` and `overflow_mode` were not implemented.
4. Point alignment has not been implemented.
5. Many places marked as `@todo`. Most of them are small problems.

I planned to solve the above issues except 2 before the beginning of July.

# Progress

## Python 3.x Compatibility

Solved.

## Compiler Backend

Conversion is the core issue of this project. Before advancing into this phase, I must solve other issues first.

I am planning to do it in July and August.

## Round Mode and Overflow Mode

To be decided.

Should it also be considered while implementing compiler backend?

## Point Alignment

Almost finished.

## Other Small Problems

Ongoing.

# Future Plans

In July, I will implement the compiler backend of `fixbv`.

In the first 2 weeks of July, I will write conversion tests for `fixbv`. After that, I will implement the backend of `fixbv` and write documents for it.

In mid August, this project should be finished.

---

<div class="post-metadata">

### Author: ![cfelton](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/cfelton/32/3_2.png) [@cfelton](https://discourse.myhdl.org/u/cfelton)
#### Post date: [June 27, 2017, 11:13am UTC](https://discourse.myhdl.org/t/gsoc-fixbv-3-current-progress-and-plans-for-implementing-fixbv/203/2 "2017-06-27T11:13:49Z")

</div>

Yes, the `round_mode` and `overflow_mode` need to be considered in the `fixbv` operations and implemented in the converter. The round and overflow are handled with a new values is assigned, this would be in the ` __setitem__ ` but should be implemented in separate functions.

The automatic handling of the rounding, overflow, alignment, etc. were not part of the original plan (original plan years ago but always part of the gsoc plan). They need to be added to the `fixbv` for modeling and conversion.
