Merge remote-tracking branch 'origin/main' into nitefury_ii

This commit is contained in:
Sagar Karandikar 2023-06-05 11:44:40 -07:00
commit cd69214afd
19 changed files with 403 additions and 291 deletions

253
.github/scripts/run-local-buildbitstreams.py vendored Executable file
View File

@ -0,0 +1,253 @@
#!/usr/bin/env python3
import sys
from pathlib import Path
from fabric.api import prefix, run, settings, execute # type: ignore
import os
from github import Github
import base64
import time
from ci_variables import ci_env
from typing import List
GH_REPO = 'firesim-public-bitstreams'
GH_ORG = 'firesim'
URL_PREFIX = f"https://raw.githubusercontent.com/{GH_ORG}/{GH_REPO}"
build_location = "/scratch/buildbot/fstmp"
# taken from https://stackoverflow.com/questions/63427607/python-upload-files-directly-to-github-using-pygithub
# IMPORTANT: only works for binary files! (i.e. tar.gz files)
def upload_binary_file(local_file_path, gh_file_path):
print(f":DEBUG: Attempting to upload {local_file_path} to {gh_file_path}")
g = Github(ci_env['PERSONAL_ACCESS_TOKEN'])
repo = g.get_repo(f'{GH_ORG}/{GH_REPO}')
all_files = []
contents = repo.get_contents("")
while contents:
file_content = contents.pop(0)
if file_content.type == "dir":
contents.extend(repo.get_contents(file_content.path))
else:
file = file_content
all_files.append(str(file).replace('ContentFile(path="','').replace('")',''))
with open(local_file_path, 'rb') as file:
content = file.read()
tries = 10
delay = 15
msg = f"Committing files from {ci_env['GITHUB_SHA']}"
upload_branch = 'main'
r = None
# Upload to github
git_file = gh_file_path
if git_file in all_files:
contents = repo.get_contents(git_file)
for n in range(tries):
try:
r = repo.update_file(contents.path, msg, content, contents.sha, branch=upload_branch)
break
except Exception as e:
print(f"Got exception: {e}")
time.sleep(delay)
assert r is not None, f"Unable to poll 'update_file' API {tries} times"
print(f"Updated: {git_file}")
else:
for n in range(tries):
try:
r = repo.create_file(git_file, msg, content, branch=upload_branch)
break
except Exception as e:
print(f"Got exception: {e}")
time.sleep(delay)
assert r is not None, f"Unable to poll 'create_file' API {tries} times"
print(f"Created: {git_file}")
return r['commit'].sha
def run_local_buildbitstreams():
""" Runs local buildbitstreams"""
# assumptions:
# - machine-launch-script requirements are already installed
# - XILINX_VITIS, XILINX_XRT, XILINX_VIVADO are setup (in env / LD_LIBRARY_PATH / path / etc)
# repo should already be checked out
manager_fsim_dir = ci_env['REMOTE_WORK_DIR']
with prefix(f"cd {manager_fsim_dir}"):
with prefix('source sourceme-f1-manager.sh --skip-ssh-setup'):
# return a copy of config_build.yaml w/ hwdb entry(s) uncommented + new build dir
def modify_config_build(hwdb_entries_to_gen: List[str]) -> str:
build_yaml = f"{manager_fsim_dir}/deploy/config_build.yaml"
copy_build_yaml = f"{manager_fsim_dir}/deploy/config_build_{hash(tuple(hwdb_entries_to_gen))}.yaml"
build_yaml_lines = open(build_yaml).read().split("\n")
with open(copy_build_yaml, "w") as byf:
for line in build_yaml_lines:
if "- firesim" in line:
# comment out AWS specific lines
byf.write("# " + line + '\n')
elif 'default_build_dir:' in line:
byf.write(line.replace('null', build_location) + '\n')
elif len([True for hwdb_entry_to_gen in hwdb_entries_to_gen if (f"- {hwdb_entry_to_gen}" in line)]):
# remove comment
byf.write(line.replace("# ", '') + '\n')
else:
byf.write(line + '\n')
return copy_build_yaml
def add_host_list(build_yaml: str, hostlist: List[str]) -> str:
copy_build_yaml = f"{manager_fsim_dir}/deploy/config_build_{hash(tuple(hostlist))}.yaml"
build_yaml_lines = open(build_yaml).read().split("\n")
with open(copy_build_yaml, "w") as byf:
for line in build_yaml_lines:
if "build_farm_hosts:" in line and not "#" in line:
byf.write(line + '\n')
start_space_idx = line.index('b')
for host in hostlist:
byf.write((' ' * (start_space_idx + 4)) + f"- {host}" + '\n')
elif '- localhost' in line and not '#' in line:
byf.write("# " + line + '\n')
else:
byf.write(line + '\n')
return copy_build_yaml
def build_upload(build_yaml: str, hwdb_entries: List[str], platforms: List[str]) -> List[str]:
print(f"Printing {build_yaml}...")
run(f"cat {build_yaml}")
rc = 0
with settings(warn_only=True):
# pty=False needed to avoid issues with screen -ls stalling in fabric
build_result = run(f"timeout 10h firesim buildbitstream -b {build_yaml} --forceterminate", pty=False)
rc = build_result.return_code
if rc != 0:
log_lines = 200
print(f"Buildbitstream failed. Printing {log_lines} of last log file:")
run(f"""LAST_LOG=$(ls | tail -n1) && if [ -f "$LAST_LOG" ]; then tail -n{log_lines} $LAST_LOG; fi""")
sys.exit(rc)
hwdb_entry_dir = f"{manager_fsim_dir}/deploy/built-hwdb-entries"
links = []
for hwdb_entry_name, platform in zip(hwdb_entries, platforms):
hwdb_entry = f"{hwdb_entry_dir}/{hwdb_entry_name}"
print(f"Printing {hwdb_entry}...")
run(f"cat {hwdb_entry}")
with open(hwdb_entry, 'r') as hwdbef:
lines = hwdbef.readlines()
for line in lines:
if "bitstream_tar:" in line:
file_path = Path(line.strip().split(' ')[1].replace('file://', '')) # 2nd element (i.e. the path) (no URI)
file_name = f"{platform}/{hwdb_entry_name}.tar.gz"
run(f"shasum -a 256 {file_path}")
sha = upload_binary_file(file_path, file_name)
link = f"{URL_PREFIX}/{sha}/{file_name}"
print(f"Uploaded bitstream_tar for {hwdb_entry_name} to {link}")
links.append(link)
break
return links
relative_hwdb_path = "deploy/sample-backup-configs/sample_config_hwdb.yaml"
sample_hwdb_filename = f"{manager_fsim_dir}/{relative_hwdb_path}"
def replace_in_hwdb(hwdb_entry_name: str, link: str) -> None:
# replace the sample hwdb's bit line only
sample_hwdb_lines = open(sample_hwdb_filename).read().split('\n')
with open(sample_hwdb_filename, "w") as sample_hwdb_file:
match_bit = False
for line in sample_hwdb_lines:
if hwdb_entry_name in line.strip().split(' ')[0].replace(':', ''):
# hwdb entry matches key name
match_bit = True
sample_hwdb_file.write(line + '\n')
elif match_bit == True:
if ("bitstream_tar:" in line.strip().split(' ')[0]):
# only replace this bit
match_bit = False
new_bit_line = f" bitstream_tar: {link}"
print(f"Replacing {line.strip()} with {new_bit_line}")
# print out the bit line
sample_hwdb_file.write(new_bit_line + '\n')
else:
sys.exit("::ERROR:: Something went wrong")
else:
# if no match print other lines
sample_hwdb_file.write(line + '\n')
if match_bit == True:
sys.exit(f"::ERROR:: Unable to replace URL for {hwdb_entry_name} in {sample_hwdb_filename}")
# could potentially use knight/ferry in the future (currently unused since they are currently overloaded)
hosts = {
("localhost", "vitis:2022.1"),
("jktgz", "vitis:2022.1"),
("jktqos", "vivado:2021.1"),
("firesim1", "vivado:2019.1"),
}
# same order as in config_build.yaml
# hwdb_entry_name, platform_name, buildtool:version
batch_hwdbs = [
("vitis_firesim_rocket_singlecore_no_nic", "vitis", "vitis:2022.1"),
("vitis_firesim_gemmini_rocket_singlecore_no_nic", "vitis", "vitis:2022.1"),
("alveo_u250_firesim_rocket_singlecore_no_nic", "xilinx_alveo_u250", "vivado:2021.1"),
("xilinx_vcu118_firesim_rocket_singlecore_4GB_no_nic", "xilinx_vcu118", "vivado:2019.1"),
]
assert len(hosts) >= len(batch_hwdbs), f"Need at least {len(batch_hwdbs)} hosts to run builds"
# map hwdb tuple to hosts
hwdb_2_host = {}
for hwdb in batch_hwdbs:
buildtool_version = hwdb[2]
for host in hosts:
if host[1] == buildtool_version:
if not host[0] in hwdb_2_host.values():
hwdb_2_host[hwdb[0]] = host[0]
assert len(hwdb_2_host) == len(batch_hwdbs), "Unable to map hosts to hwdb build"
hwdbs_ordered = [hwdb[0] for hwdb in batch_hwdbs]
platforms_ordered = [hwdb[1] for hwdb in batch_hwdbs]
hosts_ordered = hwdb_2_host.values()
print("Mappings")
print(f"HWDBS: {hwdbs_ordered}")
print(f"Platforms: {platforms_ordered}")
print(f"Hosts: {hosts_ordered}")
copy_build_yaml = modify_config_build(hwdbs_ordered)
copy_build_yaml_2 = add_host_list(copy_build_yaml, hosts_ordered)
links = build_upload(copy_build_yaml_2, hwdbs_ordered, platforms_ordered)
for hwdb, link in zip(hwdbs_ordered, links):
replace_in_hwdb(hwdb, link)
print(f"Printing {sample_hwdb_filename}...")
run(f"cat {sample_hwdb_filename}")
# copy back to workspace area so you can PR it
run(f"cp -f {sample_hwdb_filename} {ci_env['GITHUB_WORKSPACE']}/{relative_hwdb_path}")
# wipe old data
for host in hosts_ordered:
run(f"ssh {host} rm -rf {build_location}")
if __name__ == "__main__":
execute(run_local_buildbitstreams, hosts=["localhost"])

