Commit Graph

222 Commits

Author SHA1 Message Date
Sean Cross
1f4401fc51 Revert "bitstream: use 32-bit csrs"
While 32-bit CSRs increase performance by 4x, they cause older software
to break.

Consider making this breaking change in 3.0.

This reverts commit bb0b1ff761.
2021-11-25 09:47:18 +08:00
Sean Cross
af4d0631ed hw: specify build name as top
Without this, the generated file becomes `__main__.bin`, which is not
very helpful and breaks some other tools.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-07 09:33:28 +08:00
Sean Cross
c241e4a156 hw: don't add a ROM when there is no CPU
Litex cannot include a ROM file now if there is no CPU present, as this
generates an error.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-07 09:32:51 +08:00
Sean Cross
1712a72c3e hw: fix build after CRG patch
The recent CRG patch was missing the AsyncResetSynchronizer import,
causing the build to fail.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-07 09:31:57 +08:00
Sean Cross
047583e029 deps: sync to latest upstream repos
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-07 09:12:05 +08:00
Florent Kermarrec
0319e2b71c hw/foboot-bitstream: import _CRG from litex_boards to remove dependency on litex_boards.targets.fomu.
This will allow the Fomu target of LiteX-Boards to be uniformized with the others targets.
2020-10-06 09:16:00 +02:00
Sean Cross
abdd5b4fbd lxbuildenv: update to 20.6.1.1
This reduces the need to have so many submodules.

Granted, we didn't have submodules anymore anyway...

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-01 17:14:06 +08:00
Sean Cross
f01995a2cd sync litex version and patch system.h to fix compatibility
The latest version of litex changes the way files are included, which
breaks the build.  This updates the litex repositories, and fixes the
build.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-15 17:50:32 +08:00
Sean Cross
063108418b deps: sync with latest deps
The package `compiler_rt` is now a required depenency.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-28 18:45:27 +08:00
Sean Cross
a899f2800c litex: test sync
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-09 15:10:11 +08:00
Sean Cross
7dba5b348a foboot-bitstream: remove more "litex_boards.partner" entries
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:53:25 +08:00
Sean Cross
e8f2a3f26e foboot-bitstream: remove "partner" path from litex_boards
This changed recently.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:50:30 +08:00
Sean Cross
fdf71bbe12 deps: litex-boards: sync with upstream
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:50:15 +08:00
Sean Cross
8db847fe2e lxbuildenv: update to 2020.2.18.1
This fixes a bug in Python's `sys.exit()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:45:50 +08:00
Sean Cross
bb0b1ff761 bitstream: use 32-bit csrs
This experimental change allows for easier writing of 32-bit registers,
and doesn't appear to adversely affect routing on the ice40.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:35:43 +08:00
Sean Cross
5e33e64464 deps: litex: grab latest version
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:27:53 +08:00
Sean Cross
acb766e058 rtl: sbwarmboot: use upstream litex soc doc
lxsocdoc is no longer maintained.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:24:52 +08:00
Sean Cross
12bb0dba97 bitstream: generate svd as part of build
The svd file can be generated prior to building software, so generate it
as part of the build now rather than after the fact.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:24:09 +08:00
Sean Cross
42c89d12de bitstream: use "minimal" variant rather than "min"
The name "min" was deprecated and is no longer available.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:23:42 +08:00
Sean Cross
be98d4abff bitstream: specify vexriscv_debug in mem_map
This is a requirement of modern litex.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:23:01 +08:00
Sean Cross
4ce54f1b5b bitstream: use upstream litex doc documentation
lxsocdoc is now integrated into upstream litex.

This is required now in order to add new memory sections.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 21:22:40 +08:00
Sean Cross
fa435a44d2 update litex
Signed-off-by: Sean Cross <sean@xobs.io>
2020-02-13 08:18:09 +08:00
Sean Cross
7ced4b7ec2 litex: add csr fixes
Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-30 15:40:55 +08:00
Sean Cross
7bf4238db2 Merge branch 'master' of github.com:im-tomu/foboot 2020-01-29 10:45:56 +08:00
Sean Cross
a67d13e925 rtl: add fomucaptouch
This is an untested block that will replace fomutouch.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-29 10:32:25 +08:00
Sean Cross
3844a9a84c deps: sync with upstream
Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-29 10:32:08 +08:00
Florent Kermarrec
0c2b05cbe6 hw/foboot-bitstream: provide yosys/build_template before override.
Since overridesof the template are done at precise locations (ex: yosys_template[2] += ...),
it's probably better to provide the template in foboot-bitstream. This allow more flexibility
for LiteX's default templates to change/evolve, while also easing foboot-bitstream code understanding.

