1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-30 17:56:15 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Werner Almesberger
5bb086e0e8 ubb-la/: display sample rate and sample interval in the GUI 2013-01-31 01:08:39 -03:00
Werner Almesberger
444e0811bf ubb-la/ubb-la.c: new option -g to use the GUI to display results
For now, only in single-buffer mode.
2013-01-30 22:07:55 -03:00
Werner Almesberger
b7688f3abe ubb-la/ubb-la.c: add more section titles 2013-01-30 01:52:38 -03:00
Werner Almesberger
760e8a893a ubb-la/ubb-la.c (xfers): revert to "safe" end-of-command synchronization
This seems to be the best compromise between stability and performance.
2013-01-30 01:51:12 -03:00
Werner Almesberger
3b007ebaf1 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.)
2013-01-29 00:15:24 -03:00
Werner Almesberger
bf62b209e5 ubb-la/ubb-la.c: raise MMC bus clock to 84 MHz during overhead
We also de-optimize the start bit (DAT0=0) phase for now. In the
12 MHz scenario, this produces the following results:

1       3       gap+0   2       0       1       3
------- ------- ------- ------- ------- ------- -------
8               38              26      100     146
        102     38      26                      6
        52      39      26                      55
        147     41      26                      105
97              39              26      10      146

Note that the gap now includes the start bit phase, since the clock
change may complicate the calculation of how many 12 MHz samples
it corresponds to.
2013-01-28 23:24:29 -03:00
Werner Almesberger
f862a82a2d ubb-la/ubb-la.c: new option -F freq_MHz to select "unsafe" frequencies 2013-01-28 21:06:00 -03:00
Werner Almesberger
85bda4c41d ubb-la/ubb-la.c (frequency): adapt use of mmcclk for API change 2013-01-28 21:05:01 -03:00
Werner Almesberger
14b7a9cdee ubb-la/ubb-la.c (xfers): instead of waiting for event, use hand-optimized delay loop
The gap is just as long as when waiting for an event but the "start bit"
on DAT0 has vanished completely:

1       3       gap     2       0       1       3
------- ------- ------- ------- ------- ------- -------
53              77                      16      146
66              79                      1       146
81              79                              132
96              79                              117
2013-01-28 16:43:29 -03:00
Werner Almesberger
18a822b845 ubb-la/ubb-la.c (xfers): wait for END_CMD_RES instead of DATA_FIFO_EMPTY
This seems to make no difference for the gap but the "start bit" (DAT0
pulled low) seem to get 1-2 samples shorter:

1       3       gap     2       0       1       3
------- ------- ------- ------- ------- ------- -------
146             77      9                       60
147     13      79      9                       45
145     28      79      10                      29
146     43      79      9                       15
2013-01-28 16:43:23 -03:00
Werner Almesberger
4ffd61093b ubb-la/ubb-la.c (do_bufs): don't skip 122 nibbled (for evaluation)
A series of measurements of

A# ./ubb-patgen  -f 41kHz 1
A# ./ubb-patgen  -f 41kHz -c
B# ./ubb-la -f 12 -n 10

yielded these results:

1       3       gap     2       0       1       3
------- ------- ------- ------- ------- ------- -------
106             77      11                      98
120             78      11                      83
134             79      11                      68
        3       79      11                      53
        18      78      11                      39
        33      78      11                      24
        47      79      11                      9
        62      79      5       6       140     147
        77      79              11      125     147

Where for example the last entry corresponds to

...1{146}3{77}
0{11}1{125}3{147}...

Since this looks as if DAT1 was 1 for 77 samples before the first capture
ended, was 0 throughout the pulling low of DAT0 (11 cycles), stayed low
for another 125 cycles, and then went high for the 146.29 nominal
half-period, we thus get a gap length of 2*146-77-11-125 = 79
2013-01-27 18:23:38 -03:00
Werner Almesberger
37a219b0b9 ubb-la/ubb-la.c: option -n N to enter experimental multi-buffer mode (WIP) 2013-01-26 23:25:17 -03:00
Werner Almesberger
13f34170de ubb-la/ubb-la.c (do_buf): physmem_xlat doesn't need a cast
We inherited the cast from ubb-patgen where the buffer was "const" and thus
had to be cast for the the non-const argument of physmem_xlat. We never
needed a cast in ubb-la, though.

Since physmem_xlat now uses "const" as well, the cast is even doubly
superfluous.
2013-01-26 20:49:09 -03:00
Werner Almesberger
8316bc0070 ubb-la/ubb-la.c (do_buf): move pretty-printing to new function print_samples 2013-01-26 20:01:32 -03:00
Werner Almesberger
4ceee66c79 ubb-la/ubb-la.c (INITIAL_SKIP): describe how the value was obtained 2013-01-26 19:55:44 -03:00
Werner Almesberger
4ce6866767 ubb-la/ubb-la.c (do_buf): skip over the first 122 samples
They are from the setup process and therefore invalid (DAT0) and/or out
of sync (DAT0-3) with the rest of the samples.
2013-01-24 20:00:59 -03:00
Werner Almesberger
62284fb78e ubb-la/ubb-la.c: add command-line options, keyboard abort 2013-01-24 18:26:34 -03:00
Werner Almesberger
2c5b3625a7 ubb-la/: data capture via UBB and MSC+DMA (WIP) 2013-01-23 11:54:23 -03:00