From 12c998c12a51cf519d29738dbb5f27142c3d372f Mon Sep 17 00:00:00 2001 From: Ganesh Gore Date: Sat, 17 Aug 2019 16:22:52 -0600 Subject: [PATCH] Added dockerignore + minor changes in openfpga_flow script --- .dockerignore | 2 ++ Dockerfile | 4 ++-- openfpga_flow/scripts/run_fpga_flow.py | 14 +++++++++----- run_local.sh | 3 +++ 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .dockerignore create mode 100644 run_local.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..2e0e43deb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# Ignore everything +* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 054914852..bf0ea6d24 100755 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,9 @@ RUN apt-get -y install autoconf automake bison build-essential cmake ctags curl RUN mkdir -p /release /dev -RUN cd release && git clone --single-branch --branch documentation https://github.com/LNIS-Projects/OpenFPGA.git OpenFPGA +RUN cd release && git clone --single-branch --branch master https://github.com/LNIS-Projects/OpenFPGA.git OpenFPGA -RUN cd /release/OpenFPGA && mkdir build && cd build && cmake .. -CMAKE_BUILD_TYPE=debug && make +RUN cd /release/OpenFPGA && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_NO_GRAPHICS=on && make -j RUN rm -rf /var/lib/apt/lists/* diff --git a/openfpga_flow/scripts/run_fpga_flow.py b/openfpga_flow/scripts/run_fpga_flow.py index efdf01345..d242daa03 100644 --- a/openfpga_flow/scripts/run_fpga_flow.py +++ b/openfpga_flow/scripts/run_fpga_flow.py @@ -507,7 +507,7 @@ def run_vpr(): logger.info("Routing with channel width=%d successful" % min_channel_width) break - elif args.min_channel_width > (min_channel_width-2): + elif args.max_route_width_retry < (min_channel_width-2): clean_up_and_exit("Failed to route within maximum " + "iteration of channel width") else: @@ -663,8 +663,9 @@ def run_standard_vpr(bench_blif, fixed_chan_width, logfile): if process.returncode: logger.info("Standard VPR run failed with returncode %d", process.returncode) - except: + except Exception as e: logger.exception("Failed to run VPR") + process_failed_vpr_run(e.output) clean_up_and_exit("") logger.info("VPR output is written in file %s" % logfile) return int(chan_width) @@ -816,7 +817,8 @@ def run_netlists_verification(): command = [cad_tools["iverilog_path"]] command += ["-o", compiled_file] - command += [cad_tools["include_netlist_verification"]] + command += ["./SRC/%s_ace_corrected_out_include_netlists.v" % + args.top_module] command += ["-s"] if args.vpr_fpga_verilog_formal_verification_top_netlist: command += [tb_top_formal] @@ -841,8 +843,9 @@ def run_command(taskname, logfile, command, exit_if_fail=True): if process.returncode: logger.error("%s run failed with returncode %d" % (taskname, process.returncode)) - except: - logger.exception() + except Exception as e: + logger.exception("failed to execute %s" % taskname) + process_failed_vpr_run(e.output) if exit_if_fail: clean_up_and_exit("Failed to run %s task" % taskname) logger.info("%s is written in file %s" % (taskname, logfile)) @@ -860,6 +863,7 @@ def process_failed_vpr_run(vpr_output): if "error" in line.lower(): logger.error("-->>" + line) + if __name__ == "__main__": # Setting up print and logging system logging.basicConfig(level=logging.INFO, stream=sys.stdout, diff --git a/run_local.sh b/run_local.sh new file mode 100644 index 000000000..b560b1611 --- /dev/null +++ b/run_local.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run -it --rm -v "${PWD}":/root/dev/OpenFPGA -w="/root/dev/OpenFPGA" goreganesh/open_fpga bash +pause