Commit Graph

31 Commits

Author SHA1 Message Date
Sylvain Munaut c756644205 gateware: no_rw_check fixes to cope with new yosys BRAM inferrence
Signed-off-by: Sylvain Munaut <>
Change-Id: Ic27dc22112f6603982126d447689dbe2202039c4
2022-10-04 21:34:56 +02:00
Sylvain Munaut 112d858a4d gateware/build: Update submodule
Signed-off-by: Sylvain Munaut <>
Change-Id: Ib61dac16fc2399b8b357ec8ba8e7f19e2c79b4d8
2022-08-25 17:05:01 +02:00
Sylvain Munaut 0685eddc1f gateware/icE1usb: Use custom I2C core by default rather than SB_I2C
SB_I2C is apparently just a pain to use and buggy and such, so
use our custom one.

Signed-off-by: Sylvain Munaut <>
Change-Id: I1596ccbf03dd4450f519fe9b54a7fece125a7fbc
2022-05-03 14:00:35 +02:00
Sylvain Munaut 0c1684e5ae gateware/icE1usb: Set divider of I2C core to be ~ 400 kHz
Signed-off-by: Sylvain Munaut <>
Change-Id: I1dd4ab34da9d01b599cf9c782e721aaee9b8740d
2022-05-03 14:00:35 +02:00
Sylvain Munaut 921f4779f5 gateware/icE1usb: Replace local I2C core with no2misc one
This core has been merged (and improved) upstream, so
update the submodule, remove local copy and make the required

Signed-off-by: Sylvain Munaut <>
Change-Id: I79fca561fee32bbaec94882b4f65c7ecaa44be11
2022-05-03 14:00:35 +02:00
Sylvain Munaut 9e02d4cd99 gateware/icE1usb: Typo in instance names
Signed-off-by: Sylvain Munaut <>
Change-Id: I7db544b4ff98fcfc382193f040550f377178aebf
2022-05-03 14:00:35 +02:00
Sylvain Munaut f12087fed3 gateware/icE1usb: Don't let nextpnr promote globals
We manually use global buffers for the signals that need to be
global, don't let nextpnr heuristic mess with things.

Signed-off-by: Sylvain Munaut <>
Change-Id: I5dc5f2f39dca933b2570cbe4e26d9d7fd2a44688
2022-05-03 14:00:35 +02:00
Sylvain Munaut 90ca05dd54 gateware/common: Unify a bit with other repo
This just pulls in some small update in various files shared
by several repository. It's mostly comment and formatting, nothing
functionnal really.

Signed-off-by: Sylvain Munaut <>
Change-Id: Icb7bea1cf7243e9ace819cd567eb006fcc71c808
2022-05-02 20:45:08 +02:00
Sylvain Munaut 70c10f05cf icE1usb fw: Expose the GPS NMEA data as a CDC ACM
Note that this is read-only. We drop all data from the host
because we can't have the host reconfigure the module ...

Signed-off-by: Sylvain Munaut <>
Change-Id: Ieb6a653ece882c5f90ab27da1bca04c94184dc5a
2022-01-13 13:21:29 +01:00
Sylvain Munaut 4d9aea44ef gateware/cores: Update USB core
Mostly to get firmware code improvement and fixes

Signed-off-by: Sylvain Munaut <>
Change-Id: Ifacacd15f989aa51c04433cfb0bdaee7f848b658
2022-01-05 22:14:47 +01:00
Sylvain Munaut 348f425936 gateware: Update submodules
Not much change in e1, just a typo fix that just triggered a warning.
In usb the only relevant change is a fix in the stack code that caused
GET_INTERFACE to fail for interfaces without alt-settings

Signed-off-by: Sylvain Munaut <>
Change-Id: Idfe712f7a2173e5c5f9552f35136f1d732098139
2021-05-31 14:01:39 +02:00
Harald Welte 5ab1c6e919 gateware/ Fix typo (CERL->CERN)
Change-Id: Ic1d0cad46a37a00714fa9b0cec5aa98ec9805a47
2020-11-04 15:54:25 +01:00
Sylvain Munaut 4ea7d27764 firmware/ice40-riscv: Update no2usb core and fixup for API changes
Signed-off-by: Sylvain Munaut <>
Change-Id: Ia6bda410e2529858cb86827e186bb099b9b87799
2020-10-29 13:17:11 +01:00
Sylvain Munaut bbe3e28052 gateware/common: Fix whitespace formatting in wb_epbuf
Signed-off-by: Sylvain Munaut <>
Change-Id: I4298b198ce02347de05d974458e98f44200adf63
2020-10-28 00:43:13 +01: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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
2020-09-22 20:00:13 +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 <>
2020-09-15 22:11:29 +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 <>
2020-09-15 21:57:52 +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 <>
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 <>
2020-09-14 10:56:49 +02:00
Sylvain Munaut 21b03baf47 gateware: Initial import of all common parts
Signed-off-by: Sylvain Munaut <>
2020-09-14 10:56:49 +02:00