1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-06-26 02:07:39 +03:00

ubb-la/ubb-la. (xfers): re-optimize the start bit

Combined with the 84 MHz speedup, this yields:

1       3       gap+0   2       0       1       3
------- ------- ------- ------- ------- ------- -------
        118     36              1       138
        89      35      1                       22
        59      36      1                       51
        30      36      1                       80

So in this case we gain only about 3 samples or 10% by making this risky
optimization. (The gain would be higher at higher sample rates, lower at
lower rates.)
This commit is contained in:
Werner Almesberger 2013-01-29 00:15:24 -03:00
parent bf62b209e5
commit 3b007ebaf1

View File

@ -199,14 +199,13 @@ static void xfers(unsigned long *bufs, int n_bufs, int nibbles,
MSCCDR = 0;
/*
* Experimental value for 12 MSa/s: hangs always/usually with
* 231 cycles, hangs sometimes with 232, hands never (so far)
* with 233.
* Experimental value for 12 MSa/s with speedup to 84 MSa/s:
* hangs often with 29 cycles, hangs never (so far) with 30.
*/
// for (j = 0; j != 233; j++) asm volatile ("");
for (j = 0; j != 30; j++) asm volatile ("");
// while (MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY);
while (!(MSC_STAT & MSC_STAT_END_CMD_RES));
// while (!(MSC_STAT & MSC_STAT_END_CMD_RES));
IN(UBB_CMD);