Skip to content

Support division of negative numbers? #478

@pepijndevos

Description

@pepijndevos

It appears that Yosys now supports $divfloor as of YosysHQ/yosys@edd8ff2

In ast.py it is mentioned that the different semantics mean it's not supported:
https://github.com/nmigen/nmigen/blob/e46118dac0df315694b0fc6b9367d285a8fc12dd/nmigen/hdl/ast.py#L173-L179

I'm not sure what division synthesizes to in Yosys in general, or if it supports the general case at all, but it seems that on the nMigen side we can now emit $divfloor and fully support division with correct semantics. I'd be happy to put together a PR for this at some point.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions