Commit Graph

129 Commits

Author SHA1 Message Date
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
Sylvain Munaut 7b228843ae gateware: Minor syntax fixes
Theses syntax error are ignored by yosys but trying synopsys, it is more
strict, so fix them. Right thing to do anyway ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-22 20:00:13 +02:00
Sylvain Munaut 5e86047024 fw/icE1usb: Update to support production hardware
Also default build to it since very few people would want to build
firmware targetted to the prototypes ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 22:20:21 +02:00
Sylvain Munaut bd83e53ff6 gateware/icE1usb: Initial import of production hardware gateware
Current version has second E1 channel disabled to allow the
build to works. Works is in progress to optimize the gateware and
the fpga toolchain to allow full featured build.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 22:11:29 +02:00
Sylvain Munaut 035e247bf0 fw/ice40-riscv: Fix reboot to bootloader
Address was from previous gateware ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 22:09:53 +02:00
Sylvain Munaut 1ac458f5fa fw/icE1usb: Reorganize fields in misc peripheral
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 22:09:10 +02:00
Sylvain Munaut c1d117b6de gateware/firmware: Match rx/tx tick order in register with doc
The documentation always had the rRX tick in the LSB which
is consistent with having the RX units before TX.

They can be read as 16 bit value anyway so there isn't any
performance impact.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 21:57:52 +02:00
Sylvain Munaut f5d7bf2480 fw/e1-tracer: Import firmware for the E1 tracer board
Some more code could probably be unified with the "normal" usb E1 adapter
to both reduce code duplication but also offer 'sniff' function to the
E1 adapter.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut bc9f5c4219 fw/icE1usb: Import firmware for the icE1usb and icE1usb-proto boards
Currently only the icE1usb-proto is supported. Adaptation for the
final production hardware is yet to be done.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 26bc4659af firmware/ice40-riscv: Import common parts to all iCE40/RISC-V firmwares
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 546493e606 gateware/e1-tracer: Initial import
This is the project specific to the e1-tracer board that was
initially based on the iCEpick with a couple dev boards attached
but eventually consolidated to a proper board, which still retaining
100% electrical compatibility (and thus same gateware and firmware)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut da65157363 gateware/icE1usb-proto: Initial import
This is the project specific to the PMOD based early prototype.
It was used either with the icebreaker or the icebreaker-bitsy
board as host. Set BOARD variable appropriately during build.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 21b03baf47 gateware: Initial import of all common parts
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 1599a58344 hardware/icE1usb: Initial import of the production hardware design files
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 744b441909 hardware/icE1usb-proto: Import the early prototype eagle files
For archival purposes only, shouldn't really be used to produce anything.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 4f5f64d856 mechanical: Import all design files for the icE1usb case
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-13 21:24:07 +02:00
Sylvain Munaut ff64012b21 doc: Import the official specification documents for E1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-13 21:22:55 +02:00
Harald Welte a3750db8a3 Change name of repository in README
Change-Id: I8a4cfb55386ea7eb1dbf90587a2ceb7995dc363f
2020-09-04 13:14:40 +00:00
Harald Welte 2aa6d028a8 software/obsloete: Add sockbuf_test.c from my local tree 2020-09-04 14:57:52 +02:00