View File

@ -1,188 +0,0 @@
#!/usr/bin/env python3
import sys
from pathlib import Path
from fabric.api import prefix, run, settings, execute # type: ignore
import os
from github import Github
import base64
import time
from ci_variables import ci_env
GH_REPO = 'firesim-public-bitstreams'
GH_ORG = 'firesim'
URL_PREFIX = f"https://raw.githubusercontent.com/{GH_ORG}/{GH_REPO}"
# taken from https://stackoverflow.com/questions/63427607/python-upload-files-directly-to-github-using-pygithub
def upload_binary_file(local_file_path, gh_file_path):
print(f":DEBUG: Attempting to upload {local_file_path} to {gh_file_path}")
g = Github(ci_env['PERSONAL_ACCESS_TOKEN'])
repo = g.get_repo(f'{GH_ORG}/{GH_REPO}')
all_files = []
contents = repo.get_contents("")
while contents:
file_content = contents.pop(0)
if file_content.type == "dir":
contents.extend(repo.get_contents(file_content.path))
else:
file = file_content
all_files.append(str(file).replace('ContentFile(path="','').replace('")',''))
with open(local_file_path, 'rb') as file:
content = base64.b64encode(file.read()).decode("utf-8")
tries = 10
delay = 15
msg = f"Committing files from {ci_env['GITHUB_SHA']}"
upload_branch = 'main'
r = None
# Upload to github
git_file = gh_file_path
if git_file in all_files:
contents = repo.get_contents(git_file)
for n in range(tries):
try:
r = repo.update_file(contents.path, msg, content, contents.sha, branch=upload_branch)
break
except Exception as e:
print(f"Got exception: {e}")
time.sleep(delay)
assert r is not None, f"Unable to poll 'update_file' API {tries} times"
print(f"Updated: {git_file}")
else:
for n in range(tries):
try:
r = repo.create_file(git_file, msg, content, branch=upload_branch)
break
except Exception as e:
print(f"Got exception: {e}")
time.sleep(delay)
assert r is not None, f"Unable to poll 'create_file' API {tries} times"
print(f"Created: {git_file}")
return r['commit'].sha
def run_xclbin_buildbitstream():
""" Runs Xclbin buildbitstream"""
# assumptions:
# - machine-launch-script requirements are already installed
# - XILINX_VITIS, XILINX_XRT, XILINX_VIVADO are setup (in env / LD_LIBRARY_PATH / path / etc)
# repo should already be checked out
#print("DEBUG: " + str(upload_binary_file("/scratch/buildbot/prebuilt-xclbins/firesim.xclbin", "vitis/temp2.xclbin")))
#sys.exit(0)
manager_fsim_dir = ci_env['REMOTE_WORK_DIR']
with prefix(f"cd {manager_fsim_dir}"):
with prefix('source sourceme-f1-manager.sh --skip-ssh-setup'):
# return a copy of config_build.yaml w/ hwdb entry uncommented + new build dir
def modify_config_build(hwdb_entry_to_gen: str) -> str:
build_yaml = f"{manager_fsim_dir}/deploy/config_build.yaml"
copy_build_yaml = f"{manager_fsim_dir}/deploy/config_build_{hwdb_entry_to_gen}.yaml"
build_yaml_lines = open(build_yaml).read().split("\n")
with open(copy_build_yaml, "w") as byf:
for line in build_yaml_lines:
if "- firesim" in line:
# comment out AWS specific lines
byf.write("# " + line + '\n')
elif f"- {hwdb_entry_to_gen}" in line:
# remove comment
byf.write(line.replace("# ", '') + '\n')
elif 'default_build_dir:' in line:
byf.write(line.replace('null', f"{manager_fsim_dir}/tmp_build_area") + '\n')
else:
byf.write(line + '\n')
return copy_build_yaml
def build_upload(build_yaml: str, hwdb_entry_name: str) -> str:
print(f"Printing {build_yaml}...")
run(f"cat {build_yaml}")
rc = 0
with settings(warn_only=True):
# pty=False needed to avoid issues with screen -ls stalling in fabric
build_result = run(f"timeout 10h firesim buildbitstream -b {build_yaml} --forceterminate", pty=False)
rc = build_result.return_code
if rc != 0:
log_lines = 200
print(f"Buildbitstream failed. Printing {log_lines} of last log file:")
run(f"""LAST_LOG=$(ls | tail -n1) && if [ -f "$LAST_LOG" ]; then tail -n{log_lines} $LAST_LOG; fi""")
sys.exit(rc)
hwdb_entry_dir = f"{manager_fsim_dir}/deploy/built-hwdb-entries"
hwdb_entry = f"{hwdb_entry_dir}/{hwdb_entry_name}"
print(f"Printing {hwdb_entry}...")
run(f"cat {hwdb_entry}")
with open(hwdb_entry, 'r') as hwdbef:
lines = hwdbef.readlines()
for line in lines:
if "xclbin:" in line:
file_path = Path(line.strip().split(' ')[1].replace('file://', '')) # 2nd element (i.e. the path) (no URI)
file_name = f"vitis/{hwdb_entry_name}.xclbin"
sha = upload_binary_file(file_path, file_name)
link = f"{URL_PREFIX}/{sha}/{file_name}"
print(f"Uploaded xclbin for {hwdb_entry_name} to {link}")
return link
sys.exit(":ERROR: Something went wrong. Should have uploaded by now and returned a link.")
relative_hwdb_path = "deploy/sample-backup-configs/sample_config_hwdb.yaml"
sample_hwdb_filename = f"{manager_fsim_dir}/{relative_hwdb_path}"
def replace_in_hwdb(hwdb_entry_name: str, link: str) -> None:
# replace the sample hwdb's xclbin line only
sample_hwdb_lines = open(sample_hwdb_filename).read().split('\n')
with open(sample_hwdb_filename, "w") as sample_hwdb_file:
match_xclbin = False
for line in sample_hwdb_lines:
if hwdb_entry_name in line.strip().split(' ')[0].replace(':', ''):
# hwdb entry matches key name
match_xclbin = True
sample_hwdb_file.write(line + '\n')
elif match_xclbin == True and ("xclbin:" in line.strip().split(' ')[0]):
# only replace this xclbin
match_xclbin = False
new_xclbin_line = f" xclbin: {link}"
print(f"Replacing {line.strip()} with {new_xclbin_line}")
# print out the xclbin line
sample_hwdb_file.write(new_xclbin_line + '\n')
else:
# if no match print other lines
sample_hwdb_file.write(line + '\n')
if match_xclbin == True:
sys.exit(f"::ERROR:: Unable to replace URL for {hwdb_entry_name} in {sample_hwdb_filename}")
# roughly takes ~4h to generate
hwdb_entry_name = "vitis_firesim_rocket_singlecore_no_nic"
copy_build_yaml = modify_config_build(hwdb_entry_name)
replace_in_hwdb(hwdb_entry_name, build_upload(copy_build_yaml, hwdb_entry_name))
# roughly takes ~4h to generate
hwdb_entry_name = "vitis_firesim_gemmini_rocket_singlecore_no_nic"
copy_build_yaml = modify_config_build(hwdb_entry_name)
replace_in_hwdb(hwdb_entry_name, build_upload(copy_build_yaml, hwdb_entry_name))
print(f"Printing {sample_hwdb_filename}...")
run(f"cat {sample_hwdb_filename}")
# copy back to workspace area so you can PR it
run(f"cp -f {sample_hwdb_filename} {ci_env['GITHUB_WORKSPACE']}/{relative_hwdb_path}")
if __name__ == "__main__":
execute(run_xclbin_buildbitstream, hosts=["localhost"])