The override code could also be simplified with the templates provided.
2020-01-02 10:35:37 +01:00
Florent Kermarrec
11f2fa8796 hw/foboot-bitstream: keep up to date with LiteX's iCE40 backend
Arachne-pnr support removed, use yosys/build_template insead of nextpnr_yosys/build_template
2020-01-02 10:35:25 +01:00
Sean Cross
447c5dac48 valentyusb: fix usb reset irq storm
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 22:17:33 +08:00
Sean Cross
bd41cbc2b5 valentyusb: get better-documented version
This improves some documentation around the eptri interface.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 08:56:50 +08:00
Sean Cross
d10fdd580f hw: version: use 8 characters for git revision
By deafult, git only shows 7 characters.  Increase this to 8.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:33:49 +08:00
Sean Cross
c79f831b63 rtl: version: always include git revision
Even when building a tagged release, include the git revision.  This
prevents the git revision from being reported as `00000000`.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 13:07:08 +08:00
Sean Cross
8802d488c5 hw: foboot-bitstream: fix no-cpu build
When building without a CPU, the `self.cpu` property is not None, but
rather CPUNone.  This change was made upstream and broke no-cpu builds.

Fix these builds by checking for an instance of CPUNone.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 13:44:15 +08:00
Sean Cross
77632b0c9f rtl: sbled: fix pin mapping for EVT
The blue and green channels were swapped.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-27 13:24:59 +08:00
Sean Cross
249404cf41 deps: sync latest versions of dependencies
This just ensures we're forwards-compatible.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 13:24:10 +08:00
Sean Cross
f36a52453e hw: bitstream: move memory range for litex compatability
The latest version of litex requires that we move this memory range up
by 0x80000000 to build.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 12:53:54 +08:00
Sean Cross
24a9d7e4c7 hw: define C macros indicating hardware revision
These macros can be used by the bios to indicate hardware revision.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 09:34:00 +08:00
Sean Cross
405918134e foboot-bitstream: encode spi flash information into platform
Different platforms have different spi flash sizes and different numbers
of dummy bits to send.  Encode this information in the platform to
simplify spi flash addition.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 21:58:38 +08:00
Sean Cross
c376d30811 hw: deps: update litex-boards to have hacker spiflash4x
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 21:58:09 +08:00
Sean Cross
95e6e8c211 deps: litex-boards: add moduledoc for fomu crg
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 14:13:36 +08:00
Sean Cross
f751f51722 foboot-bitstream: move "reset" block below USB pads
This keeps the modules in an order that roughly matches the memory
order.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 13:57:49 +08:00
Sean Cross
b40530df41 foboot-bitstream: fix comments and reorder to improve timing
Reordering the file seems to improve timing by quite a lot, even after
adjusting the pnr seed.  With this reordering we now meet timing.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 13:29:08 +08:00
Sean Cross
824470a974 foboot-bitstream: start documenting soc
lxsocdoc can't yet document this, but add it anyway in preparation.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 12:57:09 +08:00
Sean Cross
45e3b5b617 rtl: break foboot modules into their own files
These are all independent modules, so break each one out into its own
file.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-23 10:03:56 +08:00
Sean Cross
c8e632dd7e foboot: version: work even if git is untagged
Allow the "version" block to not crash python when the git repository is
untagged or doesn't exist.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:53:50 +08:00
Sean Cross
ce777d5057 bitstream: touch: remove "field" support to fix inputs
The "touch" block doesn't need field support, since it's just one field.
Remove support, which simplifies the layout and unbreaks "input"
support.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:47:37 +08:00
Sean Cross
d6292f5dd3 foboot-bitstream: use little-endian for SPI device
If we don't do this, then the words will all be backwards.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 22:04:45 +08:00
Sean Cross
99f36ceca4 litex-boards: fix pin mapping on pvt
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 18:58:15 +08:00
Sean Cross
2d8b8cb047 foboot-bitstream: fix conflict with spibone
Previously, we had two different spibone implementations due to a failed
merge.  This removes the second one.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 11:37:27 +08:00
Sean Cross
1f91f81f8e eptri: work-in-progress to get eptri working
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 08:03:35 +08:00