mirror of https://github.com/openXC7/prjxray.git
commit
f10f9141fb
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
N := 1
|
||||
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS := $(addprefix build/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
|
||||
database: $(SPECIMENS_OK)
|
||||
|
|
@ -20,7 +20,7 @@ run:
|
|||
touch run.ok
|
||||
|
||||
clean:
|
||||
rm -rf specimen_[0-9][0-9][0-9]/ run.ok
|
||||
rm -rf build run.ok
|
||||
|
||||
.PHONY: database pushdb run clean
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
${XRAY_VIVADO} -mode batch -source ../generate.tcl
|
||||
python3 $FUZDIR/run_fuzzer.py
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
create_project -force -part $::env(XRAY_PART) design design
|
||||
set_property design_mode PinPlanning [current_fileset]
|
||||
open_io_design -name io_1
|
||||
|
||||
set downhill_fp [open downhill_wires.txt w]
|
||||
set uphill_fp [open uphill_wires.txt w]
|
||||
#set_param tcl.collectionResultDisplayLimit 0
|
||||
foreach pip [get_pips] {
|
||||
foreach downhill_node [get_nodes -downhill -of_object $pip] {
|
||||
set ordered_downhill_wires [get_wires -from $pip -of_object $downhill_node]
|
||||
puts $downhill_fp "$pip $downhill_node $ordered_downhill_wires"
|
||||
}
|
||||
foreach uphill_node [get_nodes -uphill -of_object $pip] {
|
||||
set ordered_uphill_wires [get_wires -to $pip -of_object $uphill_node]
|
||||
puts $uphill_fp "$pip $uphill_node $ordered_uphill_wires"
|
||||
}
|
||||
}
|
||||
close $downhill_fp
|
||||
close $uphill_fp
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
create_project -force -part $::env(XRAY_PART) design design
|
||||
set_property design_mode PinPlanning [current_fileset]
|
||||
open_io_design -name io_1
|
||||
|
||||
#set_param tcl.collectionResultDisplayLimit 0
|
||||
set_param messaging.disableStorage 1
|
||||
|
||||
set nbpips_fp [open nb_pips.txt w]
|
||||
|
||||
set pips [get_pips]
|
||||
puts $nbpips_fp [llength $pips]
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
set blocknb [lindex $argv 0]
|
||||
set start [expr int([lindex $argv 1])]
|
||||
set stop [expr int([lindex $argv 2])]
|
||||
|
||||
create_project -force -part $::env(XRAY_PART) $blocknb $blocknb
|
||||
set_property design_mode PinPlanning [current_fileset]
|
||||
open_io_design -name io_1
|
||||
|
||||
#set_param tcl.collectionResultDisplayLimit 0
|
||||
set_param messaging.disableStorage 1
|
||||
|
||||
set pips [get_pips]
|
||||
|
||||
set dwnhill_fp [open "wires/downhill_wires_${blocknb}.txt" w]
|
||||
set uphill_fp [open "wires/uphill_wires_${blocknb}.txt" w]
|
||||
|
||||
for { set i $start } { $i < $stop } { incr i } {
|
||||
set pip [lindex $pips $i]
|
||||
foreach downhill_node [get_nodes -downhill -of_object $pip] {
|
||||
set ordered_downhill_wires [get_wires -from $pip -of_object $downhill_node]
|
||||
puts $dwnhill_fp "$pip $downhill_node $ordered_downhill_wires"
|
||||
}
|
||||
foreach uphill_node [get_nodes -uphill -of_object $pip] {
|
||||
set ordered_uphill_wires [get_wires -to $pip -of_object $uphill_node]
|
||||
puts $uphill_fp "$pip $uphill_node $ordered_uphill_wires"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close $dwnhill_fp
|
||||
close $uphill_fp
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import subprocess
|
||||
import signal
|
||||
from multiprocessing import Pool
|
||||
|
||||
|
||||
def start_vivado(argList):
|
||||
print(argList)
|
||||
blockID, start, stop = argList
|
||||
print("Running instance :" + str(blockID))
|
||||
subprocess.check_call(
|
||||
"${XRAY_VIVADO} -mode batch -source $FUZDIR/job.tcl -tclargs " +
|
||||
str(blockID) + " " + str(start) + " " + str(stop),
|
||||
shell=True)
|
||||
|
||||
|
||||
def get_nb_pips():
|
||||
print("Fetching nb pips")
|
||||
subprocess.check_call(
|
||||
"${XRAY_VIVADO} -mode batch -source $FUZDIR/get_pipscount.tcl",
|
||||
shell=True)
|
||||
countfile = open("nb_pips.txt", "r")
|
||||
return int(countfile.readline())
|
||||
|
||||
|
||||
def main(argv):
|
||||
nbBlocks = 64
|
||||
nbParBlock = 4
|
||||
|
||||
pipscount = get_nb_pips()
|
||||
blocksize = int(pipscount / nbBlocks)
|
||||
|
||||
if not os.path.exists("wires"):
|
||||
os.mkdir("wires")
|
||||
|
||||
print(
|
||||
"Pips Count: " + str(pipscount) + " - Number of blocks: " +
|
||||
str(nbBlocks) + " - Parallel blocks: " + str(nbParBlock) +
|
||||
" - Blocksize: " + str(blocksize))
|
||||
|
||||
blockId = range(0, nbBlocks)
|
||||
startI = range(0, pipscount, blocksize)
|
||||
stopI = range(blocksize, pipscount + 1, blocksize)
|
||||
|
||||
argList = zip(blockId, startI, stopI)
|
||||
|
||||
with Pool(processes=nbParBlock) as pool:
|
||||
pool.map(start_vivado, argList)
|
||||
|
||||
print("Generating final files")
|
||||
|
||||
with open("uphill_wires.txt", "w") as wfd:
|
||||
for j in range(0, nbBlocks):
|
||||
f = "wires/uphill_wires_" + str(j) + ".txt"
|
||||
with open(f, "r") as fd:
|
||||
shutil.copyfileobj(fd, wfd)
|
||||
|
||||
with open("downhill_wires.txt", "w") as wed:
|
||||
for j in range(0, nbBlocks):
|
||||
e = "wires/downhill_wires_" + str(j) + ".txt"
|
||||
with open(e, "r") as ed:
|
||||
shutil.copyfileobj(ed, wed)
|
||||
|
||||
print("Work done !")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
N := 1
|
||||
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS := $(addprefix build/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
|
||||
database: $(SPECIMENS_OK)
|
||||
true
|
||||
|
||||
pushdb:
|
||||
cp specimen_001/*.csv ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
cp build/specimen_001/*.csv ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
|
||||
$(SPECIMENS_OK):
|
||||
bash generate.sh $(subst /OK,,$@)
|
||||
|
|
@ -20,7 +20,7 @@ run:
|
|||
touch run.ok
|
||||
|
||||
clean:
|
||||
rm -rf specimen_[0-9][0-9][0-9]/ run.ok
|
||||
rm -rf build run.ok
|
||||
|
||||
.PHONY: database pushdb run clean
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
${XRAY_VIVADO} -mode batch -source ../generate.tcl
|
||||
${XRAY_VIVADO} -mode batch -source $FUZDIR/generate.tcl
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
N := 1
|
||||
SPECIMENS := $(addprefix specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS := $(addprefix build/specimen_,$(shell seq -f '%03.0f' $(N)))
|
||||
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
|
||||
|
||||
database: $(SPECIMENS_OK)
|
||||
true
|
||||
|
||||
pushdb:
|
||||
cp output/tile_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
cp build/output/tile_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
rm ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/tile_type_*_site_type_*.json
|
||||
cp output/site_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
cp output/tileconn.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
cp build/output/site_type_*.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
cp build/output/tileconn.json ${XRAY_DATABASE_DIR}/$(XRAY_DATABASE)/
|
||||
|
||||
$(SPECIMENS_OK):
|
||||
bash generate.sh $(subst /OK,,$@)
|
||||
|
|
@ -23,7 +23,7 @@ run:
|
|||
touch run.ok
|
||||
|
||||
clean:
|
||||
rm -rf specimen_[0-9][0-9][0-9]/ output/ run.ok
|
||||
rm -rf build run.ok
|
||||
|
||||
.PHONY: database pushdb run clean
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
source ${XRAY_GENHEADER}
|
||||
|
||||
${XRAY_VIVADO} -mode batch -source ../generate.tcl
|
||||
${XRAY_VIVADO} -mode batch -source $FUZDIR/generate.tcl
|
||||
|
||||
cd .. && ./generate_after_dump.sh
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
#!/bin/bash -xe
|
||||
|
||||
rm -rf output
|
||||
mkdir -p output
|
||||
rm -rf build/output
|
||||
mkdir -p build/output
|
||||
python3 reduce_tile_types.py \
|
||||
--root_dir specimen_001/ \
|
||||
--output_dir output
|
||||
--root_dir build/specimen_001/ \
|
||||
--output_dir build/output
|
||||
python3 create_node_tree.py \
|
||||
--dump_all_root_dir specimen_001/ \
|
||||
--ordered_wires_root_dir ../072-ordered_wires/specimen_001/ \
|
||||
--output_dir output
|
||||
python3 reduce_site_types.py --output_dir output
|
||||
python3 generate_grid.py --root_dir specimen_001/ --output_dir output \
|
||||
--dump_all_root_dir build/specimen_001/ \
|
||||
--ordered_wires_root_dir ../072-ordered_wires/build/specimen_001/ \
|
||||
--output_dir build/output
|
||||
python3 reduce_site_types.py --output_dir build/output
|
||||
python3 generate_grid.py --root_dir build/specimen_001/ --output_dir build/output \
|
||||
--ignored_wires ${XRAY_DATABASE}_ignored_wires.txt
|
||||
|
|
|
|||
Loading…
Reference in New Issue