knielsen / ice40_viewer

ISC License
58 stars 13 forks source link

Add UP5K support #2

Closed dalnefre closed 1 year ago

knielsen commented 1 year ago

Thanks! Nice to have UP5K support, and also thanks for the couple code fixes. Merged, and I added the fomu_rgb example to the example menu and fixed a couple indentations.

Cool that there's still interest in ice40_viewer, it was a fun little project to do.

- Kristian.

dalnefre commented 1 year ago

Thanks for doing all the hard work! The viewer has already proven to be very useful.

One thing we didn't know what (if anything) to do about was: https://github.com/knielsen/ice40_viewer/blob/f7857940addf6817ffd3a4b32026ede1ccdd967c/ice40.js#L643

@jamesdiacono also considered changing the way databases are loaded, basing it on the .asc file loaded, per your code comment. However that was a much larger change. Perhaps he will create an issue to track that as possible future work.

knielsen commented 1 year ago

Ah, this active_value is used to detect if a block ram tile is in use in a design and mark it in a different colour if so. The bit to mark a ram tile active is opposite polarity for 1k and 8k devices. It appears from your 5k example that the bit for 5k is the same as 8k, I updated the code appropriately.

Yes, feel free to create an issue to track the change for database loading.

- Kristian.