Skip to content

Instantly share code, notes, and snippets.

@daveshah1
Created February 12, 2020 10:30
Show Gist options
  • Save daveshah1/41e27bcaecc5503cddc4f585e8112f99 to your computer and use it in GitHub Desktop.
Save daveshah1/41e27bcaecc5503cddc4f585e8112f99 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -ex
cp soc_ethernetsoc_arty/gateware/*.init .
yosys -p "scratchpad -set xilinx_dsp.multonly 1; synth_xilinx -noclkbuf -nowidelut -flatten -top top; write_json litex.json" `grep -Po '(?<=read_verilog {)[^}]*' soc_ethernetsoc_arty/gateware/top.tcl` `grep -Po '(?<=read_verilog )[^ ]*$' soc_ethernetsoc_arty/gateware/top.ys`
nextpnr-xilinx --chipdb ../../nextpnr-xilinx/xilinx/xc7a35t.bin --xdc soc_ethernetsoc_arty/gateware/top.xdc --json litex.json --write litex_routed.json --fasm litex.fasm
source ${XRAY_DIR}/utils/environment.sh
${XRAY_UTILS_DIR}/fasm2frames.py --part xc7a35tcsg324-1 --db-root ${XRAY_UTILS_DIR}/../database/artix7 litex.fasm > litex.frames
${XRAY_TOOLS_DIR}/xc7frames2bit --part_file ${XRAY_UTILS_DIR}/../database/artix7/xc7a35tcsg324-1.yaml --part_name xc7a35tcsg324-1 --frm_file litex.frames --output_file litex.bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment