DRTIO port - scripts #135
Merged
sb10q
merged 5 commits from mwojcik/artiq-zynq:drtio_scripts
into master
1 year ago
@ -0,0 +1,60 @@ |
||||
{ |
||||
"target": "kasli_soc", |
||||
"variant": "master", |
||||
"hw_rev": "v1.0", |
||||
"base": "master", |
||||
"peripherals": [ |
||||
{ |
||||
"type": "grabber", |
||||
"ports": [0] |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [1], |
||||
"bank_direction_low": "input", |
||||
"bank_direction_high": "output" |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [2], |
||||
"bank_direction_low": "output", |
||||
"bank_direction_high": "output" |
||||
}, |
||||
{ |
||||
"type": "urukul", |
||||
"dds": "ad9910", |
||||
"ports": [3, 4], |
||||
"clk_sel": 2 |
||||
}, |
||||
{ |
||||
"type": "zotino", |
||||
"ports": [5] |
||||
}, |
||||
{ |
||||
"type": "sampler", |
||||
"ports": [6, 7] |
||||
}, |
||||
{ |
||||
"type": "mirny", |
||||
"ports": [8], |
||||
"clk_sel": 1, |
||||
"refclk": 125e6 |
||||
}, |
||||
{ |
||||
"type": "fastino", |
||||
"ports": [9] |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [10], |
||||
"bank_direction_low": "input", |
||||
"bank_direction_high": "input" |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [11], |
||||
"bank_direction_low": "output", |
||||
"bank_direction_high": "input" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,60 @@ |
||||
{ |
||||
"target": "kasli_soc", |
||||
"variant": "satellite", |
||||
"hw_rev": "v1.0", |
||||
"base": "satellite", |
||||
"peripherals": [ |
||||
{ |
||||
"type": "grabber", |
||||
"ports": [0] |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [1], |
||||
"bank_direction_low": "input", |
||||
"bank_direction_high": "output" |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [2], |
||||
"bank_direction_low": "output", |
||||
"bank_direction_high": "output" |
||||
}, |
||||
{ |
||||
"type": "urukul", |
||||
"dds": "ad9910", |
||||
"ports": [3, 4], |
||||
"clk_sel": 2 |
||||
}, |
||||
{ |
||||
"type": "zotino", |
||||
"ports": [5] |
||||
}, |
||||
{ |
||||
"type": "sampler", |
||||
"ports": [6, 7] |
||||
}, |
||||
{ |
||||
"type": "mirny", |
||||
"ports": [8], |
||||
"clk_sel": 1, |
||||
"refclk": 125e6 |
||||
}, |
||||
{ |
||||
"type": "fastino", |
||||
"ports": [9] |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [10], |
||||
"bank_direction_low": "input", |
||||
"bank_direction_high": "input" |
||||
}, |
||||
{ |
||||
"type": "dio", |
||||
"ports": [11], |
||||
"bank_direction_low": "output", |
||||
"bank_direction_high": "input" |
||||
} |
||||
] |
||||
} |
@ -1,16 +1,15 @@ |
||||
TARGET := zc706
|
||||
GWARGS := -V simple
|
||||
|
||||
all: ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin |
||||
all: ../build/runtime.bin |
||||
|
||||
.PHONY: all |
||||
|
||||
|
||||
../build/pl.rs ../build/rustc-cfg: gateware/* |
||||
../build/pl.rs ../build/rustc-cfg ../build/mem.rs: gateware/* |
||||
sb10q
commented 1 year ago
Review
What are these
mwojcik
commented 1 year ago
Review
I was aiming for clearer reference of the targets in nix-scripts, or when called manually. But it's unnecessary after all, it can be called straight up with the output file rule.
sb10q
commented 1 year ago
Review
OK, I see. Yes the manual command is a bit unwieldy, I suggest adding them back but listed as PHONY. I will merge this now, please send a new PR. |
||||
mkdir -p ../build
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(GWARGS)
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg -m ../build/mem.rs $(GWARGS)
|
||||
|
||||
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg $(shell find . -print) |
||||
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -print) |
||||
cd runtime && \
|
||||
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
||||
cargo xbuild --release \
|
||||
@ -19,3 +18,13 @@ all: ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin |
||||
|
||||
../build/runtime.bin: ../build/firmware/armv7-none-eabihf/release/runtime |
||||
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin
|
||||
|
||||
../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -print) |
||||
cd satman && \
|
||||
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
||||
cargo xbuild --release \
|
||||
--target-dir ../../build/firmware \
|
||||
--no-default-features --features=target_$(TARGET)
|
||||
|
||||
../build/satman.bin: ../build/firmware/armv7-none-eabihf/release/satman |
||||
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin
|
Loading…
Reference in new issue
You can read the JSON to determine that.
Nix has
builtins.fromJSON
zc706 doesn't use JSONs, though. Now that I think about it I could make it a bit better still by having the fwtype specified in the list of targets at the bottom, passed to the build function instead.