Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make gateware fails on base target for platform ice40_up5k_b_evn #125

Closed
kamejoko80 opened this issue Apr 2, 2019 · 7 comments
Closed

Comments

@kamejoko80
Copy link

Hello,

I got FPGA placement error when building gateware for platform ice40_up5k_b_evn, here are my steps below:

export CPU=vexriscv
export TARGET=base
export PLATFORM=ice40_up5k_b_evn
export FIRMWARE=micropython
source scripts/enter-env.sh
make gateware

Error log:

`Info: Device utilisation:
Info: ICESTORM_LC: 8179/ 5280 154%
Info: ICESTORM_RAM: 28/ 30 93%
Info: SB_IO: 16/ 96 16%
Info: SB_GB: 8/ 8 100%
Info: ICESTORM_PLL: 0/ 1 0%
Info: SB_WARMBOOT: 0/ 1 0%
Info: ICESTORM_DSP: 0/ 8 0%
Info: ICESTORM_HFOSC: 0/ 1 0%
Info: ICESTORM_LFOSC: 0/ 1 0%
Info: SB_I2C: 0/ 2 0%
Info: SB_SPI: 0/ 2 0%
Info: IO_I3C: 0/ 2 0%
Info: SB_LEDDA_IP: 0/ 1 0%
Info: SB_RGBA_DRV: 0/ 1 0%
Info: ICESTORM_SPRAM: 4/ 4 100%

Info: Placed 16 cells based on constraints.
Info: Creating initial placement for remaining 8219 cells.
Info: initial placement placed 500/8219 cells
Info: initial placement placed 1000/8219 cells
Info: initial placement placed 1500/8219 cells
Info: initial placement placed 2000/8219 cells
Info: initial placement placed 2500/8219 cells
Info: initial placement placed 3000/8219 cells
Info: initial placement placed 3500/8219 cells
Info: initial placement placed 4000/8219 cells
Info: initial placement placed 4500/8219 cells
Info: initial placement placed 5000/8219 cells
ERROR: failed to place cell '$abc$60802$auto$blifparse.cc:492:parse_blif$63173_LC' of type 'ICESTORM_LC'
ERROR: Placing design failed.
1 warning, 2 errors
Traceback (most recent call last):
File "./make.py", line 164, in
main()
File "./make.py", line 148, in main
vns = builder.build(**dict(args.build_option))
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/soc/integration/builder.py", line 171, in build
toolchain_path=toolchain_path, **kwargs)
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/soc/integration/soc_core.py", line 406, in build
return self.platform.build(self, *args, **kwargs)
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/build/lattice/platform.py", line 29, in build
return self.toolchain.build(self, *args, **kwargs)
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/build/lattice/icestorm.py", line 183, in build
_run_script(script)
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/build/lattice/icestorm.py", line 64, in _run_script
raise OSError("Subprocess failed")
OSError: Subprocess failed

real 2m26.098s
user 2m20.784s
sys 0m3.416s
Makefile:260: recipe for target 'gateware' failed
make: *** [gateware] Error 1
`

@kamejoko80
Copy link
Author

kamejoko80 commented Apr 2, 2019

Oh, I see this line "Info: ICESTORM_LC: 8179/ 5280 154%", the ICESTORM_LC exceed maximum LC of the device. Is there any option to build vexriscv as minimal resource?

@mithro
Copy link
Member

mithro commented Apr 2, 2019

export CPU_VARIANT=minimal  # Use a resource-constrained variant to make up5k happy

@mithro
Copy link
Member

mithro commented Apr 2, 2019

You can take a look at the following Wiki page - https://github.com/timvideos/litex-buildenv/wiki/HowTo-FuPy-on-iCE40-Boards

GitHub
An environment for building LiteX based FPGA designs. Makes it easy to get everything you need! - timvideos/litex-buildenv

@mithro
Copy link
Member

mithro commented Apr 2, 2019

I guess we should also add a check which prevents non-CPU_VARIANT=minimal version on the iCE40?

@kamejoko80
Copy link
Author

@mithro

Thanks for the reply
CPU_VARIANT=minimal seams don't work with vexriscv, however it is ok with lm32.
Below is the error build log:

