forked from M-Labs/artiq-zynq
Compare commits
2 Commits
acc8581cb0
...
716a5924d1
Author | SHA1 | Date | |
---|---|---|---|
716a5924d1 | |||
4856cddb65 |
@ -138,7 +138,7 @@
|
||||
llvmPackages_11.clang-unwrapped
|
||||
];
|
||||
buildPhase = ''
|
||||
export VERSIONEER_ZYNQ_REV=${zynqRev}
|
||||
export ZYNQ_REV=${zynqRev}
|
||||
export XARGO_RUST_SRC="${rust}/lib/rustlib/src/rust/library"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${llvmPackages_11.clang-unwrapped.lib}/lib/clang/11.1.0/include"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
@ -166,7 +166,7 @@
|
||||
];
|
||||
}
|
||||
''
|
||||
export VERSIONEER_ZYNQ_REV=${zynqRev}
|
||||
export ZYNQ_REV=${zynqRev}
|
||||
python ${./src/gateware}/${target}.py -g build ${if json == null then "-V ${variant}" else json}
|
||||
mkdir -p $out $out/nix-support
|
||||
cp build/top.bit $out
|
||||
@ -389,7 +389,7 @@
|
||||
binutils-arm
|
||||
pre-commit
|
||||
];
|
||||
VERSIONEER_ZYNQ_REV="${zynqRev}";
|
||||
ZYNQ_REV="${zynqRev}";
|
||||
XARGO_RUST_SRC = "${rust}/lib/rustlib/src/rust/library";
|
||||
CLANG_EXTRA_INCLUDE_DIR = "${llvmPackages_11.clang-unwrapped.lib}/lib/clang/11.1.0/include";
|
||||
ZYNQ_RS = "${zynq-rs}";
|
||||
|
@ -1,8 +1,14 @@
|
||||
import os
|
||||
from artiq._version import get_version
|
||||
from misoc.integration import cpu_interface
|
||||
|
||||
def get_zynq_rev():
|
||||
return os.getenv("VERSIONEER_ZYNQ_REV", default="unknown")
|
||||
|
||||
def generate_ident(variant):
|
||||
return "{}+{};{}".format(
|
||||
get_version().split(".")[0],
|
||||
os.getenv("ZYNQ_REV", default="unknown")[:8],
|
||||
variant,
|
||||
)
|
||||
|
||||
def write_csr_file(soc, filename):
|
||||
with open(filename, "w") as f:
|
||||
|
@ -7,7 +7,7 @@ import dma
|
||||
from artiq.gateware import rtio
|
||||
from artiq.gateware.rtio.phy import spi2, ttl_simple
|
||||
from artiq.gateware.rtio.xilinx_clocking import fix_serdes_timing_path
|
||||
from config import write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
from config import generate_ident, write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
from migen import *
|
||||
from migen.build.generic_platform import IOStandard, Misc, Pins, Subsignal
|
||||
from migen.build.platforms import ebaz4205
|
||||
@ -125,11 +125,7 @@ class EBAZ4205(SoCCore):
|
||||
"set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets gmii_tx_clk_IBUF]"
|
||||
)
|
||||
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
self.__class__.__name__
|
||||
)
|
||||
ident = generate_ident(self.__class__.__name__)
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident)
|
||||
|
@ -21,14 +21,13 @@ from artiq.gateware.drtio.siphaser import SiPhaser7Series
|
||||
from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer
|
||||
from artiq.gateware.drtio import *
|
||||
from artiq.gateware.wrpll import wrpll
|
||||
from artiq._version import get_version
|
||||
|
||||
import dma
|
||||
import analyzer
|
||||
import acpki as acpki_lib
|
||||
import drtio_aux_controller
|
||||
import zynq_clocking
|
||||
from config import get_zynq_rev, write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
from config import generate_ident, write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
|
||||
eem_iostandard_dict = {
|
||||
0: "LVDS_25",
|
||||
@ -116,11 +115,7 @@ class GenericStandalone(SoCCore):
|
||||
platform.toolchain.bitstream_commands.extend([
|
||||
"set_property BITSTREAM.GENERAL.COMPRESS True [current_design]",
|
||||
])
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
description["variant"]
|
||||
)
|
||||
ident = generate_ident(description["variant"])
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
@ -234,11 +229,7 @@ class GenericMaster(SoCCore):
|
||||
platform.toolchain.bitstream_commands.extend([
|
||||
"set_property BITSTREAM.GENERAL.COMPRESS True [current_design]",
|
||||
])
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
description["variant"]
|
||||
)
|
||||
ident = generate_ident(description["variant"])
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
@ -447,11 +438,7 @@ class GenericSatellite(SoCCore):
|
||||
platform.toolchain.bitstream_commands.extend([
|
||||
"set_property BITSTREAM.GENERAL.COMPRESS True [current_design]",
|
||||
])
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
description["variant"]
|
||||
)
|
||||
ident = generate_ident(description["variant"])
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
|
@ -19,14 +19,13 @@ from artiq.gateware.drtio.transceiver import gtx_7series
|
||||
from artiq.gateware.drtio.siphaser import SiPhaser7Series
|
||||
from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer
|
||||
from artiq.gateware.drtio import *
|
||||
from artiq._version import get_version
|
||||
|
||||
import dma
|
||||
import analyzer
|
||||
import acpki
|
||||
import drtio_aux_controller
|
||||
import zynq_clocking
|
||||
from config import get_zynq_rev, write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
from config import generate_ident, write_csr_file, write_mem_file, write_rustc_cfg_file
|
||||
|
||||
class SMAClkinForward(Module):
|
||||
def __init__(self, platform):
|
||||
@ -131,11 +130,7 @@ class ZC706(SoCCore):
|
||||
platform = zc706.Platform()
|
||||
prepare_zc706_platform(platform)
|
||||
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
self.__class__.__name__
|
||||
)
|
||||
ident = generate_ident(self.__class__.__name__)
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
@ -208,11 +203,7 @@ class _MasterBase(SoCCore):
|
||||
|
||||
platform = zc706.Platform()
|
||||
prepare_zc706_platform(platform)
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
self.__class__.__name__
|
||||
)
|
||||
ident = generate_ident(self.__class__.__name__)
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
@ -353,11 +344,7 @@ class _SatelliteBase(SoCCore):
|
||||
|
||||
platform = zc706.Platform()
|
||||
prepare_zc706_platform(platform)
|
||||
ident = "{};{};{}".format(
|
||||
get_version(),
|
||||
get_zynq_rev()[:8],
|
||||
self.__class__.__name__,
|
||||
)
|
||||
ident = generate_ident(self.__class__.__name__)
|
||||
if self.acpki:
|
||||
ident = "acpki_" + ident
|
||||
SoCCore.__init__(self, platform=platform, csr_data_width=32, ident=ident, ps_cd_sys=False)
|
||||
|
Loading…
Reference in New Issue
Block a user