Friday, 2022-12-30

*** tpb <[email protected]> has joined #yosys00:00
*** bl0x_ <bl0x_!~bl0x@p200300d7a7126300f8ec693783760bc7.dip0.t-ipconnect.de> has joined #yosys02:59
*** bl0x <[email protected]> has quit IRC (Ping timeout: 260 seconds)03:01
*** lexano <[email protected]> has quit IRC (Ping timeout: 268 seconds)07:47
*** lexano <[email protected]> has joined #yosys08:00
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:bfc:c58c:a354:7a7f> has quit IRC (Remote host closed the connection)09:14
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:fa54:e67d:fc21:3d3d> has joined #yosys09:14
*** ikskuh <ikskuh!~xq@2a0d:5940:6:163::ad7e> has joined #yosys10:21
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 272 seconds)10:55
*** nak <nak!~nak@yosys/nak> has joined #yosys10:56
ikskuhheya o/11:12
ikskuhdoes anyone know if simulators like iverilog suffer from evaluation order?11:13
corecodecertainly14:31
corecodeyour design shouldn't depend on evaluation order14:31
ikskuhi mean thats true, but i don't really get some problems in my design. sometimes it works in sim, sometimes it doesn't14:50
ikskuhbut works perfectly in synthesis14:50
corecodeyes, synthesis works differently15:03
corecodebut either your design or your testbench suffer from race conditions; fixing them might uncover design errors15:04
ikskuhhttps://bpa.st/L6DJI15:14
tpbTitle: View paste L6DJI (at bpa.st)15:14
ikskuhthis is the design that might be flawed15:15
ikskuhit's a basic RAM implementation15:15
ikskuhmemory bus is that of the picorv3215:15
ikskuhwrites on the memory don't seem to work in iverilog15:16
ikskuhthey used to work, but now they stopped working, which is weird15:16
ikskuhand i didn't change my code15:16
corecodewhat's your testbench16:23
ikskuhthe testbench is basically "let the system run for somethousand clocks and boot the firmware"16:38
ikskuhand the whole soc is simulated 16:38
ikskuhthe race condition can be fixed by copying instances up/down in the verilog source16:38
ikskuhwhich is really weird imho16:38
corecodeno, that means that you are suffering from evaluation order16:42
corecodewhat are the failures?16:43
corecodedo you have a testbench for only your ram module?16:43
ikskuhnot really. i could remove every peripherial16:44
ikskuhi can try reducing the code16:44
ikskuhi should improve my tooling a bit anyways /o\ this is way too much manual work right now ^^16:47
corecodeyou probably should have a test bench for every module you write16:48
ikskuhyeah true16:48
ikskuhbut i guess the testbench would not capture this problem16:48
corecodethen your test bench is not thorough enough16:48
corecodeyour module looks simple enough, so maybe the error is elsewhere16:49
corecodeyou say the writes don't work, how does that manifest?16:50
corecodethey don't change the ram contents?  reads later don't give you the correct contents?16:50
ikskuhhey, they don't change the ram contents16:53
ikskuhso i write something, and when i read it again, it iwll read just xxxxxxxx16:53
corecodedo all reads return x?16:55
ikskuhi'm checking right now16:59
ikskuhyeah seems to17:01
ikskuh*so17:01
corecodeyou really need a test bench for just your component, so that you can observe what is going on17:03
corecodeare you looking at captured signals?17:03
corecodemy guess is that something has the protocol wrong17:04
corecodeone clock cycle off or something like it17:04
ikskuhhttps://gist.github.com/MasterQ32/91aff45f8b7ef920bc388e63789360c917:08
ikskuhi'm looking at the vvp output with gtkwave17:08
ikskuhsome comments to that gist: ashet-soc.v is mainly generated, and all the cs_... signals are automatically generated17:10
ikskuhmain_cpu is the picorv32 cpu copied from the yosys github17:11
ikskuhmain_rom and main_ram are both instances of the memory module that seems to fail17:11
ikskuhas i can successfully execute code without problems, so the reading-part seems to work17:12
ikskuhthe writing part doesn't, tho17:12
ikskuh(fixed the lowres screenshots)17:14
ikskuhcorecode: i found the bug \o/17:22
ikskuhi'm accessing the storage[] array out of bounds17:23
ikskuhthanks for joining me in my rubber duck debugging session :D17:27
*** acathla <[email protected]> has joined #yosys18:54
corecodeikskuh: shouldn't that wrap around?19:24
corecodeikskuh: why did the bus arbiter route it to your memory even?19:28
ikskuhbecause i access 0x8000_000020:00
ikskuhwhich the ram portion is mapped to20:01
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)23:06
*** nonchip <[email protected]> has joined #yosys23:06

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