-
Notifications
You must be signed in to change notification settings - Fork 263
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
GOWIN algorithms re-write #371
Conversation
55c08a8
to
45e8fb7
Compare
#define spi_gowin_write(_wr, _rd, _len) do { \ | ||
_jtag->shiftDR(_wr, _rd, _len); \ | ||
_jtag->toggleClk(6); } while (0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid code duplication (for ease of maintenance/improvement) I prefer keeping this macro. After preprocessor pass code will look similar to your.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to make it a function then, "inline" was invented for this same purpose... Would you like what I update the patch?
469bfad
to
34aca16
Compare
Speed up toggleClk Defer write-only USB transactions to better utilize bus
Checked working program SRAM, internal FLASH on Tang Nano1k and Tang Nano 9k with three JTAG cables: original FT232, on-board BL702 emulating FT2232 and CH347 (optimized in this PR).