Commit graph

209 commits

Author SHA1 Message Date
Florent Kermarrec
3b293612a8 soc/interconnect/axi: minor cleanups. 2020-08-05 12:11:28 +02:00
Florent Kermarrec
303d6cca7e interconnect/stream: set default AsyncFIFO depth to None and add depth parameter to ClockDomainCrossing. 2020-08-05 12:11:12 +02:00
Florent Kermarrec
00629c45b0 interconnect/csr: add CSR registers ordering support.
The original CSR registers ordering (big: MSB on lower addresses) is not convenient
when the SoC is interfaced with a real OS (for example as a PCIe add-on board or
with a CPU running Linux).

With this, the original ordering is kept as default (big), but it can now be switched
to little to avoid software workarounds in drivers and should probably be in the future
the default for PCIe/Linux SoCs.
2020-08-05 08:57:19 +02:00
Florent Kermarrec
ee7a7f4693 soc/interconnect/csr: improve ident. 2020-08-05 07:59:35 +02:00
Florent Kermarrec
b831dc8c55 wishbone: revert default adr_width to 30. 2020-08-04 19:55:46 +02:00
Florent Kermarrec
a5d0a340c3 test: specify wishbone adr_width on AXI(Lite)<-->Wishbone tests and remove debug traces. 2020-08-04 09:39:23 +02:00
Gabriel Somlo
561331ed97 debug: make CI print offending values 2020-08-03 16:59:39 -04:00
Gabriel Somlo
70eae5cbf9 interconnect/wishbone: increase WB address width to 31
This is needed to support memory regions up to 4GB in size (currently
limited to 2GB, or 0x8000_0000).

FIXME: CI complains about assertions re. axi_lite.address_width in
       relationship to len(wishbone.adr) and wishbone_adr_shift, which
       seems to be a problem on the 32bit (vexriscv?) CPU used for CI,
       but seems to work fine on Rocket.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>

