Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Moving to [SGN, WIDTH, OFFSET] Representation for FixPt #261

Open
mattfel1 opened this issue Feb 26, 2018 · 1 comment
Open

Moving to [SGN, WIDTH, OFFSET] Representation for FixPt #261

mattfel1 opened this issue Feb 26, 2018 · 1 comment

Comments

@mattfel1
Copy link
Member

mattfel1 commented Feb 26, 2018

I think we should support this kind of representation instead of/in addition to the current representation. I remember this is how MaxJ represented numbers. Right now, there is no way to represent something like an 4 bit number with the decimal placed somewhere outside of these 4 bits. For example, someone may want to do something like:

binary - . - - - - 1 0 0 0  =  dec 0.03125

It would be nice to represent this as FixPtOfs[TRUE, 4, -8]

I can make this change but it seems like it may become kind of involved so it would be nice to know what people think of this before I spend the time messing with this.

@dkoeplin
Copy link
Collaborator

Hm yeah this is a good point, this seems like a superset of the currently supported fixed point types.

We assume the Q format right now for FixPt. If there's enough need/demand for this new type I can make the required changes for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants