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
96ae3319c5
libubb/physmem.c (physmem_xlat): don't close the (supposedly) cached fd
2013-01-26 21:09:19 -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
b0d89b25eb
ubb-patgen/ubb-patgen.c (send_buffer): physmem_xlat no longer needs a cast
2013-01-26 20:48:21 -03:00
Werner Almesberger
c796ab1c54
libubb/physmem.c (physmem_xlat): make "v" "const"
...
Since we may use the buffer as well for reading only, there is no point in
pretending physmem_xlat itself would try to write to it.
2013-01-26 20:42:33 -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
a947b5ef85
ubb-patgen/Makefile (CFLAGS): use more specific -O9 -fno-tree-cselim
...
... instead of -O0. See previous commit for details.
2013-01-25 19:55:49 -03:00
Werner Almesberger
09de2454ef
ubb-la/Makefile (CFLAGS): use more specific -O9 -fno-tree-cselim
...
Third time lucky, I hope. -fno-tree-cselim is much more specific than
disabling all optimization and results in a considerably less severe
performance reduction (about 30-40% of -O0).
2013-01-25 19:49:20 -03:00
Werner Almesberger
07026753de
ubb-la/README: brief description of ubb-la
2013-01-24 20:04:40 -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
fc4b8e720a
ubb-patgen/Makefile (CFLAGS): even -O1 isn't safe; use -O0 instead
...
In ubb-la, -O1 still exhibited problems. Didn't verify for ubb-patgen,
but let's play this safe for now.
2013-01-24 18:33:08 -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
bac21bf8cb
ubb-la/Makefile (CFLAGS): even -O1 isn't safe; use -O0 instead
...
While -O1 gets rid of the unexpected read in the simple code of a synthetic
test, it's still there in the more complex environment we have in ubb-la.c
Turning off optimization completely seems to do the trick.
2013-01-24 17:35:52 -03:00
Werner Almesberger
00ef01ada8
ubb-patgen/Makefile (CFLAGS): -O9 is currently unsafe; use -O1
...
Higher optimizations can cause the generation of code that unexpectedly
does the equivalent of PDFUNS = PDFUNS;
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56098
2013-01-24 15:34:04 -03:00
Werner Almesberger
e1eea4fa86
ubb-la/Makefile (CFLAGS): -O9 is currently unsafe; use -O1
...
Higher optimizations can cause the generation of code that unexpectedly
does the equivalent of PDFUNS = PDFUNS;
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56098
2013-01-24 15:31:59 -03:00
Werner Almesberger
2c5b3625a7
ubb-la/: data capture via UBB and MSC+DMA (WIP)
2013-01-23 11:54:23 -03:00
Werner Almesberger
d4c1f5666c
ubb-la/hw/: proof-of-concept passive LA adapter board
...
Note that the pull-ups on DAT1 through DAT3 and the pull-whichever-way on
DAT0 are likely to get in the way of any real-life use. But it's good enough
for exploring the system's characteristics and limitations.
2013-01-23 11:52:11 -03:00
Werner Almesberger
5025f360cc
ubb-patgen/ubb-patgen.c: use symbolic bit/field definitions for DMA
2013-01-20 19:16:36 -03:00
Werner Almesberger
5efafd6fcc
libubb/include/ubb/regs4740.h: add symbolic bit/field definitions for DMA
2013-01-20 19:16:17 -03:00
Werner Almesberger
486471e8fc
ubb-patgen/ubb-patgen.c: use symbolic bit/field definitions for MSC_*
2013-01-20 17:34:39 -03:00
Werner Almesberger
4cb68b7ece
libubb/mmcclk.c: use symbolic bit/field definitions for MSC_*
2013-01-20 17:34:17 -03:00
Werner Almesberger
8509c1f7b9
libubb/include/ubb/regs4740.h: add symbolic bit/field definitions for MSC_*
2013-01-20 17:34:01 -03:00
Werner Almesberger
a31351545c
ubb-patgen/timeline.fig: timeline of pattern generation (description in README)
2013-01-18 14:18:44 -03:00
Werner Almesberger
8dda1200c1
ubb/solder-cable.fig: drawing to illustrate soldering a cable to UBB
2013-01-16 22:53:14 -03:00
Werner Almesberger
f920c6695b
ubb-patgen/README: add "!\r" to UART example
2013-01-16 12:08:10 -03:00
Werner Almesberger
5be0b56aa1
swuart-chat/chat.c: options -r and -t to select pins; bit rate argument
2013-01-16 12:07:27 -03:00
Werner Almesberger
b8f2a8b764
ubb-patgen/ubb-patgen.c (send_buffer): track physmem_xlat_vec renaming
2013-01-16 10:30:41 -03:00
Werner Almesberger
e669a1b2d1
libubb/physmem.c (physmem_xlat_vec): rename to physmem_xlat
2013-01-16 10:29:46 -03:00
Werner Almesberger
35d4b9f381
libubb/physmem.c: remove physmem_xlat; cache open pagemap fd
...
To avoid contamination, we open the pagemap file with O_CLOEXEC.
2013-01-16 10:26:51 -03:00
Werner Almesberger
2de15b9aec
ubb-patgen/ubb-patgen.c (send_buffer): use physmem_xlat_vec
2013-01-16 10:16:09 -03:00
Werner Almesberger
3161d5555b
libubb/physmem.c (physmem_xlat_vec): more general version of physmem_xlat
2013-01-16 10:15:24 -03:00
Werner Almesberger
66080fe72e
ubb-patgen/ubb-patgen.c: support trigger sequences, e.g., 01 for a rising edge
2013-01-16 04:45:49 -03:00
Werner Almesberger
4729d00b30
ubb-patgen/ubb-patgen.c: run at realtime priority while waiting for trigger
2013-01-16 03:56:17 -03:00
Werner Almesberger
6d749fafb8
ubb-patgen/ubb-patgen.c (main): sort options alphabetically in "switch" statement
2013-01-16 03:45:22 -03:00
Werner Almesberger
2161341267
ubb-patgen/ubb-patgen.c: new option -w to add delay before sending the pattern
2013-01-16 03:44:30 -03:00
Werner Almesberger
0129a59f86
ubb-patgen/ubb-patgen.c: new option -d to debounce the trigger
2013-01-16 03:30:04 -03:00
Werner Almesberger
39f4e48f8d
ubb-patgen/ubb-patgen.c: new option -i to select frequency by cycle time
2013-01-16 01:58:16 -03:00
Werner Almesberger
c124e1a819
ubb-patgen/ubb-patgen.c: accept SI suffixes and a unit for durations as well
2013-01-16 01:11:57 -03:00
Werner Almesberger
9930ae6576
ubb-patgen/ubb-patgen.c: move frequency difference warning into select_freq
...
This way, all frequency selections print a warning when there's a difference.
2013-01-15 23:48:57 -03:00
Werner Almesberger
ff38f1c249
ubb-patgen/ubb-patgen.c (send_buffer): use physmem_flush instead of cacheflush
2013-01-15 23:31:30 -03:00
Werner Almesberger
a8f905a85f
libubb/physmem.c: new function physmem_flush to flush cached writes to memory
...
This is mainly a wrapper for the "cacheflush" system call.
2013-01-15 23:30:02 -03:00
Werner Almesberger
752a77f015
ubb-patgen/ubb-patgen.c (show_frequencies): show duplicate entries only one
...
This only affects "quiet" operation since entries with the same frequency
differ in the why it's calculated in non-quiet operation.
2013-01-15 23:14:25 -03:00
Werner Almesberger
d5ea5d9ae9
ubb-patgen/README: brief description how ubb-patgen works
2013-01-15 19:34:58 -03:00
Werner Almesberger
0bb711e625
ubb-patgen/ubb-patgen.c: new option -t 0|1 to start pattern on TRIGGER/CLK
...
The trigger delay is typically in the order of 2 us but, since we're not
disabling interrupts or such, could also be much larger.
2013-01-15 18:40:16 -03:00
Werner Almesberger
10b0dea29c
libubb/mmcclk.c (BUS_LIMIT_MHZ): explain the 56 MHz limit
2013-01-15 18:01:27 -03:00
Werner Almesberger
1c76cab66c
ubb-patgen/ubb-patgen.c: new option -m MASK to choose which DATx lines to use
2013-01-15 17:40:49 -03:00
Werner Almesberger
d60ef14022
ubb-patgen/ubb-patgen.c: new option -p to force interpretation as pattern
...
In the unlikely event that we have a file with the same name.
2013-01-15 17:09:08 -03:00
Werner Almesberger
69aba6ae19
ubb-patgen/ubb-patgen.c: accept file (- for standard input) as pattern source
2013-01-15 17:05:33 -03:00