View File

@ -354,7 +354,6 @@ jobs:
run: |
python3 -m sphinx.ext.intersphinx docs/_build/html/objects.inv
cat /tmp/sphinx-err*.log
cpp-lint:
name: cpp-lint
runs-on: ubuntu-20.04
@ -372,13 +371,11 @@ jobs:
git submodule update --init target-design/chipyard
cd target-design/chipyard
git submodule update --init generators/testchipip
# Install clang linters
- name: Install Clang linters
run: |
sudo apt update
sudo apt install clang-format clang-tidy-12 parallel -y
# Run 'clang-format', comparing against the base commit hash.
# If anything got reformatted, fail and output a patch.
- name: Run clang-format
@ -396,7 +393,6 @@ jobs:
git checkout .
exit 1
fi
# Run clang-tidy on the entire codebase. Error will be logged.
- name: Run clang-tidy
run: |
@ -473,12 +469,12 @@ jobs:
- name: Run simple linux poweroff test w/ vitis
run: .github/scripts/run-linux-poweroff-vitis.py
run-u250-xclbin-buildbitstream:
if: contains(github.event.pull_request.labels.*.name, 'ci:u250-xclbin-buildbitstream-deploy')
run-local-fpga-buildbitstream:
if: contains(github.event.pull_request.labels.*.name, 'ci:local-fpga-buildbitstream-deploy')
needs: [setup-local-fpga-repo]
name: run-u250-xclbin-buildbitstream
name: run-local-fpga-buildbitstream
runs-on: local-fpga
timeout-minutes: 600
timeout-minutes: 1200
steps:
# This forces a fresh clone of the repo during the `checkout` step
# to resolve stale submodule URLs. See https://github.com/ucb-bar/chipyard/pull/1156.
@ -487,20 +483,20 @@ jobs:
rm -rf ${{ github.workspace }}/* || true
rm -rf ${{ github.workspace }}/.* || true
- uses: actions/checkout@v3
- name: Run buildbitstream command and update sample xclbins
run: .github/scripts/run-xclbin-buildbitstream.py
- name: Run buildbitstream command and update sample local bitstreams
run: .github/scripts/run-local-buildbitstreams.py
- uses: peter-evans/create-pull-request@v5
with:
base: ${{ github.head_ref }}
add-paths: "deploy/sample-backup-configs/sample_config_hwdb.yaml"
commit-message: "Update xclbin(s) [ci skip]"
body: "Update xclbin(s) for PR #${{ github.event.pull_request.number }}"
commit-message: "Update local bitstream(s) [ci skip]"
body: "Update local bitstream(s) for PR #${{ github.event.pull_request.number }}"
branch-suffix: short-commit-hash
title: "Update xclbin(s) for PR #${{ github.event.pull_request.number }} (`${{ github.head_ref }}`)"
title: "Update local bitstream(s) for PR #${{ github.event.pull_request.number }} (`${{ github.head_ref }}`)"
cleanup-local-fpga-repo:
name: cleanup-local-fpga-repo
needs: [run-basic-linux-poweroff-vitis, run-vitis-check-docs-generated-components, run-basic-linux-poweroff-vitis, run-u250-xclbin-buildbitstream]
needs: [run-parallel-vcs-metasims-and-vitis-driver, run-basic-linux-poweroff-vitis, run-vitis-check-docs-generated-components, run-local-fpga-buildbitstream]
runs-on: local-fpga
if: ${{ always() }}
steps:

View File

@ -7,9 +7,9 @@
# Install this environment as "YOURENV" with:
# conda-lock install -n YOURENV --file conda-reqs.conda-lock.yml
# To update a single package to the latest version compatible with the version constraints in the source:
# conda-lock lock --lockfile conda-reqs.conda-lock.yml --update PACKAGE
# conda-lock lock --lockfile conda-reqs.conda-lock.yml --update PACKAGE
# To re-solve the entire environment, e.g. after changing a version constraint in the source file:
# conda-lock -f /scratch/abejgonza/firesim/conda-reqs/firesim.yaml -f /scratch/abejgonza/firesim/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/fs-typing/conda-reqs/firesim.yaml -f /scratch/abejgonza/fs-typing/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/al2-fs/conda-reqs/firesim.yaml -f /scratch/abejgonza/al2-fs/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/fs-buildafi-ci/conda-reqs/firesim.yaml -f /scratch/abejgonza/fs-buildafi-ci/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/firesim.yaml -f /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/ci-shared.yaml --lockfile conda-reqs.conda-lock.yml
# conda-lock -f /scratch/abejgonza/firesim/conda-reqs/firesim.yaml -f /scratch/abejgonza/firesim/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/fs-typing/conda-reqs/firesim.yaml -f /scratch/abejgonza/fs-typing/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/al2-fs/conda-reqs/firesim.yaml -f /scratch/abejgonza/al2-fs/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/fs-buildafi-ci/conda-reqs/firesim.yaml -f /scratch/abejgonza/fs-buildafi-ci/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/firesim.yaml -f /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/ci-shared.yaml -f /scratch/abejgonza/fs-rcbump/conda-reqs/firesim.yaml -f /scratch/abejgonza/fs-rcbump/conda-reqs/ci-shared.yaml --lockfile conda-reqs.conda-lock.yml
metadata:
channels:
- url: conda-forge
@ -19,7 +19,7 @@ metadata:
- url: nodefaults
used_env_vars: []
content_hash:
linux-64: 7a868c796a6e48ef38d85e44473bff53babc4e39a1ce0404723d754ebf7426ab
linux-64: 71c8fd7b314d91d449dcb72854671e3c751c788e69fc879d5d96313909880024
platforms:
- linux-64
sources:
@ -33,6 +33,8 @@ metadata:
- /scratch/abejgonza/fs-buildafi-ci/conda-reqs/ci-shared.yaml
- /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/firesim.yaml
- /scratch/abejgonza/cy-check/sims/firesim/conda-reqs/ci-shared.yaml
- /scratch/abejgonza/fs-rcbump/conda-reqs/firesim.yaml
- /scratch/abejgonza/fs-rcbump/conda-reqs/ci-shared.yaml
package:
- category: main
dependencies: {}
@ -403,6 +405,7 @@ package:
libstdcxx-ng: '>=12'
hash:
md5: 6bfb79319763a11c7423c9d0e0ee00b7
sha256: null
manager: conda
name: dromajo
optional: false
@ -4382,6 +4385,7 @@ package:
libzlib: '>=1.2.12,<1.3.0a0'
hash:
md5: 5b3ed39ee3809d63d347b649de0a45f8
sha256: null
manager: conda
name: libdwarf
optional: false
@ -4516,14 +4520,14 @@ package:
pip: ''
python: '>=3.7,<4.0'
hash:
md5: 82e8ad8e403f7183c54806064eaad6f0
sha256: 558698d3bf59058578c3b7919d8f92a678ece0da20332970b58fa29e666c4684
md5: 7a02fed21d1bf45cb41eaeaefc7eea25
sha256: 6ba480465154a4ac2ba1c08d10e4824dc10db30d8087b83b2b041df0ebba18e8
manager: conda
name: types-awscrt
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/types-awscrt-0.16.18-pyhd8ed1ab_0.conda
version: 0.16.18
url: https://conda.anaconda.org/conda-forge/noarch/types-awscrt-0.16.19-pyhd8ed1ab_0.conda
version: 0.16.19
- category: main
dependencies:
libgcc-ng: '>=9.3.0'
@ -4584,14 +4588,14 @@ package:
types-awscrt: ''
typing_extensions: ''
hash:
md5: 02c4d0596fd90242135cbd533368f723
sha256: eaa094606d1dd54579fd78299d39b185e80d0c91c031915eeaeae963aa5d271c
md5: f19106a30c5fb2c52d84d1dbf0b5e097
sha256: 8bf3c568732facd3ca9adf2f1867f91f84fc0e3779dba9e4da4c10f35ac0dfba
manager: conda
name: botocore-stubs
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/botocore-stubs-1.29.141-pyhd8ed1ab_0.conda
version: 1.29.141
url: https://conda.anaconda.org/conda-forge/noarch/botocore-stubs-1.29.145-pyhd8ed1ab_0.conda
version: 1.29.145
- category: main
dependencies:
clang-format: 16.0.3 default_h1cdf331_2
@ -4673,6 +4677,7 @@ package:
libzlib: '>=1.2.12,<1.3.0a0'
hash:
md5: 899c511688e6c41cb51c2921a8d25e63
sha256: null
manager: conda
name: libdwarf-dev
optional: false
@ -5021,14 +5026,14 @@ package:
python-dateutil: '>=2.1,<3.0.0'
urllib3: '>=1.25.4,<1.27'
hash:
md5: 463d2b735eeee0cbc7db341883bfcf11
sha256: e5523742644f9dc765dd3b3b4681c9cf45853d1030e9e930eaab67246619edf1
md5: a1b8b2b1df2fa7a35fc15e561601cbe0
sha256: 61c711c9620821ef97ef04ad1991c23328debbe722ca1891e917821bc47f1611
manager: conda
name: botocore
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/botocore-1.29.143-pyhd8ed1ab_0.conda
version: 1.29.143
url: https://conda.anaconda.org/conda-forge/noarch/botocore-1.29.145-pyhd8ed1ab_0.conda
version: 1.29.145
- category: main
dependencies:
cairo: '>=1.16.0,<2.0a0'
@ -5112,28 +5117,28 @@ package:
six: '>=1.11.0'
typing-extensions: '>=4.0.1'
hash:
md5: f4d871cde207029fbd3059fc4ad76af9
sha256: 85884ae07cd171b577dba67059b633df5c6ad0a8fff8222de4bf77530426aea6
md5: 4e49a7bd8f79a678c4fa2e871f4e2881
sha256: 485bd7bba4820ea7265990d335ec10ab2f431c6bb1cca19f3ce7b87879f62e72
manager: conda
name: azure-core
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/azure-core-1.26.4-pyhd8ed1ab_0.conda
version: 1.26.4
url: https://conda.anaconda.org/conda-forge/noarch/azure-core-1.27.0-pyhd8ed1ab_0.conda
version: 1.27.0
- category: main
dependencies:
msgpack-python: '>=0.5.2'
python: '>=3.6'
requests: ''
requests: '>=2.16.0'
hash:
md5: e8f0410e0aa03342304357c5cc3bb75d
sha256: 466ce7c155be90a5c903052eba391759ae88eb65f2bb06b0cc1c9d09c4311800
md5: 9f0b2eb5f5dd2cec36d5342a80adfec0
sha256: 894e2f4c59221b9633c60281a17fefe09ba0bf5d996992cebeb504d0585dd0dd
manager: conda
name: cachecontrol
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.12.11-pyhd8ed1ab_1.conda
version: 0.12.11
url: https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.0-pyhd8ed1ab_0.conda
version: 0.13.0
- category: main
dependencies:
conda-package-handling: '>=1.3.0'
@ -5306,7 +5311,7 @@ package:
version: 5.1.1
- category: main
dependencies:
botocore: 1.29.143
botocore: 1.29.145
colorama: '>=0.2.5,<0.4.5'
docutils: '>=0.10,<0.17'
python: '>=3.10,<3.11.0a0'
@ -5315,14 +5320,14 @@ package:
rsa: '>=3.1.2,<4.8'
s3transfer: '>=0.6.0,<0.7.0'
hash:
md5: 4158d57511fdf4c065de63cd1c955868
sha256: 66329dbc7621c9be4a0caa926a0032c2ee725e2abcce82503189642703977a28
md5: 72db444c038161792bce84c115badf4f
sha256: d3ca2cd8c3cf320828c19d4afcb5e06aa42a2782c2e4cd43b511a812fa0242fd
manager: conda
name: awscli
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/linux-64/awscli-1.27.143-py310hff52083_0.conda
version: 1.27.143
url: https://conda.anaconda.org/conda-forge/linux-64/awscli-1.27.145-py310hff52083_0.conda
version: 1.27.145
- category: main
dependencies:
azure-core: <2.0.0,>=1.26.2
@ -5338,33 +5343,33 @@ package:
version: 1.4.0
- category: main
dependencies:
botocore: '>=1.29.143,<1.30.0'
botocore: '>=1.29.145,<1.30.0'
jmespath: '>=0.7.1,<2.0.0'
python: '>=3.7'
s3transfer: '>=0.6.0,<0.7.0'
hash:
md5: a8be0d7d1ac025e9232e7542c76d583e
sha256: 814f58ebeafe4917b063de172e664cc2da87efee943613e4c3b05e4d81c79254
md5: 09e0b5c5f94eb5b480477ae63072b7dd
sha256: 82d045f01c87a8202796eadf2f10350b7e2417b480e93c69bb85a8364b750f02
manager: conda
name: boto3
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/boto3-1.26.143-pyhd8ed1ab_0.conda
version: 1.26.143
url: https://conda.anaconda.org/conda-forge/noarch/boto3-1.26.145-pyhd8ed1ab_0.conda
version: 1.26.145
- category: main
dependencies:
cachecontrol: 0.12.11 pyhd8ed1ab_1
cachecontrol: 0.13.0 pyhd8ed1ab_0
lockfile: '>=0.9'
python: '>=3.6'
hash:
md5: 9df660456c0076d27b802448f7ede78f
sha256: 81c483fc92656873eb5a7ba657b208c34186556d942a9cebc1f7771e565b95b7
md5: 3fd3d55ea862cc0736ac1cce6f44c2d1
sha256: a8e20149f8ef160fbac5c751733638ccd5f35e20f3f552cfd46a467ffeceeeaf
manager: conda
name: cachecontrol-with-filecache
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.12.11-pyhd8ed1ab_1.conda
version: 0.12.11
url: https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.0-pyhd8ed1ab_0.conda
version: 0.13.0
- category: main
dependencies:
colorama: ''
@ -5525,14 +5530,14 @@ package:
python: ''
typing_extensions: ''
hash:
md5: e4035713762b745fe7521141eef9cbec
sha256: d0f14dcdaf50e693a5a3422945cf034587b9c19e0b41ef04a8525b3f5418e737
md5: 1cc6dd0f40481c8a20eaa91a76f48ce5
sha256: c0c0c81cfaf11a662d331d934d7a8eca12adbf12fa89a1fd60b514318c87c6c8
manager: conda
name: boto3-stubs
optional: false
platform: linux-64
url: https://conda.anaconda.org/conda-forge/noarch/boto3-stubs-1.26.143-pyhd8ed1ab_0.conda
version: 1.26.143
url: https://conda.anaconda.org/conda-forge/noarch/boto3-stubs-1.26.145-pyhd8ed1ab_0.conda
version: 1.26.145
- category: main
dependencies:
cachecontrol-with-filecache: '>=0.12.9'
@ -5689,6 +5694,7 @@ package:
name: mock
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/e6/88/8a05e7ad0bb823246b2add3d2e97f990c41c71a40762c8db77a4bd78eedf/mock-5.0.1-py3-none-any.whl
version: 5.0.1
- category: main
@ -5700,6 +5706,7 @@ package:
name: asttokens
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/f3/e1/64679d9d0759db5b182222c81ff322c2fe2c31e156a59afd6e9208c960e5/asttokens-2.2.1-py2.py3-none-any.whl
version: 2.2.1
- category: main
@ -5713,6 +5720,7 @@ package:
name: azure-mgmt-resourcegraph
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/bd/16/63c37bffdce5082c9997ad7783921b02ed534b5971e5bdbd1ae617a5b2e3/azure_mgmt_resourcegraph-8.0.0-py2.py3-none-any.whl
version: 8.0.0
- category: main
@ -5725,6 +5733,7 @@ package:
name: paramiko-ng
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/9f/53/1ac75eab589149b1e02e38185ecebf09e1b805fc3fdeadbc16d1a2b7d208/paramiko_ng-2.8.10-py2.py3-none-any.whl
version: 2.8.10
- category: main
@ -5737,6 +5746,7 @@ package:
name: sure
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/c7/ee/043531858afab5f312ca02867de51189c0c1dd76ba652f1d95ffa13d07f7/sure-2.0.0.tar.gz
version: 2.0.0
- category: main
@ -5749,6 +5759,7 @@ package:
name: fab-classic
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/6b/0f/efc537eebfd2a2c470250c0ac8bd8a05ffc13d95a7fb22021367890d7c46/fab_classic-1.19.2-py2.py3-none-any.whl
version: 1.19.2
- category: main
@ -5761,6 +5772,7 @@ package:
name: icontract
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/d8/91/9756e7cf0b155e80bf9a62beffdd1dec4afce43cc6ab7f432f2267c62762/icontract-2.6.2-py3-none-any.whl
version: 2.6.2
- category: main
@ -5773,6 +5785,7 @@ package:
name: pylddwrap
optional: false
platform: linux-64
source: null
url: https://files.pythonhosted.org/packages/6b/4e/aebc1cff19a572dbcc7e60d8e74f38fd568ef9185650b39f72fde9ff84d1/pylddwrap-1.2.1.tar.gz
version: 1.2.1
version: 1

View File

@ -25,12 +25,12 @@ dependencies:
- gcc
- gxx
- sysroot_linux-64==2.17 # needed to match pre-built CI XRT glibc version
- sysroot_linux-64=2.17 # needed to match pre-built CI XRT glibc version
- conda-gcc-specs
- binutils
- dromajo # from ucb-bar channel - https://github.com/riscv-boom/dromajo
- riscv-tools=1.0.3 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock
- riscv-tools==1.0.3 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock
# firemarshal deps
- qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock
@ -87,7 +87,7 @@ dependencies:
- screen
- elfutils
- libdwarf-dev==0.0.0.20190110_28_ga81397fc4 # from ucb-bar channel - using mainline libdwarf-feedstock
- conda-lock=1
- conda-lock=1.4
# clang-format for driver coding style enforcement.
- clang-format

View File

@ -504,11 +504,28 @@ class VitisBitBuilder(BitBuilder):
hwdb_entry_name = self.build_config.name
local_cl_dir = f"{local_results_dir}/{fpga_build_postfix}"
xclbin_path = "file://" + local_cl_dir + f"/bitstream/build_dir.{self.device}/firesim.xclbin"
bit_path = f"{local_cl_dir}/bitstream/build_dir.{self.device}/firesim.xclbin"
tar_staging_path = f"{local_cl_dir}/{self.build_config.PLATFORM}"
tar_name = "firesim.tar.gz"
# store files into staging dir
local(f"rm -rf {tar_staging_path}")
local(f"mkdir -p {tar_staging_path}")
# store bitfile
local(f"cp {bit_path} {tar_staging_path}")
# store metadata string
local(f"""echo '{self.get_metadata_string()}' >> {tar_staging_path}/metadata""")
# form tar.gz
with prefix(f"cd {local_cl_dir}"):
local(f"tar zcvf {tar_name} {self.build_config.PLATFORM}/")
hwdb_entry = hwdb_entry_name + ":\n"
hwdb_entry += " xclbin: " + xclbin_path + "\n"
hwdb_entry += f" deploy_quintuplet_override: {self.build_config.get_chisel_quintuplet()}\n"
hwdb_entry += f" bitstream_tar: file://{local_cl_dir}/{tar_name}\n"
hwdb_entry += f" deploy_quintuplet_override: null\n"
hwdb_entry += " custom_runtime_config: null\n"
message_title = "FireSim FPGA Build Completed"
@ -675,9 +692,10 @@ class XilinxAlveoBitBuilder(BitBuilder):
local(f"rm -rf {tar_staging_path}")
local(f"mkdir -p {tar_staging_path}")
# store bitfile/mcs
# store bitfile (and mcs if it exists)
local(f"cp {bit_path} {tar_staging_path}")
local(f"cp {mcs_path} {tar_staging_path}")
if self.build_config.PLATFORM != "xilinx_vcu118":
local(f"cp {mcs_path} {tar_staging_path}")
# store metadata string
local(f"""echo '{self.get_metadata_string()}' >> {tar_staging_path}/metadata""")

View File

@ -678,6 +678,7 @@ class EC2InstanceDeployManager(InstanceDeployManager):
class VitisInstanceDeployManager(InstanceDeployManager):
""" This class manages a Vitis-enabled instance """
PLATFORM_NAME: str = "vitis"
@classmethod
def sim_command_requires_sudo(cls) -> bool:
@ -710,6 +711,23 @@ class VitisInstanceDeployManager(InstanceDeployManager):
for card_bdf in card_bdfs:
run(f"xbutil reset -d {card_bdf} --force")
def copy_bitstreams(self) -> None:
if self.instance_assigned_simulations():
self.instance_logger("""Copy bitstreams to flash.""")
for slotno, firesimservernode in enumerate(self.parent_node.sim_slots):
serv = firesimservernode
hwcfg = serv.get_resolved_server_hardware_config()
bitstream_tar = hwcfg.get_bitstream_tar_filename()
remote_sim_dir = self.get_remote_sim_dir_for_slot(slotno)
bitstream_tar_unpack_dir = f"{remote_sim_dir}/{self.PLATFORM_NAME}"
bit = f"{remote_sim_dir}/{self.PLATFORM_NAME}/firesim.xclbin"
# at this point the tar file is in the sim slot
run(f"rm -rf {bitstream_tar_unpack_dir}")
run(f"tar xvf {remote_sim_dir}/{bitstream_tar} -C {remote_sim_dir}")
def infrasetup_instance(self, uridir: str) -> None:
""" Handle infrastructure setup for this platform. """
if self.instance_assigned_simulations():
@ -723,6 +741,8 @@ class VitisInstanceDeployManager(InstanceDeployManager):
if not self.parent_node.metasimulation_enabled:
# clear/flash fpgas
self.clear_fpgas()
# copy bitstreams to use in run
self.copy_bitstreams()
if self.instance_assigned_switches():
# all nodes could have a switch
@ -734,14 +754,15 @@ class VitisInstanceDeployManager(InstanceDeployManager):
if self.instance_assigned_simulations():
self.instance_logger(f"""Starting {self.sim_type_message} simulation for slot: {slotno}.""")
remote_home_dir = self.parent_node.sim_dir
remote_sim_dir = f"""{remote_home_dir}/sim_slot_{slotno}/"""
remote_sim_dir = self.get_remote_sim_dir_for_slot(slotno)
assert slotno < len(self.parent_node.sim_slots), f"{slotno} can not index into sim_slots {len(self.parent_node.sim_slots)} on {self.parent_node.host}"
server = self.parent_node.sim_slots[slotno]
hwcfg = server.get_resolved_server_hardware_config()
bit = f"{remote_sim_dir}/{self.PLATFORM_NAME}/firesim.xclbin"
if not self.parent_node.metasimulation_enabled:
assert hwcfg.xclbin is not None
extra_args = f"+slotid={slotno} +binary_file={hwcfg.get_xclbin_filename()}"
extra_args = f"+slotid={slotno} +binary_file={bit}"
else:
extra_args = None

View File

@ -159,8 +159,6 @@ class RuntimeHWConfig:
# TODO: should be abstracted out between platforms with a URI
agfi: Optional[str]
"""User-specified, URI path to xclbin"""
xclbin: Optional[str]
"""User-specified, URI path to bitstream tar file"""
bitstream_tar: Optional[str]
@ -184,11 +182,10 @@ class RuntimeHWConfig:
def __init__(self, name: str, hwconfig_dict: Dict[str, Any]) -> None:
self.name = name
if sum(['agfi' in hwconfig_dict, 'xclbin' in hwconfig_dict, 'bitstream_tar' in hwconfig_dict]) > 1:
raise Exception(f"Must only have 'agfi' or 'xclbin' or 'bitstream_tar' HWDB entry {name}.")
if sum(['agfi' in hwconfig_dict, 'bitstream_tar' in hwconfig_dict]) > 1:
raise Exception(f"Must only have 'agfi' or 'bitstream_tar' HWDB entry {name}.")
self.agfi = hwconfig_dict.get('agfi')
self.xclbin = hwconfig_dict.get('xclbin')
self.bitstream_tar = hwconfig_dict.get('bitstream_tar')
self.driver_tar = hwconfig_dict.get('driver_tar')
@ -204,9 +201,6 @@ class RuntimeHWConfig:
if self.agfi is not None:
self.platform = "f1"
elif self.xclbin is not None:
self.platform = "vitis"
self.uri_list.append(URIContainer('xclbin', self.get_xclbin_filename()))
else:
self.uri_list.append(URIContainer('bitstream_tar', self.get_bitstream_tar_filename()))
@ -226,13 +220,9 @@ class RuntimeHWConfig:
hwconfig_override_build_quintuplet = 'f1-firesim-' + hwconfig_override_build_quintuplet
self.deploy_quintuplet = hwconfig_override_build_quintuplet
if self.deploy_quintuplet is not None and self.platform != "vitis":
if self.deploy_quintuplet is not None:
rootLogger.warning(f"{name} is overriding a deploy quintuplet in your config_hwdb.yaml file. Make sure you understand why!")
# TODO: obtain deploy_quintuplet from tag in xclbin
if self.deploy_quintuplet is None and self.platform == "vitis":
raise Exception(f"Must set the deploy_quintuplet_override for Vitis bitstreams.")
self.customruntimeconfig = hwconfig_dict['custom_runtime_config']
self.additional_required_files = []
@ -249,11 +239,6 @@ class RuntimeHWConfig:
""" Get the name of the tarball inside the sim_slot_X directory on the run host. """
return "driver-bundle.tar.gz"
@classmethod
def get_xclbin_filename(cls) -> str:
""" Get the name of the xclbin inside the sim_slot_X directory on the run host. """
return "bitstream.xclbin"
@classmethod
def get_bitstream_tar_filename(cls) -> str:
""" Get the name of the bit tar file inside the sim_slot_X directory on the run host. """
@ -288,8 +273,6 @@ class RuntimeHWConfig:
if self.get_platform() == "f1":
rootLogger.debug("Setting deployquintuplet by querying the AGFI's description.")
self.deploy_quintuplet = get_firesim_deploy_quintuplet_for_agfi(self.agfi)
elif self.get_platform() == "vitis":
assert False, "Must have the deploy_quintuplet_override defined"
else:
assert False, "Unable to obtain deploy_quintuplet"
@ -459,7 +442,7 @@ class RuntimeHWConfig:
# must be done after fetch_all_URIs
# based on the platform, read the URI, fill out values
if self.platform == "f1" or self.platform == "vitis":
if self.platform == "f1":
return
else: # bitstream_tar platforms
for container in self.uri_list:
@ -565,7 +548,7 @@ class RuntimeHWConfig:
self.tarball_built = True
def __str__(self) -> str:
return """RuntimeHWConfig: {}\nDeployQuintuplet: {}\nAGFI: {}\nXCLBIN: {}\nCustomRuntimeConf: {}""".format(self.name, self.deploy_quintuplet, self.agfi, self.xclbin, str(self.customruntimeconfig))
return """RuntimeHWConfig: {}\nDeployQuintuplet: {}\nAGFI: {}\nBitstream tar: {}\nCustomRuntimeConf: {}""".format(self.name, self.deploy_quintuplet, self.agfi, self.bitstream_tar, str(self.customruntimeconfig))
@ -580,7 +563,6 @@ class RuntimeBuildRecipeConfig(RuntimeHWConfig):
self.name = name
self.agfi = None
self.xclbin = None
self.bitstream_tar = None
self.driver_tar = None
self.tarball_built = False

View File

@ -56,16 +56,16 @@ firesim_supernode_rocket_singlecore_nic_l2_lbp:
deploy_quintuplet_override: null
custom_runtime_config: null
vitis_firesim_rocket_singlecore_no_nic:
xclbin: https://raw.githubusercontent.com/firesim/firesim-public-bitstreams/6ceb4e383e7273c5301ac62810aced72cf0b5ddd/vitis/vitis_firesim_rocket_singlecore_no_nic.xclbin
deploy_quintuplet_override: vitis-firesim-FireSim-FireSimRocketMMIOOnlyConfig-BaseVitisConfig
bitstream_tar: https://raw.githubusercontent.com/firesim/firesim-public-bitstreams/68dcb1c512ce79299e68235a3c47244cf09187f0/vitis/vitis_firesim_rocket_singlecore_no_nic.tar.gz
deploy_quintuplet_override: null
custom_runtime_config: null
vitis_firesim_gemmini_rocket_singlecore_no_nic:
xclbin: https://raw.githubusercontent.com/firesim/firesim-public-bitstreams/c49ee9ae58115ab04fde2ffa4c1ed08dfb5caed0/vitis/vitis_firesim_gemmini_rocket_singlecore_no_nic.xclbin
deploy_quintuplet_override: vitis-firesim-FireSim-FireSimLeanGemminiRocketMMIOOnlyConfig-BaseVitisConfig
bitstream_tar: https://raw.githubusercontent.com/firesim/firesim-public-bitstreams/1c0b8dfee42b31260db50dd1cc7166831d9ece96/vitis/vitis_firesim_gemmini_rocket_singlecore_no_nic.tar.gz
deploy_quintuplet_override: null
custom_runtime_config: null
# DOCREF START: Xilinx Alveo HWDB Entries
alveo_u250_firesim_rocket_singlecore_no_nic:
bitstream_tar: REPLACE_THIS
bitstream_tar: https://raw.githubusercontent.com/firesim/firesim-public-bitstreams/073ee60137c098e690e2ef789b065fa40cd7e920/xilinx_alveo_u250/alveo_u250_firesim_rocket_singlecore_no_nic.tar.gz
deploy_quintuplet_override: null
custom_runtime_config: null
alveo_u280_firesim_rocket_singlecore_no_nic:

View File

@ -0,0 +1,11 @@
# The majority of these constraints are redundant as them come with the u250 given XDC
set_property CONFIG_VOLTAGE 1.8 [current_design]
set_property CONFIG_MODE {SPIx4} [current_design]
set_property BITSTREAM.CONFIG.CONFIGFALLBACK Enable [current_design]; # Golden image is the fall back image if new bitstream is corrupted.
set_property BITSTREAM.CONFIG.EXTMASTERCCLK_EN disable [current_design]
set_property BITSTREAM.CONFIG.CONFIGRATE 63.8 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
set_property BITSTREAM.CONFIG.SPI_32BIT_ADDR Yes [current_design]
set_property BITSTREAM.CONFIG.UNUSEDPIN Pullup [current_design]

View File

@ -117,4 +117,4 @@ if {[get_property PROGRESS [get_runs ${impl_run}]] != "100%"} {
file copy -force ${root_dir}/vivado_proj/firesim.runs/${impl_run}/design_1_wrapper.bit ${root_dir}/vivado_proj/firesim.bit
write_cfgmem -format mcs -interface SPIx1 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs
write_cfgmem -force -format mcs -interface SPIx4 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs

View File

@ -73,4 +73,4 @@ if {$WNS >= 0 && $WHS >= 0} {
file copy -force ${root_dir}/vivado_proj/firesim.runs/${impl_run}/design_1_wrapper.bit ${root_dir}/vivado_proj/firesim.bit
write_cfgmem -format mcs -interface SPIx1 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs
write_cfgmem -force -format mcs -interface SPIx4 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs

View File

@ -29,4 +29,4 @@ if {[get_property PROGRESS ${impl_run}] != "100%"} {
file copy -force ${root_dir}/vivado_proj/firesim.runs/${impl_run}/design_1_wrapper.bit ${root_dir}/vivado_proj/firesim.bit
write_cfgmem -format mcs -interface SPIx1 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs
write_cfgmem -force -format mcs -interface SPIx4 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs

View File

@ -73,4 +73,4 @@ if {$WNS >= 0 && $WHS >= 0} {
file copy -force ${root_dir}/vivado_proj/firesim.runs/${impl_run}/design_1_wrapper.bit ${root_dir}/vivado_proj/firesim.bit
write_cfgmem -format mcs -interface SPIx1 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs
write_cfgmem -force -format mcs -interface SPIx4 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs

View File

@ -117,4 +117,4 @@ if {[get_property PROGRESS [get_runs ${impl_run}]] != "100%"} {
file copy -force ${root_dir}/vivado_proj/firesim.runs/${impl_run}/design_1_wrapper.bit ${root_dir}/vivado_proj/firesim.bit
write_cfgmem -format mcs -interface SPIx1 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs
write_cfgmem -force -format mcs -interface SPIx4 -size 1024 -loadbit "up 0x01002000 ${root_dir}/vivado_proj/firesim.bit" -verbose ${root_dir}/vivado_proj/firesim.mcs

View File

@ -77,6 +77,11 @@ if {[file exists [set constrFile [retrieveVersionedFile ${root_dir}/design/FireS
add_files -fileset impl -norecurse $constrFile
}
if {[file exists [set constrFile [retrieveVersionedFile ${root_dir}/design/bitstream_config.xdc $vivado_version]]]} {
add_files -fileset impl -norecurse $constrFile
}
update_compile_order -fileset sources_1
set_property top design_1_wrapper [current_fileset]
update_compile_order -fileset sources_1

View File

@ -0,0 +1 @@
../../../xilinx_alveo_u250/cl_firesim/design/bitstream_config.xdc

View File

@ -225,7 +225,7 @@ set -o pipefail
git \
screen \
argcomplete \
"conda-lock=1" \
"conda-lock=1.4" \
expect \
"python>=3.8" \
boto3 \

View File

@ -35,7 +35,7 @@ endef
# (1) - sbt project to assemble
# (2) - classpath file(s) to create
define run_sbt_assembly
cd $(base_dir) && $(SBT) ";project $(1); set assembly / assemblyOutputPath := file(\"$(2)\"); assembly"
cd $(base_dir) && $(SBT) ";project $(1); set assembly / assemblyOutputPath := file(\"$(2)\"); assembly" && touch $(2)
endef
else # FIRESIM_STANDALONE