Root/
| 1 | UBB pattern capture |
| 2 | =================== |
| 3 | |
| 4 | ubb-la is the counterpart of ubb-patgen: it captures a pattern on DATx |
| 5 | and prints on standard output what it has received. The output format |
| 6 | is the same as the one used by ubb-patgen, i.e., hex digits with |
| 7 | repetitions indicated by {number}. |
| 8 | |
| 9 | ubb-la is currently a proof of concept implementation and therefore |
| 10 | only provides the most basic functions. |
| 11 | |
| 12 | Capture frequencies are the same as for ubb-patgen. The sample size is |
| 13 | fixed at 8008 samples. |
| 14 | |
| 15 | |
| 16 | Sample rate |
| 17 | ----------- |
| 18 | |
| 19 | The frequency in MHz is selected with the option -f. For example, this |
| 20 | would select 10.5 MHz: |
| 21 | |
| 22 | # ubb-la -f 10.5 |
| 23 | bus 10.5 MHz controller 168 MHz |
| 24 | |
| 25 | Note that - unlike ubb-patgen - there are no SI prefixes or rounding |
| 26 | modes to select. ubb-la simply picks the frequency closest to the one |
| 27 | specified. |
| 28 | |
| 29 | The option -F works like -f but also allows frequencies that may |
| 30 | exceed the hardware's capabilities. As a consequence, the MMC |
| 31 | controller may hang. |
| 32 | |
| 33 | A list of available frequencies can be obtained with |
| 34 | |
| 35 | # ubb-patgen -q |
| 36 | |
| 37 | The default sample rate is 1 MHz. |
| 38 | |
| 39 | |
| 40 | Clock output |
| 41 | ------------ |
| 42 | |
| 43 | The CLK line (CLK/TRIG) is usually configured as an input. If the |
| 44 | option -C is present, ubb-la outputs the MMC bus clock instead. |
| 45 | |
| 46 | |
| 47 | Trigger |
| 48 | ------- |
| 49 | |
| 50 | Capture only starts after detection of a trigger. By default, ubb-la |
| 51 | triggers when the CLK/TRIG line changes. |
| 52 | |
| 53 | The trigger pattern can be selected with the option -t pattern/mask, |
| 54 | where ubb-la triggers when (pins & mask) == pattern |
| 55 | |
| 56 | For example, |
| 57 | |
| 58 | # ubb-la -t 2/3 |
| 59 | |
| 60 | would monitor the lines DAT0 and DAT1 and trigger when DAT0 is 0 |
| 61 | while DAT1 is 1. In the pattern and mask, DAT0 has the value 1, DAT1 |
| 62 | is 2, DAT2 is 4, DAT3 is 8, and CLK/TRIG is 16. |
| 63 | |
| 64 | ubb-la turns off interrupts while waiting for a trigger. The only |
| 65 | ways to exit are either detection of a trigger or a button press on |
| 66 | the Ben's keyboard. In the latter case, ubb-la exits immediately and |
| 67 | does not capture any samples. |
| 68 | |
| 69 | When the trigger is present, it takes roughly 550 +/- 250 ns plus one |
| 70 | sample time until the first sample is taken. |
| 71 | |
| 72 | |
| 73 | Graphical output |
| 74 | ---------------- |
| 75 | |
| 76 | A graphical interface is available for exploration of a captured |
| 77 | pattern. This interface is invoked if the option -g is set. Note |
| 78 | that sample rate, trigger, etc., still have to be set up via the |
| 79 | command line. Example: |
| 80 | |
| 81 | # ubb-la -f 12 -t 0/8 -g |
| 82 | |
| 83 | In the GUI, the following keys are available: |
| 84 | |
| 85 | Left/Right Pan the waveform left/right. With Shift, jump to the |
| 86 | next change on any channel in the specified direction. |
| 87 | Up/Down Zoom in/out |
| 88 | Space Set the user origin (upward-facing green triangle) |
| 89 | at the current position and display the time to |
| 90 | the center position (downward-facing blue triangle). |
| 91 | Pressing space again removes the user origin. |
| 92 | Enter/Q Quit |
| 93 | |
| 94 | |
| 95 | Known bugs |
| 96 | ---------- |
| 97 | |
| 98 | At higher sample rates (observed at 42 and 56 MHz; not observed at |
| 99 | 24 MHz), the first sample may have an incorrect value and should be |
| 100 | ignored. |
| 101 | |
| 102 | Interrupting ubb-la while a capture is in progress could cause |
| 103 | memory corruption. |
| 104 | |
| 105 | The passive ubb-la circuit loads the inputs such that they will only |
| 106 | work if there is a strong driver. In particular, signals held only by |
| 107 | a pull-up or pull-down resistor are likely to be compromised. |
| 108 | |
| 109 | The respective resistive loads are: |
| 110 | |
| 111 | Signal To GND To 3.3 V |
| 112 | (max) (max) |
| 113 | ------------------------ |
| 114 | DAT0 1.1 k 11 k |
| 115 | DAT1-3 10 k 10 k |
| 116 | TRIG 330 k 330 k |
| 117 |
Branches:
master