foo
2020-08-03 16:11:26 -04:00
Gabriel Somlo
b8c9da81ea soc/interconnect/axi: add Wishbone2AXI converter 2020-08-03 12:50:00 -04:00
Jędrzej Boczar
e78d950a31 soc/interconnect/axi: add AXILite -> AXI converter 2020-07-30 13:50:34 +02:00
Jędrzej Boczar
879e6ffe73 soc/interconnect/axi: add basic AXI Lite up-converter 2020-07-24 13:47:18 +02:00
Jędrzej Boczar
32160e615f soc/interconnect/axi: separate AXI Lite converter channels 2020-07-24 09:25:57 +02:00
Jędrzej Boczar
706bc25dc1 soc/integration: add bus standard parser arguments 2020-07-22 17:16:33 +02:00
Jędrzej Boczar
32d9e212c5 soc/interconnect/axi: improve Timeout module and test it with shared interconnect 2020-07-22 17:16:33 +02:00
Jędrzej Boczar
2cab7fbf0f test/axi: add shared AXI Lite interconnect tests 2020-07-22 17:16:33 +02:00
Jędrzej Boczar
3a08b21d44 soc/interconnect/axi: implement AXI Lite decoder 2020-07-22 17:16:33 +02:00
Jędrzej Boczar
214cfdcaeb soc/interconnect/axi: lock AXILiteArbiter until all requests have been responded to 2020-07-22 17:16:33 +02:00
Jędrzej Boczar
a8a583d6b4 socinterconnect/axi: interconnect shared sketch 2020-07-22 17:16:26 +02:00
Jędrzej Boczar
f47ccdae99 soc/interconnect/axi: point-to-point interconnect and timeout module with tests 2020-07-22 17:16:12 +02:00
Jędrzej Boczar
b4c1120e3d soc/integration: choose interconnect based on bus standard 2020-07-22 17:16:07 +02:00
Florent Kermarrec
47ce15b431 interconnect/wishbone: add minimal UpConverter. 2020-07-21 19:35:14 +02:00
Ilia Sergachev
8656ea9b67 interconnect/csr_bus: fix paged access warning 2020-07-20 18:23:09 +02:00
Jędrzej Boczar
229da572ff soc/interconnect/axi: propagate response errors in AXILiteDownConverter 2020-07-16 17:16:35 +02:00
Jędrzej Boczar
93bcc94b53 soc/interconnect/axi: implement AXILite down-converter 2020-07-16 17:02:49 +02:00
Jędrzej Boczar
2700ec3ce5 soc/integration: use AXILiteConverter (dummy implementation) in add_adapter() 2020-07-15 15:59:16 +02:00
Jędrzej Boczar
f3072d4984 soc/interconnect/axi: add connect methods for convenience 2020-07-15 15:48:40 +02:00
Jędrzej Boczar
78a631f392 test/axi: add AXILite2CSR and AXILiteSRAM tests 2020-07-15 12:40:39 +02:00
Jędrzej Boczar
a5be2cd257 soc/interconnect/axi: improve SRAM/CSR access speed 2020-07-15 11:44:14 +02:00
Jędrzej Boczar
d8a242d86f soc/interconnect: add AXILite SRAM 2020-07-15 10:58:34 +02:00
Jędrzej Boczar
b692b2a3f1 soc/interconnect: add AXILite2CSR bridge 2020-07-15 10:36:34 +02:00
Florent Kermarrec
b54b3b3362 interconnect/avalon: minor cleanup, remove max on SyncFIFO depth. 2020-07-08 07:53:42 +02:00
Florent Kermarrec
f0a97791a9 interconnect/csr_bus: move/rewrite paged access warning.
Was incorrectly triggered with csr_data_width=32.
2020-07-06 12:26:24 +02:00
Florent Kermarrec
9e46195299 interconnect/csr_bus: remove 64-bit CSR bus alignment support (no longer supported in SoCs). 2020-07-06 09:51:32 +02:00
Florent Kermarrec
e6b94b1663 interconnect/stream: allow empty description/payload on Endpoint. 2020-07-03 19:29:05 +02:00
Florent Kermarrec
2c53f9b2ff interconnect/stream: add ClockDomainCrossing wrapper around AsyncFIFO. 2020-07-03 14:39:31 +02:00
Florent Kermarrec
34e9d12ef2 interconnect/axi/AXIStreamInterface: add tuser support. 2020-06-26 08:36:16 +02:00
Florent Kermarrec
0c0689f444 wishbone/DownConverter: fix read datapath when access is skipped because sel = 0.
We also need to shift dat_r when acess is skipped.
2020-06-22 13:37:14 +02:00
Florent Kermarrec
395af900fd interconnect/wishbone/DownConverter: skip accesses on slave when sel==0 and simplify.
Improve efficiency for 64-bit CPU accessing only the 32-bit LSBs/MSBs.
2020-06-01 11:06:23 +02:00
Florent Kermarrec
511832a911 soc/interconnect/axi: generate wishbone.sel for reads. 2020-06-01 10:58:45 +02:00
Florent Kermarrec
759367752c wishbone/wishbone2csr: use wishbone.sel on CSR write.
CSR write is only done if wishbone.sel != 0. This should avoid the need for 64-bit
CSR alignment on 64-bit CPUs since a 64-bit Wishbone write access targeting only the
32-bit LSB or MSB will be splitted in 2x32-bit accesses: one with sel=0xf, one with sel=0.
2020-05-30 15:22:02 +02:00
Florent Kermarrec
ab80606036 soc/core/uart: move WishboneStreamingBridge in it and rename to Stream2Wishbone. 2020-05-27 18:40:45 +02:00
Florent Kermarrec
0a3d649ad8 interconnect/wishbone: integrate Wishbone2CSR. 2020-05-27 18:15:05 +02:00
Florent Kermarrec
b5b88d27b5 interconnect/csr_bus: add separators. 2020-05-27 18:13:57 +02:00
Florent Kermarrec
86952a6e06 interconnect/wishbone: remove CSRBank (probably not used by anyone). 2020-05-27 18:04:08 +02:00
Florent Kermarrec
e404608cf4 interconnect/wishbone: add separators and move SDRAM/Cache. 2020-05-27 17:59:33 +02:00
Florent Kermarrec
1fddd0e3d3 interconnect/wishbone: simplify DownConverter. 2020-05-27 17:34:11 +02:00
Florent Kermarrec
e0d2682055 interconnect/wishbone: remove UpConverter (probably not used by anyone and would need to be rewritten).
We'll provide a better implementation if this is useful.
2020-05-27 15:27:33 +02:00
Florent Kermarrec
3a6dd95d6f integration/soc: review/simplify changes for standalone cores.
- do the CSR alignment update only if CPU is not CPUNone.
- revert PointToPoint interconnect when 1 master and 1 slave since this will
break others use cases and will prevent mapping slave to a specific location.
It's probably better to let the synthesis tools optimize the 1:1 mapping directly.
- add with_soc_interconnect parameter to add_sdram that defaults to True. When
set to False, only the LiteDRAMCore will be instantiated and interconnect with
the SoC will not be added.
2020-05-12 16:18:26 +02:00
enjoy-digital
0d5eb13359
Merge pull request #511 from ozbenh/standalone-cores
Improve standalone cores
2020-05-12 14:55:44 +02:00
Florent Kermarrec
873d95e517 interconnect/wishbonebridge: refresh/simplify.
This should also improve Wishbone timings.

Tested on iCEBreaker:
./icebreaker.py --cpu-type=None --uart-name=uartbone --csr-csv=csr.csv --build --flash

With the following script:

#!/usr/bin/env python3

import sys

from litex import RemoteClient

wb = RemoteClient()
wb.open()

# # #

print("scratch: 0x{:08x}".format(wb.regs.ctrl_scratch.read()))

errors = 0
for i in range(2):
for j in range(32):
wb.write(wb.mems.sram.base + 4*j, i + j)
for j in range(32):
if wb.read(wb.mems.sram.base + 4*j) != (i + j):
errors += 1
print("sram errors: {:d}".format(errors))

# # #

wb.close()
2020-05-12 13:40:28 +02:00