E1 tracer » History » Version 6
roh, 12/18/2020 05:26 PM
1 | 2 | laforge | h1. e1-tracer |
---|---|---|---|
2 | 1 | tnt | |
3 | 4 | laforge | This page is about the "production" version of the setup described in [[ICE40_based_passive_tap]]. |
4 | 1 | tnt | |
5 | 4 | laforge | It is a bi-directional, high-impedance passive tap for E1 (PRI/S2M) tracing. It traces both directions of a link simultaneously via two LIU (Line Interface Units) attached to an iCE40 FPGA with E1 framer + USB softcores. |
6 | |||
7 | The traces are sent as isochronous USB transfers to the host PC, where they can (for example) be stored on disk. |
||
8 | |||
9 | 1 | tnt | h2. hardware |
10 | 4 | laforge | |
11 | 5 | tnt | Hardware files can be found at: http://git.osmocom.org/osmo-e1-hardware/tree/hardware/e1-tracer and are available as Open Source Hardware. |
12 | 3 | laforge | |
13 | !e1_tracer.jpg! |
||
14 | 2 | laforge | |
15 | h3. design files |
||
16 | |||
17 | We originally started with a prototype from an iCE40 evaluation board plus two osmo-e1-xcvr and one e1-tap as described in [[ICE40_based_passive_tap]]. |
||
18 | |||
19 | 5 | tnt | Meanwhile, we have designed a fully integrated board. Design files are part of the @osmo-e1-hardware.git@ repository. |
20 | 2 | laforge | * Schematics: |
21 | 5 | tnt | ** EAGLE: source:hardware/e1-tracer/e1-tracer.sch |
22 | ** PDF: source:hardware/e1-tracer/e1-tracer_sch.pdf |
||
23 | 2 | laforge | * Board layout |
24 | 5 | tnt | ** EAGLE: source:hardware/e1-tracer/e1-tracer.brd |
25 | ** PDF: source:hardware/e1-tracer/e1-tracer_brd.pdf |
||
26 | ** Gerber: source:hardware/e1-tracer/gerber |
||
27 | 2 | laforge | * Bill of Materials |
28 | 5 | tnt | ** gnumeric spreadsheet: source:hardware/e1-tracer/e1-tracer_eBOM.gnumeric |
29 | ** CSV export: source:hardware/e1-tracer/e1-tracer_eBOM.csv |
||
30 | 2 | laforge | |
31 | h3. gateware + firmware |
||
32 | |||
33 | 5 | tnt | The FPGA gateware and RISC-V softcore firmware are found in the @osmo-e1-hardware.git@ repository, under the @gateware@ and @firmware/ice40-riscv/e1-tracer@ directories respectively. |
34 | 2 | laforge | |
35 | 6 | roh | h3. flashing |
36 | |||
37 | to bring up the board after manufacturing there are 2 steps: |
||
38 | |||
39 | * flash the padded bootloader into spi flash |
||
40 | * flashing the runtime gateware and application via dfu |
||
41 | |||
42 | h4. flashing the bootloader |
||
43 | |||
44 | this involves pulling the _CRESET line on the spi programming header next to ground (the next pin nex to it) to keep the fpga in reset while we access the flashchip. |
||
45 | the board can be powered via usb for this, but the spi programming cable should not have a vcc line connected then. |
||
46 | the 1M0xff.bin file consists of 0xFF and is used as padding for the unused flash areas. |
||
47 | the tool used for flashing here is flashrom via a stm32(bluepill) based adapter ("STM32 virtual serprog for flashrom") but virtually any spi programmer can be used. |
||
48 | |||
49 | <pre> |
||
50 | cat e1tracer-bootloader-20200822.bin 1M0xff.bin > tmp |
||
51 | dd if=tmp of=flashme1M.bin bs=1024 count=1024 |
||
52 | rm tmp |
||
53 | flashrom -p serprog:dev=/dev/ttyACM3:4000000 -w flashme1M.bin |
||
54 | </pre> |
||
55 | |||
56 | |||
57 | h4. flashing the runtime |
||
58 | |||
59 | to access the bootloader the first time, before any runtime is flashed you need to reset the board (power) while SW1 (button) is pressed to force bootloader(dfu) mode. |
||
60 | |||
61 | flashing itsel is easy since it only needs the regular userspace tool dfu-util and firmware from http://ftp.osmocom.org/binaries/e1-tracer/firmware/ (for now on https://people.osmocom.org/tnt/stuff/e1-recorder/ ) |
||
62 | |||
63 | <pre> |
||
64 | dfu-util -d 1d50:6150 -c 1 -a 0 -D riscv_usb.bin |
||
65 | dfu-util -d 1d50:6150 -c 1 -a 1 -D fw_app.bin -R |
||
66 | </pre> |
||
67 | |||
68 | 2 | laforge | h3. availability |
69 | |||
70 | Fully assembled products based on this hardware are going to be made available by "sysmocom":https://sysmocom.de/ |
||
71 | |||
72 | h2. software |
||
73 | |||
74 | The host software is found in the @e1-recorder@ branch of @ice40playground.git@, see https://github.com/smunaut/ice40-playground/tree/e1-recorder/projects/riscv_usb/sw |
||
75 | |||
76 | There are two related programs: |
||
77 | |||
78 | * @main@ - the program used to perform recordings and store them |
||
79 | * @dump@ - the program to analyze recordings |