Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Conversation

@madscientist159
Copy link

@madscientist159 madscientist159 commented Jul 7, 2022

The ecpbram utility expects the ROM data file to be in a fixed width (i.e. zero-padded) format. migen should be able to adhere more strictly to that format without breaking other users of the ROM data file.

See https://bugs.libre-soc.org/show_bug.cgi?id=855#c45 for an example of the old data format failing when used with ecpbram.

Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
@sbourdeauducq
Copy link
Member

Why is it not already doing it? The formatter string is already designed to do this zero padding (see l. 389).
Why the double - in your patch?

@sbourdeauducq
Copy link
Member

sbourdeauducq commented Jul 9, 2022

Maybe you want it to emit one more digit when the memory width is not a multiple of 4?
I suggest changing l.389 to (memory.width + 3)//4 in this case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants