whitequark changed the topic of #yosys to: Yosys Open SYnthesis Suite: https://github.com/YosysHQ/yosys/ | Channel logs: https://libera.irclog.whitequark.org/yosys/ | Bridged to #yosys:matrix.org
tpb has quit [Remote host closed the connection]
lambda has quit [*.net *.split]
kristianpaul has quit [*.net *.split]
notgull has quit [*.net *.split]
srk has quit [*.net *.split]
anticw has quit [*.net *.split]
trabucayre has quit [*.net *.split]
pbsds has quit [*.net *.split]
bluesceada has quit [*.net *.split]
trabucayre has joined #yosys
tpb has joined #yosys
lambda has joined #yosys
kristianpaul has joined #yosys
notgull has joined #yosys
srk has joined #yosys
bluesceada has joined #yosys
anticw has joined #yosys
schaeg_ has joined #yosys
schaeg has quit [Ping timeout: 258 seconds]
Micah71 has joined #yosys
Micah71 has quit [Client Quit]
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #yosys
pbsds has joined #yosys
notgull has quit [Ping timeout: 240 seconds]
notgull has joined #yosys
citypw has joined #yosys
<mewt> Hi, a log2-ceil function I've been using for years now causes yosys to bail if I try to set a localparam with it
<mewt> e.g. localparam MY_PARAM = clog2(OTHERPARAM);
<mewt> The error I get is "Non-constant function call in constant expression."
<mewt> the design simulates just fine and Icarus and Verilator are OK with it. is there something I'm missing here?
<mewt> Ah I see, this is specifically for the case where OTHERPARAM is a product of two other localparams...
<mewt> Should this work?
<mewt> Version information is Yosys 0.32+76 (git sha1 73cb4977b, clang 15.0.7 -fPIC -Os)
<lofty> mewt: do you mean the built-in $clog2?
<mewt> i, er, didn't know there was a built-in... this is the thing I'm using atm https://0x0.st/HtXt.vh
<mewt> seems to happen with the built-in too
<mewt> I shoiuld definitely be using that though, sorry about that
<mewt> minimal failing example would be like... ' localparam PARAM1 = 2; localparam PARAM2 = 4; localparam PROD = PARAM1*PARAM2; localparam CL2_PROD = $clog2(PROD); '
<mewt> or similar
<lofty> Alas, I might have to get out of bed for this
<lofty> mewt: https://gist.github.com/Ravenslofty/8d80cd89b595622b9683ab7574d12781 <--- this runs fine, so you're going to have to provide a better test case
<mewt> strange, one sec
<mewt> alright, I'll have to come back to this tomorrow -- the pattern is exactly the same in the failing file but I guess I should have tested it. I'll get a minimal test case I actually run through yosys at that point
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #yosys
bjorkintosh has quit [Changing host]
bjorkintosh has joined #yosys
nelgau has quit [Read error: Connection reset by peer]
bjorkintosh has quit [Ping timeout: 248 seconds]
schaeg has joined #yosys
schaeg_ has quit [Ping timeout: 258 seconds]
bjorkintosh has joined #yosys
bjorkintosh has quit [Changing host]
bjorkintosh has joined #yosys
cr1901_ has quit [Quit: Leaving]
cr1901 has joined #yosys
jkm has joined #yosys
nelgau has joined #yosys
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #yosys
bjorkintosh has joined #yosys
citypw has quit [Ping timeout: 256 seconds]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #yosys
somlo_ has quit [Remote host closed the connection]
peeps[zen] has quit [Quit: Connection reset by peep]
peeps[zen] has joined #yosys
lexano has joined #yosys
peeps[zen] has quit [Ping timeout: 248 seconds]
peeps[zen] has joined #yosys
somlo has joined #yosys
hrberg has quit [Ping timeout: 255 seconds]
hrberg has joined #yosys
<mewt> ok here's an actual tested-failing example... https://0x0.st/Htqc.v
<mewt> this doesn't seem materially different to me at all, so I've no idea...
<lofty> mewt: that's odd, but as a temporary hack, if you make the localparams just parameters, it seems to compile
<mewt> temporary hack is good for now, thank you
<mewt> wait, does it? It sure doesn't here
<mewt> I guess I'm doing something else wrong
<mewt> in case I've been braindead in the yosys invocation, 'yosys -p "synth_ice40 -json testcase.json -top bram_inst" bram_inst.v'
<mewt> I also rebuilt last night, so I'm on "Yosys 0.34+60 (git sha1 6f1ca6871, clang 16.0.6 -fPIC -Os)"
schaeg has quit [Ping timeout: 248 seconds]
jkm has quit [Ping timeout: 248 seconds]
nonchip has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nonchip has joined #yosys