From: Sebastien Bourdeauducq Date: Mon, 25 Nov 2013 14:08:53 +0000 (+0100) Subject: targets/simple: map SPI flash X-Git-Tag: 24jan2021_ls180~2763 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=356178e68067822ce2d03c09403a1720e4e7abe1;p=litex.git targets/simple: map SPI flash --- diff --git a/targets/simple.py b/targets/simple.py index 5829af46..90c65d4b 100644 --- a/targets/simple.py +++ b/targets/simple.py @@ -1,6 +1,6 @@ from migen.fhdl.std import * -from misoclib import gpio +from misoclib import gpio, spiflash from misoclib.gensoc import GenSoC, IntegratedBIOS class SimpleSoC(GenSoC, IntegratedBIOS): @@ -18,5 +18,10 @@ class SimpleSoC(GenSoC, IntegratedBIOS): self.submodules.leds = gpio.GPIOOut(platform.request("user_led")) + # Map the SPI flash at 0xb0000000 for demo purposes. Later, we'll want to store the BIOS there. + self.submodules.spiflash = spiflash.SpiFlash(platform.request("spiflash2x"), + cmd=0xefef, cmd_width=16, addr_width=24, dummy=4) + self.add_wb_slave(lambda a: a[26:29] == 3, self.spiflash.bus) + def get_default_subtarget(platform): return SimpleSoC