mkdir -p build/ice40_up5k_b_evn_base_vexriscv.minimal/
time python -u ./make.py --platform=ice40_up5k_b_evn --target=base --cpu-type=vexriscv --iprange=192.168.100 --cpu-variant=minimal
2>&1 | tee -a /home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/build/ice40_up5k_b_evn_base_vexriscv.minimal//output.20190408-224923.log; (exit ${PIPESTATUS[0]})
Traceback (most recent call last):
File "./make.py", line 164, in
main()
File "./make.py", line 123, in main
soc = get_soc(args, platform)
File "./make.py", line 57, in get_soc
soc = SoC(platform, ident=SoC.name, **soc_sdram_argdict(args), **dict(args.target_option))
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/targets/ice40_up5k_b_evn/base.py", line 83, in init
SoCCore.init(self, platform, clk_freq, **kwargs)
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/soc/integration/soc_core.py", line 187, in init
self.add_cpu(vexriscv.VexRiscv(platform, self.cpu_reset_address, self.cpu_variant))
File "/home/phuong/Workspace/litex-buildenv/HDMI2USB-litex-firmware/third_party/litex/litex/soc/cores/cpu/vexriscv/core.py", line 20, in init
assert variant in variants, "Unsupported variant %s" % variant
AssertionError: Unsupported variant minimal

real 0m0.256s
user 0m0.240s
sys 0m0.012s
Makefile:260: recipe for target 'gateware' failed
make: *** [gateware] Error 1
(LX P=ice40_up5k_b_evn C=vexriscv.minimal F=micropython) phuong@ubuntu1604lts:~/Workspace/litex-buildenv/HDMI2USB-litex-firmware$

@mithro
Copy link
Member

mithro commented Apr 8, 2019

Looks like for vexriscv the valid values are;

"std", "std_debug", "lite", "lite_debug", "min", "min_debug"

Try export CPU_VARIANT=min

@mithro
Copy link
Member

mithro commented Apr 8, 2019

Logged enjoy-digital/litex#159 about having consistent variant naming across CPU types.

