1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-16 19:25:55 +02:00
Commit Graph

321 Commits

Author SHA1 Message Date
Werner Almesberger
3f5c052288 libubb/include/ubb/regbase.h (PDTRGx): add trigger mode registers 2014-03-06 11:24:09 -03:00
Werner Almesberger
77a7a38f5f ubbctl/README: fix typo in example 2014-03-06 10:34:47 -03:00
Werner Almesberger
1d78c01bba ubb-patgen/Makefile (LDLIBS): add -lpthread -ldl
Strangly, using what's supposedly the same toolchain, I didn't seem to
need these items in the past. Or maybe I just never tried a non-static
build.
2013-03-29 20:33:41 -03:00
Werner Almesberger
aa1106e120 ubb-la/gui.c: Shift+Left/Right jumps "intelligently" to next change on any channel 2013-02-01 12:29:24 -03:00
Werner Almesberger
47e5859c5b ubb-la/gui.c: move sample retrieval to new function get_sample
Better than open-coding this non-trivial formula over and over again.
2013-02-01 12:06:32 -03:00
Werner Almesberger
9c3caf282f ubb-la/gui.c (gui_init): disable the cursor on the Ben 2013-02-01 11:48:46 -03:00
Werner Almesberger
0058175361 ubb-la/README: briefly describe GUI use 2013-02-01 03:45:10 -03:00
Werner Almesberger
60b375135f ubb-la/gui.c (si_text): used fixed %7.3f format if we have 7 characters
The variable number of digits was more confusing than useful. A drawback
is we may no longer see single-sample time changes when near the end of
the buffer.
2013-02-01 00:42:29 -03:00
Werner Almesberger
9cc032816e ubb-la/gui.c (pos_step): step one sample at maximum zoom
This permits precise interval/frequency calculation with the user-defined
reference.
2013-02-01 00:38:19 -03:00
Werner Almesberger
b99c81409f ubb-la/gui.c: add user-defined zero reference (set/unset with space) 2013-02-01 00:34:02 -03:00
Werner Almesberger
5b050b4b36 ubb-la/gui.c (gui): move position display to show_position; add position in samples 2013-01-31 23:24:24 -03:00
Werner Almesberger
f9b3c36c6b ubb-la/gui.c (gui): the upper bound for "pos" is nibbles-skip-1, not "nibbles" 2013-01-31 14:48:26 -03:00
Werner Almesberger
709506e6d6 ubb-la/gui.c (show_map): fix calculation of middle point
Also here, we need to take into account that "pos" is zero-based.
2013-01-31 14:48:26 -03:00
Werner Almesberger
137ed18dc2 ubb-la/gui.c (show_buffer): fix calculation of the position offset (dp)
"pos" counts from zero so the middle point is (nibbles-skip)/2 while
the code assumed "pos" was an index into the actual buffer and the
middle point would therefore have been (nibbles+skip)/2
2013-01-31 14:43:33 -03:00
Werner Almesberger
8b69d26fa9 ubb-la/gui.c: make debug output clearer and more detailed 2013-01-31 10:51:44 -03:00
Werner Almesberger
af3c18ab19 ubb-la/try.c (main): use same buffer size and offset as the Ben 2013-01-31 10:02:31 -03:00
Werner Almesberger
f26fd3564a ubb-la/gui.c (show_map): keep view rectangle size constant
Before, we had rounding effects that could make the rectangle width vary by
one pixel, depending on position.
2013-01-31 04:03:31 -03:00
Werner Almesberger
db133f2cb6 ubb-la/gui.c: display time of center (from start of buffer) 2013-01-31 03:52:24 -03:00
Werner Almesberger
b0a576dd64 ubb-la/gui.c: mark the center of the view area 2013-01-31 03:25:21 -03:00
Werner Almesberger
a83d8bf323 ubb-la/gui.c: add small gap (UNIT_GAP) between numbers and units 2013-01-31 03:15:33 -03:00
Werner Almesberger
ba033cc27e ubb-la/gui.c: add section comments for color and layout definitions 2013-01-31 02:59:37 -03:00
Werner Almesberger
159a128d28 ubb-la.c/gui.c: show units in light blue to better separate them from numbers 2013-01-31 02:57:27 -03:00
Werner Almesberger
06c5f6b0fa ubb-la/gui.c (textf): use vsnprintf+valloca instead of vasprintf
This way, we don't malloc/free all the time, which could lead to more
memory fragmentation than alloca at roughly the same stack location.
2013-01-31 02:50:01 -03:00
Werner Almesberger
52c3dcc16a ubb-la/gui.c (textf): vasprintf ain't alloca, so we need to free() 2013-01-31 01:45:42 -03:00
Werner Almesberger
cdcfb6c181 ubb-la/gui.c: show division size (in samples and seconds) 2013-01-31 01:21:56 -03:00
Werner Almesberger
8d81b584a0 ubb-la/gui.c (XWIDTH): move view width into macro instead of open-coding it 2013-01-31 01:11:18 -03:00
Werner Almesberger
acd9fd6673 ubb-la/gui.c: show horizontal divisions 2013-01-31 01:09:42 -03:00
Werner Almesberger
5bb086e0e8 ubb-la/: display sample rate and sample interval in the GUI 2013-01-31 01:08:39 -03:00
Werner Almesberger
e1be0f242b ubb-la/gui.c: display a small map of buffer and view 2013-01-31 00:07:32 -03:00
Werner Almesberger
f99b62636f ubb-la/gui.c: label channels 2013-01-30 23:19:09 -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
0925b0f060 ubb-la/gui.c: add section titles and reorder some of the functions 2013-01-30 22:07:31 -03:00
Werner Almesberger
533e9643ac ubb-la/gui.c (DEBUG): make debugging fprintfs optional via DEBUG macro 2013-01-30 21:25:47 -03:00
Werner Almesberger
2d49a73aad ubb-la/try.c: run the GUI with fake data 2013-01-30 21:20:08 -03:00
Werner Almesberger
65a8578bd2 ubb-la/Makefile: add SDL (may break "static") 2013-01-30 21:19:09 -03:00
Werner Almesberger
435144223d ubb-la/gui.c (gui): make panning zoom-dependent (2 samples at maximum zoom) 2013-01-30 21:08:25 -03:00
Werner Almesberger
4fb2a8cbee ubb-la/gui.c (gui_init): enable keyboard repeat 2013-01-30 20:55:58 -03:00
Werner Almesberger
c702fc0e90 ubb-la/gui.c: add horizontal panning (WIP) 2013-01-30 20:51:22 -03:00
Werner Almesberger
12a1808e09 ubb-la/gui.c (gui): fix the event loop to properly ignore unrecognized events 2013-01-30 20:37:42 -03:00
Werner Almesberger
1b0a2cff51 ubb-la/gui.c: use powers of two for zoom and integer arithmetic (WIP)
This looks better and avoids the risk of math issues.
2013-01-30 20:37:10 -03:00
Werner Almesberger
94e099eebc ubb-la/gui.c: experimental GUI code (WIP) 2013-01-30 14:38:54 -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
128590bee0 ubb-patgen/ubb-patgen.c: new option -I inter_s to select "unsafe" frequencies 2013-01-28 21:20:25 -03:00
Werner Almesberger
04b235cedf ubb-patgen/ubb-patgen.c: new option -F freq_Hz to select "unsafe" frequencies 2013-01-28 21:14:53 -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
66a487b634 ubb-patgen/ubb-patgen.c (frequencies): adapt use of mmcclk for API change 2013-01-28 21:04:26 -03:00