Commit Graph

16 Commits

Author SHA1 Message Date
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 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 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 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