futaris pushed a commit to futaris/litex-buildenv that referenced this issue Apr 25, 2019
 * litedram changed from f36bcff to 30d9a3e
    * 30d9a3e - modules: add MT40A1G8 DDR4 <Florent Kermarrec>
    * 4459bd2 - frontend/axi: same condition to connect connect wdata.we and wdata <Florent Kermarrec>
    * d10e2e9 - core: make address_mapping a controller setting <Florent Kermarrec>
    * 7973b7d - frontend/axi: emits the write command only if we have the write data <Florent Kermarrec>
    * 6fa891d - frontend/axi: fix write response for bursts <Florent Kermarrec>
    * 93e8510 - test/test_axi: add bursts to axi2native <Florent Kermarrec>
    * e27fbc2 - test/test_axi: move definitions to top and make Access herit from Burst <Florent Kermarrec>
    * 4470f32 - test/test_axi: change order of the tests <Florent Kermarrec>
    * 070cc26 - test/test_axi: use separate generator for writes cmd/data <Florent Kermarrec>
    * 127e928 - frontend/wishbone: simplify LiteDRAMWishbone2Native code (resource usage almost the same) <Florent Kermarrec>
    * ca82ac1 - frontend/wishbone: add LiteDRAMWishbone2AXI <Florent Kermarrec>
    * 3586e15 - frontend/axi: improve len/size comment (-1), set default id_width to 1 <Florent Kermarrec>
    * 71be616 - frontend/axi: be sure wdata is available before sending the command to the controller <Florent Kermarrec>
    * 55b5f40 - modules: add AS4C256M16D3A <Florent Kermarrec>
    *   69ea866 - Merge pull request timvideos#62 from daveshah1/AS4C32M16 <enjoy-digital>
    |\
    | * 3a5d45b - modules: Add AS4C32M16 32Mx16 SDRAM <David Shah>
    * | b41fe61 - phy/kusddrphy/ddr4: multiplexed address bits are always the same (14, 15, 16) and fix ba/bg ordering <Florent Kermarrec>
    * | 2e19787 - phy/kusddrphy: add dfi mux on address/control signals <Florent Kermarrec>
    * | a8c3d39 - sdram_init: fix compilation <Florent Kermarrec>
    * | af34489 - common: add DDR4 burst_length <Florent Kermarrec>
    * | 2a9fb11 - phy/kusddrphy: more genericity, initial DDR4 support <Florent Kermarrec>
    * | ae5dc9f - sdram_init: add initial DDR4 initialization <Florent Kermarrec>
    * | 8181fea - modules: add EDY4016A DDR4 <Florent Kermarrec>
    * | 346e64c - frontend/ecc: fix typo <Florent Kermarrec>
    |/
    * 82c08c7 - phy/gensdrphy: use tristate input <Florent Kermarrec>
    * 9ce84d9 - modules: add MT48LC16M16 (ulx3s) <Florent Kermarrec>

 * liteeth changed from 40b99ec to 52c2301
    * 52c2301 - frontend/etherbone: reduce default buffer_depth to 4 <Florent Kermarrec>
    * 602ddec - common: use reverse_bytes from litex.gen <Florent Kermarrec>

 * litepcie changed from a8b8048 to 48f662e
    * 48f662e - phy/s7pciephy: force user to use register_pll1 if pll1 is needed <Florent Kermarrec>
    * 33f4601 - phy/s7pciephy: add register_pll1 method <Florent Kermarrec>
    * 80f28b1 - common: use reverse_bits/reverse_bytes from litex.gen <Florent Kermarrec>

 * litex changed from v0.1-532-g98159209 to v0.1-602-gbc173380
    *   bc173380 - Merge pull request timvideos#126 from mithro/toolchain-fix <Tim Ansell>
    |\
    | * b1425ba8 - lattice/icestorm: Add toolchain_path so it doesn't end up kwargs. <Tim 'mithro' Ansell>
    |/
    * af25bf2b - soc_core: check for cpu before checking interrupt <Florent Kermarrec>
    * b4bdf2a0 - cores/clock/S7: just reset the generated clock, not the PLL/MMCM <Florent Kermarrec>
    * 86fd945b - bios/main: fix typo on mor1kx <Florent Kermarrec>
    * af950285 - cpu/mor1kx: use clang only for linux variant <Florent Kermarrec>
    * 04523bc2 - xilinx/vivado: fix migen merge <Florent Kermarrec>
    * f3343c46 - platforms: remove versaecp55g_sdram <Florent Kermarrec>
    * 58414b18 - build/xilinx/vivado: merge migen change <Florent Kermarrec>
    * a7f17f99 - build: use default toolchain_path on all backend when passed value is None <Florent Kermarrec>
    * eed1d5cb - generic_platform: use set for sources <Florent Kermarrec>
    * 665fff83 - build: merge more migen changes <Florent Kermarrec>
    * 70f48775 - platforms/versa_ecp5: import migen changes <Florent Kermarrec>
    * 4ff241b9 - targets/ulx3s,versa_ecp5: prjtrellis toolchain renamed to trellis <Florent Kermarrec>
    * cb86728a - build/lattice: import changes from migen <Florent Kermarrec>
    * 8574c62f - targets/versa_ecp5: increase sys_clk_freq to 50MHz <Florent Kermarrec>
    * a752dafb - targets: add versa_ecp5 with sdram (ecp5 soc hat) at 25MHz/no pll <Florent Kermarrec>
    * 87c7d23d - targets/ulx3s: for now revert to 25MHz clock/no pll <Florent Kermarrec>
    * d1baae36 - platforms/versa_ecp5: add ecp5 soc hat ios <Florent Kermarrec>
    *   b3bf1c95 - Merge branch 'master' of http://github.com/enjoy-digital/litex <Florent Kermarrec>
    |\
    | *   1be6762d - Merge pull request timvideos#125 from daveshah1/trellis_sdram <enjoy-digital>
    | |\
    | | * f08f80be - working on Versa-5G dram <David Shah>
    | | * d78d5d3e - Debugging ULX3S SDRAM <David Shah>
    * | | 425ad755 - plarforms: rename versa/versaecp55g to versa_ecp3/versa_ecp5 <Florent Kermarrec>
    |/ /
    * | c57aa545 - targets/ulx3s: get memtest working by disabling sdram refresh <Florent Kermarrec>
    * | 9a644717 - soc/integration/soc_sdram: allow using axi interface with litedram <Florent Kermarrec>
    * | 416bdb64 - boards/platforms: add avalanche polarfire board ios definition <Florent Kermarrec>
    * | fc0d5c39 - bios/sdram: iterate multiple time for write leveling and add vote to eliminate transcients <Florent Kermarrec>
    * | 09f962fd - target/kcu105: add reset button <Florent Kermarrec>
    * | 169f8d8c - boards/platforms/kcu105: fix sdram/dq pin swap <Florent Kermarrec>
    * | 2624ba48 - bios/sdram: replace DDR3_MR1 constant with DDRX_MR1 <Florent Kermarrec>
    * | 6be74aa1 - boards/targets: add kcu105 <Florent Kermarrec>
    * |   93c62325 - Merge pull request timvideos#122 from daveshah1/trellis_ulx3s <enjoy-digital>
    |\ \
    | |/
    | * 0729b3a0 - ulx3s: Connect SDRAM clock <David Shah>
    | * 84044349 - Fix Trellis build; ULX3S demo boots to BIOS <David Shah>
    | * 0c1d8d59 - trellis: Switch to using LPF for constraints <David Shah>
    * |   00ef8240 - Merge pull request timvideos#124 from jfng/master <enjoy-digital>
    |\ \
    | * | dcbe759b - build/sim/verilator: don't use --threads when $(THREADS) is unset <Jean-François Nguyen>
    |/ /
    * | 6f38213a - boards/platforms/kc705: add user_sma_mgt_refclk <Florent Kermarrec>
    * |   4cdd6799 - Merge pull request timvideos#123 from cr1901/prv32-min <enjoy-digital>
    |\ \
    | * | e56f7182 - libbase/crt0-picorv32: Emulate support for a relocatable IRQ vector (hardcoded at synthesis time). <William D. Jones>
    | * | f32121e0 - cpu/picorv32: IRQ vector needs to be moved to 16 bytes after the RESET vector. <William D. Jones>
    | * | 77389d27 - libbase/crt0-picorv32: Ensure BSS is cleared on boot. <William D. Jones>
    | * | f69bd877 - cpu/picorv32: Create minimal variant (disable mul/div insns, most speed optimizations). <William D. Jones>
    | * | d05fe673 - cpu/picorv32: Extract picorv32 parameters from Instance constructor to facilitate creating variant CPUs. <William D. Jones>
    * | | f7969b66 - cores/clock: add with_reset parameter (default to True) <Florent Kermarrec>
    | |/
    |/|
    * | 445c4940 - boards/platforms/kcu105: add sfp_tx/rx definition <Florent Kermarrec>
    |/
    * e9d4c882 - build/lattice/prjtrellis: fix default toolchain_path <Florent Kermarrec>
    * 468780c0 - soc/cores/spi_flash: add endianness parameter <Florent Kermarrec>
    * 6f3131e2 - soc/interconnect/stream_packet: use reverse_bytes from litex.gen <Florent Kermarrec>
    * b7968538 - gen: add common with reverse_bits/reverse_bytes functions <Florent Kermarrec>
    * 71fc34d7 - boards/targets/ulx3s: reduce l2_size <Florent Kermarrec>
    * 75d073f3 - build/lattice/prjtrellis: fix typo <Florent Kermarrec>
    * 6048a529 - build/lattice/prjtrellis: modify generated verilog instead of creating a wrapper, handle inouts. <Florent Kermarrec>
    * 2243f628 - build/lattice/common: fix LatticeECPXPrjTrellisTristateImpl <Florent Kermarrec>
    *   3a8bb94a - Merge pull request timvideos#121 from cr1901/patch-3 <Tim Ansell>
    |\
    | * f3111e11 - Update vivado.py <William D. Jones>
    |/
    * 98fa8996 - boards/targets: add ulx3s <Florent Kermarrec>
    * 7d779473 - boards/platforms: add ulx3s <Florent Kermarrec>
    * d9dcad33 - build/lattice/prjtrellis: add inout support <Florent Kermarrec>
    * 091ad799 - build/lattice/common: add tristate support <Florent Kermarrec>
    * 23acefb1 - boards/targets/versaecp55g_prjtrellis: simple.py example working, specific target no longer needed <Florent Kermarrec>
    * 1097f822 - build/lattice/prjtrellis: set default toolchain_path to "/opt/prjtrellis" <Florent Kermarrec>
    * 52917a71 - boards/targets/simple: add gateware-toolchain parameter <Florent Kermarrec>
    * d84083f6 - boards/platforms/versaecp55g: use ftdi serial pins <Florent Kermarrec>
    * c05b9ef2 - build/lattice/prjtrellis: test and fix iowrapper multi-bit signals support <Florent Kermarrec>
    * a8f819fe - Merge branch 'master' of http://github.com/enjoy-digital/litex <Florent Kermarrec>
    * 4eb314a2 - boards/targets/versaecp55g: use new iowrapper support, basic led blink and ios working :) <Florent Kermarrec>
    * 27ec2a59 - build/lattice/prjtrellis: generate iowrapper to set constraints and TRELLIS_IO <Florent Kermarrec>
    * c506c975 - gen/fhdl/verilog: set direction to io signals <Florent Kermarrec>

 * migen changed from 0.6.dev-179-g657c0c7 to 0.6.dev-209-gc285c12
    * c285c12 - genlib/fsm: allow subclassing FSM and overriding control functionality. <whitequark>
    * dd78f38 - sim/core: fix typo breaking `yield x.part(...).eq(...)`. <whitequark>
    * f8bea17 - test/test_fsm: fix typo. <whitequark>
    * 319d3cd - build: use default toolchain_path on all backends when toolchain_path passed value is None <Florent Kermarrec>
    * e7c9ab0 - xilinx/vivado: fix missing **kwargs <Florent Kermarrec>
    * 8789575 - xilinx/vivado: fix edifs/ips import <Florent Kermarrec>
    * 5851076 - build: make sure build_name/kwargs are passed to platform.get_verilog on all backends <Florent Kermarrec>
    * ec40e98 - xilinx/vivado: enable xpm libraries <Florent Kermarrec>
    * 21bb0f7 - xilinx/vivado: add support for importing edifs for ips <Florent Kermarrec>
    * 263e729 - xilinx/programmer: add device parameter <Florent Kermarrec>
    * f71b4a8 - xilinx/ise: set build_name as top name <Florent Kermarrec>
    * 2dc085d - lattice/common: no need to differentiate nbits==1 and nbits > 1 <Florent Kermarrec>
    * 48023fa - lattice: fix Misc constraints <Florent Kermarrec>
    * 1fdf5db - lattice/diamond: use build_name as top name <Florent Kermarrec>
    * 28a5f32 - genlib/fsm: add basic FSM tests. <whitequark>
    * 9cd4e2c - remove asic_syntax and other cleanups <Sebastien Bourdeauducq>
    * cf4c3ef - build/lattice/diamond: translate `keep` and `no_retiming` attributes. <whitequark>
    * d5ac858 - build/lattice/diamond: save LDF project after creating it. <whitequark>
    * 2025071 - build/lattice/diamond: shorten pointlessly long paths. <whitequark>
    * 7303a8a - build/platforms/versaecp55g: add PCIe pins. <whitequark>
    * 0c5d42c - Add Project Trellis Backend (timvideos#156) <William D. Jones>
    * 37deff1 - build/platforms/versaecp55g: fix IOStandard for ext_clk. <whitequark>
    * c79d988 - build/platforms/versaecp55g: add X3 external connector. <whitequark>
    * d60cea0 - build/platforms/versaecp55g: add external clock input. <whitequark>
    * c51a064 - build/platforms/versaecp55g: allow programming without ispCLOCK in chain. <whitequark>
    * 34eeb3b - build/platforms/versaecp55g: import from litex. <whitequark>
    * 7bdc4ed - build/lattice/diamond: add Linux support. <whitequark>
    * 3a84a8b - build/lattice/diamond: only run Jedecgen for MachXO. <whitequark>
    * 966781b - class Tristate: add support for target parameter with oe, o and i subsignals. (timvideos#148) <Staf Verhaegen>
    * 907afd5 - platforms/icebreaker: Rename I/O w/ @esden's feedback. <William D. Jones>

Full submodule status
--
 5eeb151a748788666534d6ea3da07f90400d24c2 edid-decode (remotes/origin/HEAD)
 a628956da7dc794e6e3c95b31ff9ce3af58bc763 flash_proxies (remotes/origin/HEAD)
 30d9a3e2c22459470605b8d46f27d339b47f7987 litedram (remotes/origin/HEAD)
 52c23015b052e40600a84ac73227fb5a0f0ce862 liteeth (remotes/origin/HEAD)
 48f662e3928aa5af25aef932a8b1744d1f29c260 litepcie (remotes/origin/HEAD)
 b78a73110c0c26cf21bf1410329bf1e78286e929 litesata (remotes/origin/HEAD)
 1634fa35bb9f2717ab355ca2e494e1d02fd489ec litescope (remotes/origin/HEAD)
 0a9110f901182a1233cc4e64b6e39175f6784621 liteusb (remotes/origin/HEAD)
 13d85a1fe360678bebd57c55f1b35988c655ae95 litevideo (remotes/origin/HEAD)
 bc173380f21f82a82fc41e9face61b0c33e7f8e4 litex (v0.1-602-gbc173380)
 c285c12905cca3d8db59ce9fba3bbcd7e781e3c3 migen (0.6.dev-209-gc285c12)
@mithro mithro closed this as completed Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants