Commit Graph

297 Commits

Author SHA1 Message Date
Harald Welte 6360c07d91 osmo_e1f: Fix inverted logic of E bits
A value of '1' means _no_ CRC4 error observed. We got that right
in the receive side, but not in the transmit side so far

Change-Id: I5ef9ef3b9781da2f53f54253d31cdbf81957ea67
2020-12-19 12:34:40 +01:00
Harald Welte d9a8f9a07c osmo_e1f.c: Fix CRC4 insertion
When encoding the CRC bit for Frame number 0 and 8 in the multiframe,
we must first move the CRC4 into those of the last SMF.

Change-Id: I088741fc4528f33b3b989ada0e21957456deedb6
2020-12-19 12:08:17 +01:00
Harald Welte 2e7284b5be osmo_e1f: Fix use of uninitized variable
Change-Id: I42024856a58f0bd4fcc1c767688de5334994a8a8
2020-12-19 12:08:17 +01:00
Harald Welte 61a23eaf5d osmo_e1f.c: sa4..sa8 bits should be all-1 by default
From ITU-T G.704 Table 5A Note 4:

> Bits S a4 to S a8 (where these are not used) should be set to 1 on
> links crossing an international border.

Change-Id: Id55599a7152a90f85076de810db2a03ac6f3aac1
2020-12-19 12:08:17 +01:00
Harald Welte 5a45005847 osmo-e1-hardware: Fix missing PKG_CONFIG_PATH directory
otherwise we'll get:

