Hi @Fabien, I am struggling to get your ili9341 working reliably.
The first problem is that it does not start up reliably. That seems to be because you are only setting nreset for one clock cycle. I added a delay_ticks of ms5 to the RESET state, and that seems to have fixed that.
Another problem is the colours. The initialisation sequence includes 0x36 (MADCTL) 08, which sets the colour mapping to BGR. You had set colours in RGB order, so I reversed those. Also you were setting the G value to 5 bits, not six when it was set (6’b11111 not 6.b111111) which messed up colours with green in them. So I fixed that. I have left it as BGR.
There is also the problem that the image is horizontally and (at least with my screen orientation) vertically flipped, so I I am changing things. so that xpos and ypos count down.
I also found a problem in @gundy’s top.v module that stopped buttons working when i2c was not defined, so it now sets i2c_iomem_ready to i2c_en not 1, when i2c is not defined and similarly for gpio, and that fixed that problem, so I can now use button input without having to include the i2c code.
The final (I hope) problem is that it appears to sending each 16-bit pixel twice, so that the screen is stretched vertically and you only see half of it. I am currently trying to understand the complex interaction between all the state variables to try to see what is going on., and will look at what the maximum rate that we can send data at, at the same time.