forked from M-Labs/artiq
1
0
Fork 0

conda: add Sayma AMC standalone board package

This commit is contained in:
Sebastien Bourdeauducq 2017-12-22 16:44:04 +08:00
parent e43e14152a
commit 44959144d8
3 changed files with 48 additions and 4 deletions

View File

@ -27,6 +27,7 @@ from artiq.gateware import remote_csr
from artiq.gateware import rtio from artiq.gateware import rtio
from artiq.gateware.rtio.phy import ttl_simple, sawg from artiq.gateware.rtio.phy import ttl_simple, sawg
from artiq import __version__ as artiq_version from artiq import __version__ as artiq_version
from artiq import __path__ as artiq_path
PhyPads = namedtuple("PhyPads", "txp txn") PhyPads = namedtuple("PhyPads", "txp txn")
@ -98,7 +99,7 @@ class AD9154(Module, AutoCSR):
self.sync.jesd += conv.eq(Cat(ch.o)) self.sync.jesd += conv.eq(Cat(ch.o))
class SaymaAMCStandalone(MiniSoC, AMPSoC): class Standalone(MiniSoC, AMPSoC):
mem_map = { mem_map = {
"cri_con": 0x10000000, "cri_con": 0x10000000,
"rtio": 0x11000000, "rtio": 0x11000000,
@ -219,6 +220,9 @@ class SaymaAMCStandalone(MiniSoC, AMPSoC):
def main(): def main():
installed_rtm_csr_csv = os.path.join(
artiq_path[0], "binaries", "sayma_rtm", "sayma_rtm_csr.csv")
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="ARTIQ device binary builder / Sayma AMC stand-alone") description="ARTIQ device binary builder / Sayma AMC stand-alone")
builder_args(parser) builder_args(parser)
@ -226,17 +230,24 @@ def main():
parser.add_argument("--rtm-csr-csv", parser.add_argument("--rtm-csr-csv",
default=os.path.join("artiq_sayma_rtm", "sayma_rtm_csr.csv"), default=os.path.join("artiq_sayma_rtm", "sayma_rtm_csr.csv"),
help="CSV file listing remote CSRs on RTM (default: %(default)s)") help="CSV file listing remote CSRs on RTM (default: %(default)s)")
parser.add_argument("--installed-rtm-csr-csv",
default=False, action="store_true",
help="use installed CSV file for RTM CSRs instead "
"({}, default: %(default)s)".format(installed_rtm_csr_csv))
parser.add_argument("--with-sawg", parser.add_argument("--with-sawg",
default=False, action="store_true", default=False, action="store_true",
help="add JESD204B and SAWG channels (default: %(default)s)") help="add JESD204B and SAWG channels (default: %(default)s)")
args = parser.parse_args() args = parser.parse_args()
soc = SaymaAMCStandalone(with_sawg=args.with_sawg, soc = Standalone(with_sawg=args.with_sawg, **soc_sdram_argdict(args))
**soc_sdram_argdict(args))
if args.installed_rtm_csr_csv:
rtm_csr_csv = installed_rtm_csr_csv
else:
rtm_csr_csv = args.rtm_csr_csv
remote_csr_regions = remote_csr.get_remote_csr_regions( remote_csr_regions = remote_csr.get_remote_csr_regions(
soc.mem_map["serwb"] | soc.shadow_base, soc.mem_map["serwb"] | soc.shadow_base,
args.rtm_csr_csv) rtm_csr_csv)
for name, origin, busword, csrs in remote_csr_regions: for name, origin, busword, csrs in remote_csr_regions:
soc.add_csr_region(name, origin, busword, csrs) soc.add_csr_region(name, origin, busword, csrs)
# Configuration for RTM peripherals. Keep in sync with sayma_rtm.py! # Configuration for RTM peripherals. Keep in sync with sayma_rtm.py!

View File

@ -0,0 +1,9 @@
#!/bin/bash
SOC_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq/binaries/sayma_amc-standalone
mkdir -p $SOC_PREFIX
V=1 $PYTHON -m artiq.gateware.targets.sayma_amc_standalone --installed-rtm-csr-csv
cp misoc_standalone_sayma_amc/gateware/top.bit $SOC_PREFIX
cp misoc_standalone_sayma_amc/software/bios/bios.bin $SOC_PREFIX
cp misoc_standalone_sayma_amc/software/runtime/runtime.fbi $SOC_PREFIX

View File

@ -0,0 +1,24 @@
package:
name: artiq-sayma_amc-standalone
version: {{ environ.get("GIT_DESCRIBE_TAG", "") }}
source:
git_url: ../..
build:
noarch: generic
ignore_prefix_files: True
number: {{ environ.get("GIT_DESCRIBE_NUMBER", 0) }}
string: py_{{ environ.get("GIT_DESCRIBE_NUMBER", 0) }}+git{{ environ.get("GIT_FULL_HASH", "")[:8] }}
requirements:
build:
- artiq-dev {{ "{tag} py_{number}+git{hash}".format(tag=environ.get("GIT_DESCRIBE_TAG"), number=environ.get("GIT_DESCRIBE_NUMBER"), hash=environ.get("GIT_FULL_HASH", "")[:8]) if "GIT_DESCRIBE_TAG" in environ else "" }}
- artiq-sayma_rtm {{ "{tag} py_{number}+git{hash}".format(tag=environ.get("GIT_DESCRIBE_TAG"), number=environ.get("GIT_DESCRIBE_NUMBER"), hash=environ.get("GIT_FULL_HASH", "")[:8]) if "GIT_DESCRIBE_TAG" in environ else "" }}
run:
- artiq {{ "{tag} py_{number}+git{hash}".format(tag=environ.get("GIT_DESCRIBE_TAG"), number=environ.get("GIT_DESCRIBE_NUMBER"), hash=environ.get("GIT_FULL_HASH", "")[:8]) if "GIT_DESCRIBE_TAG" in environ else "" }}
about:
home: https://m-labs.hk/artiq
license: LGPL
summary: 'Bitstream, BIOS and runtime for stand-alone Sayma AMC'