Is it int16_t not int31_t??
# generative-ai
t
Is it int16_t not int31_t??
a
Quick question to check basics: Which Caravel tag are you currently using?
t
git log gives me this, the HEAD is detached commit 414f7bce817a22d0bdef07cf2f37ef5f87d8ae6f (grafted, HEAD, tag: mpw-9c, tag: caravel_v6_0) Author: Jeff DiCorpo <42048757+jeffdi@users.noreply.github.com> Date: Wed Apr 26 120438 2023 -0700 update to tag mpw-9c
Ah, ChatGPT just told me, that I'm not using the cycle signal...
Lets seee
Nope, still not working
Uhmm.. Yeah, that's what I get from the Wishbone bus, which isn't what I write into the address from my C program
message has been deleted
🤔
Hmm, I think I've messed up the timing and the WB protocol 🤔
a
That's the right Caravel. As soon as I get a feew mins I'll take a look at your waveform.
The timing on the trailing edge of ACK and STB looks wierd. I thought they were expected to be seperated by a clock cycle for WB protocol. @jeffdi
t
Hmm, I did mess up, ChatGPT now fixed it for me
Works now
Hmm... now, the last value still seems to be messed up a bit... I'll keep debugging
The logic so far works however, all I gotta do before I can submit now is to get the wishbone interface to work with caravel
It's a bug with the caravel, because according to the wishbone bus specs, when the select changes, the cycle comes and so, the signal is supposed to be stable... not xxxx
I'm disabling the SPI and GPIOs for now, maybe that causes trouble
OMG... it's the GPIOs
a
Is there a signal coming from outside the design to the wishbone interface?
t
Hmm... No. I was thinking because maybe the controller messes with the addresses... the problem persists BTW. When the data should be ready to be loaded, the data line still is xxxx
which is anyway strange... shouldn't it be like either 0 or data?
The 2nd last value is at least defined, although wrong. It should be -2
a
If you are seeing undefined values in the logic there is a timing or logical conflict in driving the value. I'd display the buss and check if it is all data bits are X. If yes, go upstream by one register and add that to the waveforms see if everything is defined. Look for the first place you can find an undefined value.
t
Good news, it's a timing bug. When I start writing at the problematic address and only write 4 values in the for loop at once, there's no problem. Hmm... Maybe processing the memory access takes a while 🤔