-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster SPI flash controller #29
Comments
|
|
Trying the latest changes gives:
|
Hi Matthias, |
I meant CONFIGS/icestick_spi_flash_config.v |
I see, thank you: Up and running now, feels faster ! |
Cool ! Thank you for letting me know (I tested again, but I'm always afraid of breaking smthg ! When you have multiple board, it is very easy to break something without noticing !). The current version uses 44 clocks for each 32-bits access, we could go faster:
|
You have a lot of configuration options, I like that ! I usually have a folder for each target separately, and common folder(s) for the parts that can be reused. Maintaining all the switches for different targets in the same target-specific files is something I would avoid. You'll end up with some duplicated glue code, but it improves readability for the ones that use one target only. Speed is acceptable now, and you should leave a few LUTs for experiments of your students. Did you follow the idea to change the processors register set in order to get 7 kb available RAM on Icestick ? |
A good place to draw the line is between CPU+RAM in a common module, with options for size/SPI execution/reset vector, and a separate target-specific Verilog file to wire in the peripherals for each target. In my experience with Mecrisp-Ice, I usually drop the same CPU/Memory/Forth module into my new projects and rewrite the IO part every time to fit the current use case, with the Forth core itself having a dependency on the terminal IO registers only. |
About files organization, I'm trying different things, no organization is perfect, I'll probably reorganize everything several times. For now it works reasonably well for the different projects, but I'll probably change it when the number of supported boards will increase. About LUTs, I have an idea that may save 40 to 50 LUTs: the SPI flash controller has a 40 bits and a 32 bits shift register, maybe I can replace them with 8-bits shift registers used several times (but I do not like it very much, it adds some complexity...) |
Pushed new version, now using a single 40 bits shifter (for both send and receive), and a single 5 bits clock counter, saves 50-80 LUTs ! |
There is (a lot of) room for improvement in the SPI flash controller:
The text was updated successfully, but these errors were encountered: