Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateware/ice40: add mux stage and direct register drive to LED block #167

Closed

Conversation

TomKeddie
Copy link
Contributor

As requested in im-tomu/foboot#20

@TomKeddie
Copy link
Contributor Author

TomKeddie commented Jul 10, 2019

mithro: please help me with style (especially CAPS where not appropriate) and the issue mentioned on irc.

any suggestions on how to get migen to emit binary? Am seeing "ERROR: expected configuration string starting with '0b' for parameter 'RGB0_CURRENT' on cell 'SB_RGBA_DRV'" because my binary was evaluate to a decimal constant (.RGB0_CURRENT(2'd3).

Thanks.

@TomKeddie
Copy link
Contributor Author

Note that this is not register compatible with foboot impl, I opted for a separate mux register to make the bits align. I'm planning an emulation of this block for other platforms and want it to be for n leds so the mismatching bits don't work too well.

@mithro
Copy link
Member

mithro commented Jul 10, 2019

I think you need an str in there somewhere. Poke me tomorrow when I'm not in a bar. :-)

@mithro
Copy link
Member

mithro commented Jul 10, 2019

@TomKeddie It seems like the str fixed the issue?

@TomKeddie
Copy link
Contributor Author

mithro: yes, thanks. I feel like I need to test this code more but am looking for a nod that this is what you intended and is moving in the right direction. Thanks.

@TomKeddie
Copy link
Contributor Author

mithro: when you have a moment please give this a once over, thanks.

Copy link
Member

@mithro mithro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but can't /actually/ tell without also have this for the other boards?

)

self.comb += [If(self.mux.storage[0], led_drv[led_defs["R"]["SIGNAL_INDEX"]].eq(self.raw.storage[0])).Else(led_drv[led_defs["R"]["SIGNAL_INDEX"]].eq(pwm_src[0])),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline here.

@mithro
Copy link
Member

mithro commented Jul 25, 2019

Can you rebase this on master?

@TomKeddie TomKeddie closed this Jul 26, 2019
@TomKeddie
Copy link
Contributor Author

replaced by #180

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

Successfully merging this pull request may close these issues.

3 participants