Merge remote-tracking branch 'origin/ganesh_dev' into dev
This commit is contained in:
commit
9abc1e1e7d
|
@ -55,7 +55,8 @@ extensions = [
|
||||||
'sphinx.ext.todo',
|
'sphinx.ext.todo',
|
||||||
'sphinx.ext.mathjax',
|
'sphinx.ext.mathjax',
|
||||||
'sphinx.ext.graphviz',
|
'sphinx.ext.graphviz',
|
||||||
'sphinxcontrib.bibtex'
|
'sphinxcontrib.bibtex',
|
||||||
|
'sphinx.ext.autosectionlabel',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -89,7 +90,7 @@ pygments_style = 'sphinx'
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
#Number figures for referencing
|
# Number figures for referencing
|
||||||
numfig = True
|
numfig = True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ General Arguments
|
||||||
|
|
||||||
.. option:: --debug
|
.. option:: --debug
|
||||||
|
|
||||||
To enable detail logs printing.
|
To enable detailed log printing.
|
||||||
|
|
||||||
.. option:: --flow_config
|
.. option:: --flow_config
|
||||||
|
|
||||||
|
|
|
@ -4,17 +4,17 @@ OpenFPGA Task
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Tasks provide a framework for running the :ref:`run_fpga_flow` on
|
Tasks provide a framework for running the :ref:`run_fpga_flow` on
|
||||||
multiple benchmarks, architectures and set of OpenFPGA parameters.
|
multiple benchmarks, architectures, and set of OpenFPGA parameters.
|
||||||
The structure of the framework is very similar to
|
The structure of the framework is very similar to
|
||||||
`VTR-Tasks <https://docs.verilogtorouting.org/en/latest/vtr/tasks/>`_
|
`VTR-Tasks <https://docs.verilogtorouting.org/en/latest/vtr/tasks/>`_
|
||||||
implementation with additional functionality and minor file extention changes.
|
implementation with additional functionality and minor file extension changes.
|
||||||
|
|
||||||
Task Directory
|
Task Directory
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The tasks are store in a ``TASK_DIRECTORY``, which by default points to
|
The tasks are stored in a ``TASK_DIRECTORY``, which by default points to
|
||||||
``${OPENFPGA_PATH}/openfpga_flow/tasks``. Every directory or sub-directory in
|
``${OPENFPGA_PATH}/openfpga_flow/tasks``. Every directory or sub-directory in
|
||||||
task directory consisting of ``../config/task.conf`` file can be reffered as a
|
task directory consisting of ``../config/task.conf`` file can be referred to as a
|
||||||
task.
|
task.
|
||||||
|
|
||||||
To create as task name called ``basic_flow`` following directory has to exist::
|
To create as task name called ``basic_flow`` following directory has to exist::
|
||||||
|
@ -31,22 +31,55 @@ Running OpenFPGA Task:
|
||||||
|
|
||||||
At a minimum ``open_fpga_flow.py`` requires following command-line arguments::
|
At a minimum ``open_fpga_flow.py`` requires following command-line arguments::
|
||||||
|
|
||||||
open_fpga_flow.py <task1_name> <task2_name> ...
|
open_fpga_flow.py <task1_name> <task2_name> ... [<options>]
|
||||||
|
|
||||||
where:
|
where:
|
||||||
|
|
||||||
* ``<task_name>`` is the name of the task to run
|
* ``<task_name>`` is the name of the task to run
|
||||||
|
* ``<options>`` Other command line arguments described below
|
||||||
|
|
||||||
|
|
||||||
Craeating A New OpenFPGA Task:
|
Command-line Options
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
Create the folder ``${TASK_DIRECTORY}/<task_name>`` and create a file called
|
|
||||||
``${TASK_DIRECTORY}/<task_name>/config/task.conf`` in it.
|
.. option:: --maxthreads <number_of_threads>
|
||||||
|
|
||||||
|
This option defines the number of threads to run while executing task.
|
||||||
|
Each combination of architecture, benchmark and set of OpenFPGA Flow options
|
||||||
|
runs in a individual thread.
|
||||||
|
|
||||||
|
.. option:: --skip_thread_logs
|
||||||
|
|
||||||
|
Passsing this option skips printing logs from each OpenFPGA Flow script run.
|
||||||
|
|
||||||
|
.. option:: --exit_on_fail
|
||||||
|
|
||||||
|
Passsing this option exits the OpenFPGA task script with returncode 1,
|
||||||
|
if any threads fail to execute successfully. It is mainly used to while
|
||||||
|
performing regression test.
|
||||||
|
|
||||||
|
.. option:: --test_run
|
||||||
|
|
||||||
|
This option allows to debug OpenFPGA Task script
|
||||||
|
by skiping actual execution of OpenFPGA flow .
|
||||||
|
Passing this option prints the list of
|
||||||
|
commnad generated to execute using OpenFPGA flow.
|
||||||
|
|
||||||
|
.. option:: --debug
|
||||||
|
|
||||||
|
To enable detailed log printing.
|
||||||
|
|
||||||
|
|
||||||
|
Creating a new OpenFPGA Task
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Configuring a New Task
|
- Create the folder ``${TASK_DIRECTORY}/<task_name>``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
- Create a file ``${TASK_DIRECTORY}/<task_name>/config/task.conf`` in it
|
||||||
|
- Configure the task as explained in :ref:`Configuring a new OpenFPGA Task`
|
||||||
|
|
||||||
|
|
||||||
|
Configuring a new OpenFPGA Task
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The task configuration file ``task.conf`` consists of ``GENERAL``,
|
The task configuration file ``task.conf`` consists of ``GENERAL``,
|
||||||
``ARCHITECTURES``, ``BENCHMARKS``, ``SYNTHESIS_PARAM`` and
|
``ARCHITECTURES``, ``BENCHMARKS``, ``SYNTHESIS_PARAM`` and
|
||||||
|
@ -54,16 +87,16 @@ The task configuration file ``task.conf`` consists of ``GENERAL``,
|
||||||
Declaring all the above sections are mandatory.
|
Declaring all the above sections are mandatory.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Configuration file supports all the OpenFPGA Variables refer
|
The configuration file supports all the OpenFPGA Variables refer
|
||||||
:ref:`openfpga-variables` section to know more. Variables in configuration
|
:ref:`openfpga-variables` section to know more. Variable in the configuration
|
||||||
file is declares as ``${PATH:<variable_name>}``
|
file is declared as ``${PATH:<variable_name>}``
|
||||||
|
|
||||||
General Section
|
General Section
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. option:: fpga_flow==<yosys_vpr|vpr_blif>
|
.. option:: fpga_flow==<yosys_vpr|vpr_blif>
|
||||||
|
|
||||||
Defines which OpenFPGA flow to run. By default ``yosys_vpr`` is executed.
|
This option defines which OpenFPGA flow to run. By default ``yosys_vpr`` is executed.
|
||||||
|
|
||||||
.. option:: power_analysis=<true|false>
|
.. option:: power_analysis=<true|false>
|
||||||
|
|
||||||
|
@ -71,7 +104,7 @@ General Section
|
||||||
|
|
||||||
.. option:: power_tech_file=<path_to_tech_XML_file>
|
.. option:: power_tech_file=<path_to_tech_XML_file>
|
||||||
|
|
||||||
Declares which tech XML file to be used while perforing Power Analysis.
|
Declares which tech XML file to use while performing Power Analysis.
|
||||||
|
|
||||||
.. option:: spice_output=<true|false>
|
.. option:: spice_output=<true|false>
|
||||||
|
|
||||||
|
@ -85,14 +118,13 @@ General Section
|
||||||
|
|
||||||
.. option:: timeout_each_job=<true|false>
|
.. option:: timeout_each_job=<true|false>
|
||||||
|
|
||||||
Specifies the the timeout for each :ref:`run_fpga_flow` execution. Default
|
Specifies the timeout for each :ref:`run_fpga_flow` execution. Default is set to ``20 min. ``
|
||||||
is set to ``20 min``
|
|
||||||
|
|
||||||
|
|
||||||
Architectures Sections
|
Architectures Sections
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
User can define the list of architecure files in this section.
|
User can define the list of architecture files in this section.
|
||||||
|
|
||||||
.. option:: arch<arch_label>=<xml_architecture_file_path>
|
.. option:: arch<arch_label>=<xml_architecture_file_path>
|
||||||
|
|
||||||
|
@ -102,7 +134,7 @@ Architectures Sections
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
In final OpenFPGA Task result the architecture will be referred by its
|
In the final OpenFPGA Task result, the architecture will be referred by its
|
||||||
``arch_label``.
|
``arch_label``.
|
||||||
|
|
||||||
Benchmarks Sections
|
Benchmarks Sections
|
||||||
|
@ -117,7 +149,7 @@ Benchmarks Sections
|
||||||
architecture file
|
architecture file
|
||||||
|
|
||||||
For Example following code shows how to define a benchmarks,
|
For Example following code shows how to define a benchmarks,
|
||||||
with single file multiple files and files added from specific directory.
|
with a single file, multiple files and files added from a specific directory.
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
|
@ -133,17 +165,17 @@ Benchmarks Sections
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
``bench_label`` is referred again in ``Synthesis_Param`` section to
|
``bench_label`` is referred again in ``Synthesis_Param`` section to
|
||||||
provide addional information about benchmark
|
provide additional information about benchmark
|
||||||
|
|
||||||
Synthesis Parameter Sections
|
Synthesis Parameter Sections
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
User can define extra parameters for each benchmark defined in the
|
User can define extra parameters for each benchmark in the
|
||||||
``BENCHMARKS`` sections.
|
``BENCHMARKS`` sections.
|
||||||
|
|
||||||
.. option:: bench<bench_label>_top=<Top_Module_Name>
|
.. option:: bench<bench_label>_top=<Top_Module_Name>
|
||||||
|
|
||||||
This defines the Top Level module name for ``bench_label`` benchmark.
|
This option defines the Top Level module name for ``bench_label`` benchmark.
|
||||||
By default, the top level module name is cosidereed as a ``top``.
|
By default, the top-level module name is considered as a ``top``.
|
||||||
|
|
||||||
.. option:: bench<bench_label>_yosys_tmpl=<yosys_template_file>
|
.. option:: bench<bench_label>_yosys_tmpl=<yosys_template_file>
|
||||||
|
|
||||||
|
@ -163,13 +195,13 @@ Synthesis Parameter Sections
|
||||||
.. option:: bench<bench_label>_verilog=<source_verilog_file_path>
|
.. option:: bench<bench_label>_verilog=<source_verilog_file_path>
|
||||||
|
|
||||||
In case of running ``blif_vpr_flow`` with verification this option provides
|
In case of running ``blif_vpr_flow`` with verification this option provides
|
||||||
the source verilog design for ``bench_label`` benchmark to be used
|
the source Verilog design for ``bench_label`` benchmark to be used
|
||||||
while verification.
|
while verification.
|
||||||
|
|
||||||
Script Parameter Sections
|
Script Parameter Sections
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
The script parameter section lists set of commnad line pararmeters to be passed to :ref:`run_fpga_flow` script. The section name is defines as ``SCRIPT_PARAM_<parameter_set_label>`` where `parameter_set_label` can be any word without white spaces.
|
The script parameter section lists set of commnad line pararmeters to be passed to :ref:`run_fpga_flow` script. The section name is defines as ``SCRIPT_PARAM_<parameter_set_label>`` where `parameter_set_label` can be any word without white spaces.
|
||||||
The section is referred with ``parameter_set_label`` in final result file.
|
The section is referred with ``parameter_set_label`` in the final result file.
|
||||||
|
|
||||||
For example following code Specifies the two sets (``Fixed_Routing_30`` and ``Fixed_Routing_50``) of :ref:`run_fpga_flow` arguments.
|
For example following code Specifies the two sets (``Fixed_Routing_30`` and ``Fixed_Routing_50``) of :ref:`run_fpga_flow` arguments.
|
||||||
|
|
||||||
|
@ -184,7 +216,7 @@ For example following code Specifies the two sets (``Fixed_Routing_30`` and ``Fi
|
||||||
fix_route_chan_width=50
|
fix_route_chan_width=50
|
||||||
|
|
||||||
Example Task Configuration File
|
Example Task Configuration File
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
[GENERAL]
|
[GENERAL]
|
||||||
|
@ -210,4 +242,3 @@ Example Task Configuration File
|
||||||
|
|
||||||
[SCRIPT_PARAM_Slack_80]
|
[SCRIPT_PARAM_Slack_80]
|
||||||
min_route_chan_width=1.8
|
min_route_chan_width=1.8
|
||||||
|
|
||||||
|
|
|
@ -452,6 +452,7 @@ def run_yosys_with_abc():
|
||||||
if process.returncode:
|
if process.returncode:
|
||||||
logger.info("Yosys failed with returncode %d",
|
logger.info("Yosys failed with returncode %d",
|
||||||
process.returncode)
|
process.returncode)
|
||||||
|
raise subprocess.CalledProcessError(0, command)
|
||||||
except:
|
except:
|
||||||
logger.exception("Failed to run yosys")
|
logger.exception("Failed to run yosys")
|
||||||
clean_up_and_exit("")
|
clean_up_and_exit("")
|
||||||
|
@ -522,6 +523,7 @@ def run_ace2():
|
||||||
if process.returncode:
|
if process.returncode:
|
||||||
logger.info("ACE2 failed with returncode %d",
|
logger.info("ACE2 failed with returncode %d",
|
||||||
process.returncode)
|
process.returncode)
|
||||||
|
raise subprocess.CalledProcessError(0, command)
|
||||||
except:
|
except:
|
||||||
logger.exception("Failed to run ACE2")
|
logger.exception("Failed to run ACE2")
|
||||||
clean_up_and_exit("")
|
clean_up_and_exit("")
|
||||||
|
@ -771,6 +773,7 @@ def run_standard_vpr(bench_blif, fixed_chan_width, logfile, route_only=False):
|
||||||
if process.returncode:
|
if process.returncode:
|
||||||
logger.info("Standard VPR run failed with returncode %d",
|
logger.info("Standard VPR run failed with returncode %d",
|
||||||
process.returncode)
|
process.returncode)
|
||||||
|
raise subprocess.CalledProcessError(0, command)
|
||||||
except (Exception, subprocess.CalledProcessError) as e:
|
except (Exception, subprocess.CalledProcessError) as e:
|
||||||
logger.exception("Failed to run VPR")
|
logger.exception("Failed to run VPR")
|
||||||
filter_failed_process_output(e.output)
|
filter_failed_process_output(e.output)
|
||||||
|
|
|
@ -55,7 +55,7 @@ parser.add_argument('--debug', action="store_true",
|
||||||
help="Run script in debug mode")
|
help="Run script in debug mode")
|
||||||
parser.add_argument('--exit_on_fail', action="store_true",
|
parser.add_argument('--exit_on_fail', action="store_true",
|
||||||
help="Exit script with return code")
|
help="Exit script with return code")
|
||||||
parser.add_argument('--skip_tread_logs', action="store_true",
|
parser.add_argument('--skip_thread_logs', action="store_true",
|
||||||
help="Skips logs from running thread")
|
help="Skips logs from running thread")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ def run_single_script(s, eachJob):
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
for line in process.stdout:
|
for line in process.stdout:
|
||||||
if not args.skip_tread_logs:
|
if not args.skip_thread_logs:
|
||||||
strip_child_logger_info(line[:-1])
|
strip_child_logger_info(line[:-1])
|
||||||
sys.stdout.buffer.flush()
|
sys.stdout.buffer.flush()
|
||||||
output.write(line)
|
output.write(line)
|
||||||
|
|
Loading…
Reference in New Issue