ics-jku / wal

WAL enables programmable waveform analysis.
https://wal-lang.org
BSD 3-Clause "New" or "Revised" License
116 stars 18 forks source link

WAL fails to load FST #13

Closed shareefj closed 1 year ago

shareefj commented 1 year ago

I'm trying to load an FST but get the following error:

>-> (load "sim_no_pfb_match.fst" "waves")
'utf-8' codec can't decode byte 0x83 in position 14: invalid start byte
(load "sim_no_pfb_match.fst" "waves")

The FST loads into gtkwave without issue so is there anything I can do to help debug this?

shareefj commented 1 year ago
$ hexdump sim_no_pfb_match.fst | head
0000000 0000 0000 0000 0100 0049 0000 0300 df83
0000010 00b3 0000 0300 26ad 69fc 1457 0a8b 05bf
0000020 0040 0000 0800 0000 0000 0000 0000 3200
0000030 00d3 0000 0000 8601 0009 0000 0000 d700
0000040 00d7 0000 0000 0000 f4a2 7366 5774 6972
0000050 6574 0072 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
*
00000c0 0000 0000 0000 0000 0000 7554 2065 6f4e
00000d0 2076 3932 3120 3a30 3535 303a 2039 3032
LucasKl commented 1 year ago

Hi,

that seems strange. We will look into this.

shareefj commented 1 year ago

The FST was generated by Verilator if you need a testcase.

LucasKl commented 1 year ago

Could you provide a minimal failing example?

shareefj commented 1 year ago

Here you go. Simple counter running for 100 cycles. Fails with 'utf-8' codec can't decode byte 0xc8 in position 24: invalid continuation byte

fst.zip

shareefj commented 1 year ago

Here's the full testcase. You need FuseSoC to run it so pip install fusesoc then:

mkdir tmp
cd tmp
tar zxvf fst.tgz
fusesoc --cores-root . run --target sim idex:test:top --run_options "-t -c 100"

fst.tgz.zip

LucasKl commented 1 year ago

Hi, which version of WAL are you running? FST support is only available since 0.6.3 (which is not yet on PyPi). If you are on 0.6.2 I would recommend updating to the latest Version from GitHub.

shareefj commented 1 year ago

Yes, I'm using PyPi. Any reason a new release hasn't been made yet? Or an ETA?

LucasKl commented 1 year ago

Yes there is a reason. I'm still working on the Documentation for 0.6.3 and don't want to put something on PyPi that diverges from the docs at wal-lang.org.

But I think I will manage to update everything in December.

shareefj commented 1 year ago

OK, I'll test the latest code for now and wait for an official PyPi release. Thanks.

shareefj commented 1 year ago

@LucasKl Given we're still on a Jan '22 release in Apr '23, can you have a think about using some intermediate releases that diverge from the docs? That's what semantic versioning is for. And given the tiny user base, I very much doubt you'd be offending anyone.

LucasKl commented 1 year ago

Hi @shareefj thanks for your Issues, I really appreciate them! I'm sorry for not keeping up with the promised timeline, so much to do :)

Since I fixed this and more Problems (most importantly the compatibility Problem with Python >3.9) I will try to merge only this fixes into WAL and push this to PyPi. I'm really sorry for this delay but I was really consumed by all the not-yet-released features I implemented in the last few months.