make: Entering directory '/build/doc/manuals'
Package osmo-gsm-manuals was not found in the pkg-config search path.
Perhaps you should add the directory containing `osmo-gsm-manuals.pc'
to the PKG_CONFIG_PATH environment variable
No package 'osmo-gsm-manuals' found

Change-Id: I9f3d6e74be9e0fe31a2ee7aad9869ed7568ff6dd
2020-12-17 17:53:31 +01:00
Harald Welte 5ab3bfdba4 contrib/jenkins.sh: ugly work-around for PATH problems
For details see https://osmocom.org/issues/4911

Related: OS#4911
Change-Id: I04e9c29813f6695d0d53f7cdede34f83d24ea3fd
2020-12-17 17:44:07 +01:00
Harald Welte a624ef80d7 contrib/jenkins.sh 'publish' fixes
* don't install icE1usb files to e1-tracer directory
* don't replicate symlinks but copy

Change-Id: I6dff99dcc2ab465558ad6344ebb9cba73005cf34
2020-12-17 17:19:09 +01:00
Harald Welte a878ac8c33 add missing icE1usb-usermanual-docinfo.xml
This was missing in commit Ia04890cf3b321f8cb01e3c513a730031e76376b9

Change-Id: I4b20c38bf6ad87307c86e594cc23330d11b6303f
2020-12-17 17:19:09 +01:00
Harald Welte e7bccbac8b add contrib/jenkins.sh for build verification + manual / firmware upload
Change-Id: I70d7de4299e773b38a014e4884641712edbd45c3
2020-12-17 13:41:15 +01:00
Harald Welte 3255b74187 firmware: Build firmware files with auto-generated version numbers
This resembles what we do for other firmware targets, such as simtrace2,
osmo-ccid-firmware, etc.

As we have multiple different firmware, hardware, gateware projects in
this repository, and they each may have separate tags, we now require
that there are project specific tags.  So for example, tags with a
prefix of icE1usb-fw for the firmware versions.

symlinks for easy use by scripts etc. are generated, always pointing to
the last-built versioned filename.

Change-Id: Ia308587e36a79c27fdb285e369a9c921ee65995f
2020-12-17 13:20:51 +01:00
Harald Welte ae2c89e19e firmware: Rename fw_app.bin to icE1usb-fw.bin / e1_tracer-fw.bin
This is clearly much more descriptive, and avoids mixing up firmware
files for different boards

Change-Id: I319edb76dd74be6904395692ab1599fb8f1f9065
2020-12-17 13:20:51 +01:00
Harald Welte 7d4ba34552 add udev.rules files for icE1usb and e1-tracer
Change-Id: Ie1be28359def6fc181f88558834ac52a001312b7
2020-12-15 08:48:26 +01:00
Harald Welte 2b7dadf73e cosmetic: comment spelling
Change-Id: I89e2ae1478688929a42c94c8279ebff1b3a6cd88
2020-12-15 08:48:26 +01:00
Harald Welte d645d44eb4 First version of icE1usb user manual
Change-Id: Ia04890cf3b321f8cb01e3c513a730031e76376b9
2020-12-15 08:48:26 +01:00
Harald Welte 72865d866f move specifications to sub-directory
Change-Id: Ib310e9bea7391cf0af27cf560a393e8c8d7bb190
2020-12-15 08:48:26 +01:00
Harald Welte c827185cc9 icE1usb: Mark some private functions as 'static'
Change-Id: Ie9808bb2fe264e9a3fa09168bfde57837b77d291
2020-12-14 13:48:09 +01:00
Martin Schramm 99196e9f83 e1-tracer: solve everything towards v2
* retract light guides and RJ45 1.5mm inwards (solves SYS#5051)
* SPI MOSI/MISO mismatch fixed (solves SYS#5050)
* footpint mismatch to BOM for L3,L4 fixed (solves SYS#5053)
* PCB had to get 5mm slimmer (adresses SYS#5088)
* repaired silk on name bott side
* DRC

Change-Id: I97ab7240b9b1fb68347dc994885c926b8c192217
2020-12-03 21:55:51 +01:00
Harald Welte 5ab1c6e919 gateware/README.md: Fix typo (CERL->CERN)
Change-Id: Ic1d0cad46a37a00714fa9b0cec5aa98ec9805a47
2020-11-04 15:54:25 +01:00
Harald Welte eb1b8432a2 e1_xcvr: Give signals proper names
Change-Id: I04107430cab02e493bbabef60b1cc19b535caad6
2020-11-04 15:53:38 +01:00
Sylvain Munaut 4d9a04e265 firmware/ice40-riscv: Enable more build warnings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I99fad45e3aa9accbacaf020b1f5f93aa4b1d4950
2020-10-29 13:27:19 +01:00
Sylvain Munaut 9067392724 firmware/ice40-riscv/icE1usb: Remove a obsolete debug command
This doesn't even do anything on this SoC ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ia57674dcfb578b3a68845a9719aaad7ee285dc76
2020-10-29 13:26:38 +01:00
Sylvain Munaut 632a3008b3 firmware/ice40-riscv: Add usb_e1.h
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ica42b00d3f6ae910e2b4711b7eade2492b3cebfb
2020-10-29 13:25:45 +01:00
Sylvain Munaut de20fb713d firmware/ice40-riscv: Fix a couple of 'mixed signedness' warnings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I31343263d7dab88a25254258cef44c6c2ddc730a
2020-10-29 13:24:50 +01:00
Sylvain Munaut 5e0217ea72 firmware/ice40-riscv/e1-tracer: Fix e1_tick_read()
This was broken when moving the design to non-hacked multi channel
E1.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I5e7ce22935609bc64333e2d5c310eb7493555a93
2020-10-29 13:24:02 +01:00
Sylvain Munaut c704c0704e firmware/ice40-riscv/e1-tracer: Remove CDC descriptors
This was never used and doesn't really belong here, this was just
an example descriptor in the original firmware this is based on.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ic72c991eb7a566b227484c7cde2c305d58202219
2020-10-29 13:22:55 +01:00
Sylvain Munaut f0d1218403 firmware/ice40-riscv/e1-tracer: Remove unused declaration of vio_set
This is a remanence of old firmware of the icepick on which that
design is based on.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I0bc27da4faa91de983cd5f355553ecaa13754266
2020-10-29 13:20:16 +01:00
Sylvain Munaut 46d6b412f5 firmware/ice40-riscv: Create a reboot() function
instead of direct access to registers.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Iaee092c5ef651f0350b3f46386ed79fdbe06afcb
2020-10-29 13:19:05 +01:00
Sylvain Munaut 4ea7d27764 firmware/ice40-riscv: Update no2usb core and fixup for API changes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ia6bda410e2529858cb86827e186bb099b9b87799
2020-10-29 13:17:11 +01:00
Sylvain Munaut bc59615ebc firmware/ice40-riscv: Minor cleanup in SPI xfer routine
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I2da662af8279746f0f3788a9a0a5cfdfe9dc9f99
2020-10-28 21:59:29 +01:00
Sylvain Munaut c5f3f77909 firmware/ice40-riscv: Use const data ptr for spi program fn
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I28b826b7a559ffccccdfa7c6e289a715ab1a4a01
2020-10-28 21:58:57 +01:00
Sylvain Munaut bbe3e28052 gateware/common: Fix whitespace formatting in wb_epbuf
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I4298b198ce02347de05d974458e98f44200adf63
2020-10-28 00:43:13 +01:00
Sylvain Munaut 25e57302bf hardware/icE1usb: Update ECN with rev 1.0 production
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I9996a076d2eef341211ba401ec0421bf9b11a78a
2020-10-28 00:42:31 +01:00
Sylvain Munaut 8b4b10d737 mechanical/icE1usb-case: Update ECN with 1st production run infos
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I745cdcdf9f801b8c4abeef63fe57740ca2c30c44
2020-10-28 00:41:55 +01:00
Harald Welte 72a79a5be0 e1-tracer BGT TFP faceplate: Switch from BGT-7 to BGT-5 (35->25mm)
Change-Id: I2af8cecca5ad8453ade0723805955c51fe573ec0
2020-10-21 18:55:28 +02:00
Harald Welte e31497589a e1-tracer faceplates: Reduce RJ45 cut-out by 0.8mm in height and 0.5mm in width
Tests with prototypes have shown that above the RJ45 jack, there is a
0.95mm gap, and towards both sides there's a total of 0.7mm.  Let's
  reduce that to 0.15mm on top and 0.10mm on either side.

Change-Id: I13b097a76cd9ce96a64ed6fec956d7c918c613f9
2020-10-21 18:55:24 +02:00
Joachim Steiger 40dc1b646b mechanical/e1-tracer: add CAD construction + stripped dxf for a fischer bgt modular faceplate. uses 2x GB4 mounting block (segor)
Change-Id: Idddc6c223fc036919fa035b3cfb1f541b14e4683
2020-10-12 01:53:11 +02:00
Martin Schramm 37e4c576bd mechanical/e1-tracer: add rich CAD construction + stripped dxf for a faceplate
adresses: SYS#5088
Change-Id: I0f7dee896f51e78ead034048bed393f889414ed5
2020-10-11 17:53:26 +02:00
Sylvain Munaut 05ff0a6ea4 Add .gitattribute to make sure pdf are treated as binary
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:42:58 +02:00
Sylvain Munaut 20d9c49b95 hardware/icE1usb: Add GPS protocol specs PDF
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:40:38 +02:00
Sylvain Munaut bd399e96da gateware/icE1usb: Add custom pre-pack optimizations to fix build
Without theses there are too many control-sets generated by yosys and
nextpnr can't find any valid placement.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:40:16 +02:00
Sylvain Munaut 6da9424dcb gateware/cores: Update E1 & USB cores
Mostly to get the support for E1 cross-loopback in icE1usb.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:39:07 +02:00
Sylvain Munaut d420ffc57d gateware/icE1usb: Make single channel a build option
By default build full bitstream, but from env or cli, allow to only
enable RX/TX units in channel 0 to speedup dev / testing.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:26:39 +02:00
Sylvain Munaut 3edf9dd681 gateware/icE1usb: Fix readback of E1 led misc register
e1_led_run is already included in e1_led signal ... (bit 8)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:26:39 +02:00
Sylvain Munaut 0f29d6aca8 gateware: Small tweaks and add option to ignore timing failure
This also allow to override the SEED from command line.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:26:39 +02:00
Sylvain Munaut 488bf8a29f gateware/common: Add register stage for the 'ack' and 'rdata'
This greatly improves timing at the expense of one cycle delay for all
wishbone access to peripherals.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-09 13:05:53 +02:00
Sylvain Munaut 5853197f84 gateware/icE1usb: Replace custom I2C core with SB_I2C wrapper
The hard IP kind of sucks ... but we don't need i2c much (or at
all really) and using the hard IP is nearly free (LC-wise).

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-03 20:52:43 +02:00
Sylvain Munaut 205a131f77 gateware/icE1usb{,-proto}: Make PDM registers write-only
Really we never need to read them and it takes logic to implement
the read-mux for nothing ...
2020-10-03 20:23:41 +02:00
Sylvain Munaut 84717d6895 gateware: Allow override of NO2BUILD_DIR from command line
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-03 20:18:00 +02:00
Sylvain Munaut ff0ab3e383 gateware: Wrap capture/counter units and allow use of SB_MAC16
We have a bunch of Multiply Add units that are un-used, we can
make use of the "accumulate" part to implement the few wide
counters we have to win some LCs.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-03 20:15:28 +02:00
Sylvain Munaut c75f71e319 gateware/common: Add iCE40 optimized register file for picorv32
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-10-03 20:04:19 +02:00