diff --git a/README.md b/README.md index a79e76002..fa5562f7a 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,19 @@ ## Introduction -The award-winning OpenFPGA framework is the **first open-source FPGA IP generator** supporting highly-customizable homogeneous FPGA architectures. OpenFPGA provides a full set of EDA support for customized FPGAs, including Verilog-to-bitstream generation and self-testing verification. OpenFPGA opens the door to democratizing FPGA technology and EDA techniques, with agile prototyping approaches and constantly evolving EDA tools for chip designers and researchers. +The award-winning OpenFPGA framework is the **first open-source FPGA IP generator** supporting highly-customizable homogeneous FPGA architectures. OpenFPGA provides complete EDA support for customized FPGAs, including Verilog-to-bitstream generation and self-testing verification. OpenFPGA opens the door to democratizing FPGA technology and EDA techniques with agile prototyping approaches and constantly evolving EDA tools for chip designers and researchers. -**If this is the first time you learn OpenFPGA, we strongly recommend you to watch the [introduction video about OpenFPGA](https://youtu.be/ocODUGcYGqo)** +**If this is your first time working with OpenFPGA, we strongly **recommend you watch the** [introduction video about OpenFPGA](https://youtu.be/ocODUGcYGqo)** A quick overview of OpenFPGA tools can be found [**here**](https://openfpga.readthedocs.io/en/master/tutorials/getting_started/tools/). -We also recommend potential users to checkout the summary of [**technical capabilities**](https://openfpga.readthedocs.io/en/master/overview/tech_highlights/#) before compiling. +We also recommend potential users check out the summary of [**technical capabilities**](https://openfpga.readthedocs.io/en/master/overview/tech_highlights/#) before compiling. ## Compilation -**A tutorial video about how-to-compile can be found [here](https://youtu.be/F9sMRmDewM0)** +**A tutorial **video about **how to compile** can be** found [here](https://youtu.be/F9sMRmDewM0)** -Before start, we strongly recommend you to read the required dependencies at [**compilation guidelines**](https://openfpga.readthedocs.io/en/master/tutorials/getting_started/compile/). -It also includes detailed information about docker image. +Before starting, we strongly recommend you read the required dependencies at [**compilation guidelines**](https://openfpga.readthedocs.io/en/master/tutorials/getting_started/compile/). +It also includes detailed information about the docker image. --- @@ -33,12 +33,13 @@ make all **Quick Compilation Verification** -To quickly verify the tool is well compiled, user can run the following command from OpenFPGA root repository. +To quickly verify the tool is well compiled, the user can run the following command from the OpenFPGA root directory. ```bash -python3 openfpga_flow/scripts/run_fpga_task.py compilation_verification --debug --show_thread_logs +source openfpga.sh +run-task compilation_verification --debug --show_thread_logs ``` -*Python3 and iVerilog v10.1+ are required. GUI will pop-up if enabled during compilation.* +*Python3 and iVerilog v10.1+ are required. GUI will pop up if enabled during compilation.* --- @@ -50,10 +51,20 @@ We currently target OpenFPGA for: *The tool was tested with these operating systems. It might work with earlier versions and other distributions.* +## Running with pre-built docker image + +```bash +# To get the docker image from the repository, +docker pull ghcr.io/lnis-uofu/openfpga-master:latest + +# To invoke openfpga_shell +docker run -it ghcr.io/lnis-uofu/openfpga-master:latest openfpga/openfpga bash +``` + ## Documentation OpenFPGA's [full documentation](https://openfpga.readthedocs.io/en/master/) includes tutorials, descriptions of the design flow, and tool options. ## Tutorials -You can find a set of [tutorials](https://openfpga.readthedocs.io/en/master/tutorials/), with which you get familiar with the tool and use OpenFPGA in various purposes. +You can find a set of [tutorials](https://openfpga.readthedocs.io/en/master/tutorials/), with which you get familiar with the tool and use OpenFPGA for various purposes. diff --git a/docs/source/tutorials/getting_started/compile.rst b/docs/source/tutorials/getting_started/compile.rst index 17d333be0..2e9b8109c 100644 --- a/docs/source/tutorials/getting_started/compile.rst +++ b/docs/source/tutorials/getting_started/compile.rst @@ -66,19 +66,21 @@ This image contains precompiled OpenFPGA binaries with all prerequisites install .. code-block:: bash - # To get the docker image from the repository, docker pull ghcr.io/lnis-uofu/openfpga-master:latest + # To get the docker image from the repository, + docker pull ghcr.io/lnis-uofu/openfpga-master:latest # To invoke openfpga_shell - docker run -it ghcr.io/lnis-uofu/openfpga-master:latest openfpga/openfpga -i + docker run -it ghcr.io/lnis-uofu/openfpga-master:latest openfpga/openfpga bash # To run the task that already exists in the repository. docker run -it ghcr.io/lnis-uofu/openfpga-master:latest bash -c "source openfpga.sh && run-task compilation_verification" - # To run a task from a local machine - mkdir <>/config - vi <>/config/task.config # Create your task configuration - TASK_NAME=<> docker run -it -v ${PWD}/${TASK_NAME}:/opt/openfpga/openfpga_flow/tasks/${TASK_NAME} ghcr.io/lnis-uofu/openfpga-master:latest bash -c "source openfpga.sh && run-task ${TASK_NAME}" + # To link the local directory wihth docker + mkdir work + + docker run -it -v work:/opt/openfpga/ ghcr.io/lnis-uofu/openfpga-master:latest bash + # Inside container + source openfpga.sh + cd work + create_task _my_task yosys_vpr -.. note:: - While running local task using docker, make sure all the additional files - are maintained in the task_directory and reference using variable ${TASK_DIR} diff --git a/openfpga_flow/scripts/run_fpga_task.py b/openfpga_flow/scripts/run_fpga_task.py index 6503bc948..6b6e43294 100644 --- a/openfpga_flow/scripts/run_fpga_task.py +++ b/openfpga_flow/scripts/run_fpga_task.py @@ -244,7 +244,7 @@ def generate_each_task_actions(taskname): clean_up_and_exit("Found duplicate architectures in config file") # Get Flow information - logger.info('Running "%s" flow' % + logger.info('Running "%s" flow', GeneralSection.get("fpga_flow", fallback="yosys_vpr")) # Check if specified benchmark files exist @@ -513,7 +513,7 @@ def run_single_script(s, eachJob, job_list): raise subprocess.CalledProcessError(0, " ".join(command)) eachJob["status"] = True except: - logger.exception("Failed to execute openfpga flow - " + + logger.exception("Failed to execute openfpga flow - %s", eachJob["name"]) if not args.continue_on_fail: os._exit(1) @@ -521,11 +521,11 @@ def run_single_script(s, eachJob, job_list): timediff = timedelta(seconds=(eachJob["endtime"]-eachJob["starttime"])) timestr = humanize.naturaldelta(timediff) if "humanize" in sys.modules \ else str(timediff) - logger.info("%s Finished with returncode %d, Time Taken %s " % - (thread_name, process.returncode, timestr)) + logger.info("%s Finished with returncode %d, Time Taken %s " , + thread_name, process.returncode, timestr) eachJob["finished"] = True no_of_finished_job = sum([not eachJ["finished"] for eachJ in job_list]) - logger.info("***** %d runs pending *****" % (no_of_finished_job)) + logger.info("***** %d runs pending *****" , no_of_finished_job) def run_actions(job_list): @@ -566,7 +566,7 @@ def collect_results(job_run_list): if len(task_result): with open("task_result.csv", 'w', newline='') as csvfile: writer = csv.DictWriter( - csvfile, extrasaction='ignore', fieldnames=list(set(colnames))) + csvfile, extrasaction='ignore', fieldnames=list(colnames)) writer.writeheader() for eachResult in task_result: writer.writerow(eachResult)