targets: fomu: add USBSoC and default to heap placer

The heap placer is important enough that we should just make it the
default.

Also, add a `USBSoC` that includes the required interrupt table, as this
must be specified prior to calling `__init__()`.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-09-17 17:08:05 +08:00
parent 218bd353c1
commit c8e8f254ca
1 changed files with 9 additions and 6 deletions

View File

@ -127,13 +127,8 @@ class BaseSoC(SoCCore):
"csr": 0x60000000, # (default shadow @0xe0000000) "csr": 0x60000000, # (default shadow @0xe0000000)
} }
interrupt_map = {
"usb": 3,
}
interrupt_map.update(SoCCore.interrupt_map)
def __init__(self, board, def __init__(self, board,
pnr_placer=None, pnr_seed=0, usb_core="dummyusb", usb_bridge=False, pnr_placer="heap", pnr_seed=0, usb_core="dummyusb", usb_bridge=False,
**kwargs): **kwargs):
"""Create a basic SoC for Fomu. """Create a basic SoC for Fomu.
@ -214,6 +209,14 @@ class BaseSoC(SoCCore):
if pnr_placer is not None: if pnr_placer is not None:
platform.toolchain.nextpnr_build_template[1] += " --placer {}".format(pnr_placer) platform.toolchain.nextpnr_build_template[1] += " --placer {}".format(pnr_placer)
class USBSoC(BaseSoC):
"""A SoC for Fomu with interrupts for a softcore CPU"""
interrupt_map = {
"usb": 3,
}
interrupt_map.update(SoCCore.interrupt_map)
# Build -------------------------------------------------------------------------------------------- # Build --------------------------------------------------------------------------------------------