Monday, 2022-03-07

openpowerbot[mattermost] <lkcl> just looking at this15:03
openpowerbot[mattermost] <lkcl> https://github.com/antonblanchard/microwatt/blob/f01f3d233ae4de595fa29beb305d00ce960f041e/soc.vhdl#L54215:03
openpowerbot[mattermost] <lkcl> and comparing it to page 51 of the Wishbone B4 specification15:03
openpowerbot[mattermost] <lkcl> it looks like stall should *not* be dropped if STB is HI15:04
openpowerbot[mattermost] <lkcl> same on p5515:05
openpowerbot[mattermost] <lkcl> although, irritatingly, on p50 the text says "stall by slave indicates master should repeat (hold) request"15:09
openpowerbot[mattermost] <lkcl> on p54 it contradicts that by saying "stall by slave indicates master should drop STB" when the accompanying diagram on p55 clearly doesn't do that15:09
openpowerbot[mattermost] <lkcl> given that i'm running into difficulties with stb being dropped early, i suspect this is the cause of the issue15:20
openpowerbot[mattermost] <lkcl> ah.19:02
openpowerbot[mattermost] <lkcl> it's actually deeper non-compliance with the WB4 pipeline spec than just soc.vhdl19:03
openpowerbot[mattermost] <lkcl> this diagram illustrates:19:03
openpowerbot[mattermost] <lkcl> https://ftp.libre-soc.org/2022-03-07_18-57.png19:03
openpowerbot[mattermost] <lkcl> the cut-in diagram on the right is from p51 of the WB4 spec19:04
openpowerbot[mattermost] <lkcl> https://cdn.opencores.org/downloads/wbspec_b4.pdf19:04
openpowerbot[mattermost] <lkcl> on the left shows both i-cache *and* the 64-to-32 downconverter in soc.vhdl dropping stb one clock cycle too early.19:05
openpowerbot[mattermost] <lkcl> s/i-cache/d-cache19:05
openpowerbot[mattermost] <lkcl> i need to check that this is not a bug in dcache.vhdl, because i'm currently using dcache.py...19:57
openpowerbot[mattermost] <lkcl> it's a bug in microwatt.19:58
openpowerbot[mattermost] <lkcl> https://github.com/antonblanchard/microwatt/blob/f01f3d233ae4de595fa29beb305d00ce960f041e/dcache.vhdl#L155319:58
openpowerbot[mattermost] <lkcl> although stbs_done should be set, setting r1.wb.stb = 0 should not be19:59
openpowerbot[mattermost] <lkcl> not until cyc is also cleared, a few lines later19:59
openpowerbot[mattermost] <lkcl> which is covered by the ack.19:59
openpowerbot[mattermost] <lkcl> line 1569, also non-WB4-pipeline-compliant, "clear stb when slave accepted request"20:03
openpowerbot[mattermost] <lkcl> if someone could kindly raise a bugreport in the appropriate location, referencing this link, that would be most helpful for everyone that is currently using microwatt20:16
openpowerbot[mattermost] <lkcl> https://libre-soc.org/irclog-microwatt/%23microwatt.2022-03-07.log.html20:16
* openpowerbot [mattermost] <lkcl> ponders20:17
openpowerbot[mattermost] <lkcl> i think i might know why nobody has noticed this before.20:17
openpowerbot[mattermost] <lkcl> soc.vhdl is self-consistent, and has the WB4-to-3 "trick" of setting stall = cyc & ~ack20:18
openpowerbot[mattermost] <lkcl> likewise, in litex, the wrapper joining microwatt deploys the same trick.20:19
openpowerbot[mattermost] <lkcl> that "trick" has the *accidental* side-effect of keeping the non-WB4-pipeline-compliance "at bay"20:19
openpowerbot[mattermost] <lkcl> because by "stall" being set HI (because "ack" has not yet been set), stb is correspondingly always never lowered [when it should not]20:19
openpowerbot[mattermost] <lkcl> however20:20
openpowerbot[mattermost] <lkcl> because i am using nmigen-soc, in a mode that *does* handle stall (i.e. is properly WB4-pipeline-mode compliant) it's why i've been running into difficulties for the past 5 weeks20:21

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!