2019-04-05 10:56:47 -04:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
2022-02-09 19:53:12 -05:00
|
|
|
# Updated documentation of the configuration options is available at
|
|
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
2019-04-05 10:56:47 -04:00
|
|
|
|
|
|
|
import sys, os
|
2022-02-09 21:42:47 -05:00
|
|
|
from pathlib import Path
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-03-12 23:35:27 -05:00
|
|
|
from tabulate import tabulate
|
|
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parent
|
|
|
|
|
2019-04-05 10:56:47 -04:00
|
|
|
#sys.path.insert(0, os.path.abspath('.'))
|
|
|
|
|
2022-03-12 23:35:27 -05:00
|
|
|
# -- Generate status.inc -----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
with (ROOT / "status.inc").open("w", encoding="utf-8") as wfptr:
|
|
|
|
wfptr.write(
|
|
|
|
tabulate(
|
|
|
|
[
|
|
|
|
["[Basic Tiles] Logic", "Yes", "Yes", "Yes", "Yes"],
|
|
|
|
["[Basic Tiles] Block RAM", "Yes", "Yes", "Partial", "Yes"],
|
|
|
|
["[Advanced Tiles] DSP", "Yes", "Yes", "Partial", "Yes"],
|
|
|
|
["[Advanced Tiles] Hard Blocks", "Yes", "Yes", "Partial", "Yes"],
|
|
|
|
["[Advanced Tiles] Clock Tiles", "Yes", "Yes", "Yes", "Yes"],
|
|
|
|
["[Advanced Tiles] IO Tiles", "Yes", "Yes", "Yes", "Yes"],
|
|
|
|
["[Routing] Logic", "Yes", "Yes", "Yes", "Yes"],
|
|
|
|
["[Routing] Clock", "Yes", "Yes", "Yes", "Yes"],
|
|
|
|
],
|
|
|
|
headers=["", "Project Icestorm", "Project Trellis ", "Project X-Ray", "QuickLogic Database"],
|
|
|
|
tablefmt="rst",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------------------------------------------------
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-02-14 21:53:04 -05:00
|
|
|
project = 'F4PGA'
|
|
|
|
basic_filename = 'f4pga-docs'
|
|
|
|
authors = 'F4PGA Authors'
|
|
|
|
copyright = f'{authors}, 2019 - 2022'
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-02-09 19:53:12 -05:00
|
|
|
version = ''
|
|
|
|
release = '' # The full version, including alpha/beta/rc tags.
|
2020-02-24 09:33:13 -05:00
|
|
|
|
2019-10-01 06:35:54 -04:00
|
|
|
extensions = [
|
2022-03-08 20:47:32 -05:00
|
|
|
'sphinx.ext.extlinks',
|
2022-02-09 19:45:12 -05:00
|
|
|
'sphinx.ext.intersphinx',
|
2020-09-10 13:27:35 -04:00
|
|
|
'sphinx_verilog_domain'
|
2019-10-01 06:35:54 -04:00
|
|
|
]
|
2019-04-05 10:56:47 -04:00
|
|
|
|
|
|
|
numfig = True
|
|
|
|
|
|
|
|
templates_path = ['_templates']
|
|
|
|
|
2020-02-24 09:33:13 -05:00
|
|
|
source_suffix = ['.rst', '.md']
|
2019-04-05 10:56:47 -04:00
|
|
|
|
|
|
|
master_doc = 'index'
|
|
|
|
|
|
|
|
today_fmt = '%Y-%m-%d'
|
|
|
|
|
2022-02-09 21:19:21 -05:00
|
|
|
exclude_patterns = [
|
|
|
|
'env'
|
|
|
|
]
|
2019-04-05 10:56:47 -04:00
|
|
|
|
|
|
|
pygments_style = 'default'
|
|
|
|
|
2022-02-09 19:53:12 -05:00
|
|
|
rst_prolog = """
|
|
|
|
.. role:: raw-latex(raw)
|
|
|
|
:format: latex
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-02-09 19:53:12 -05:00
|
|
|
.. role:: raw-html(raw)
|
|
|
|
:format: html
|
|
|
|
"""
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-03-12 23:35:27 -05:00
|
|
|
# -- Options for HTML output -------------------------------------------------------------------------------------------
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-02-14 21:53:04 -05:00
|
|
|
html_show_sourcelink = True
|
|
|
|
|
|
|
|
html_theme = 'sphinx_symbiflow_theme'
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2019-09-26 06:55:09 -04:00
|
|
|
html_theme_options = {
|
2022-03-03 10:38:01 -05:00
|
|
|
'repo_name': 'chipsalliance/f4pga',
|
|
|
|
'github_url' : 'https://github.com/chipsalliance/f4pga',
|
2022-02-14 21:53:04 -05:00
|
|
|
'globaltoc_collapse': True,
|
2022-02-21 10:20:16 -05:00
|
|
|
'color_primary': 'indigo',
|
|
|
|
'color_accent': 'blue',
|
2019-09-26 06:55:09 -04:00
|
|
|
}
|
2019-04-05 10:56:47 -04:00
|
|
|
|
2022-02-09 21:42:47 -05:00
|
|
|
html_static_path = ['_static']
|
|
|
|
|
|
|
|
html_logo = str(Path(html_static_path[0]) / 'logo.svg')
|
|
|
|
html_favicon = str(Path(html_static_path[0]) / 'favicon.svg')
|
|
|
|
|
2022-03-12 23:35:27 -05:00
|
|
|
# -- Options for LaTeX output ------------------------------------------------------------------------------------------
|
2019-04-05 10:56:47 -04:00
|
|
|
|
|
|
|
latex_documents = [
|
|
|
|
('index', basic_filename+'.tex', project,
|
|
|
|
authors, 'manual'),
|
|
|
|
]
|
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
'papersize': 'a4paper',
|
|
|
|
'pointsize': '11pt',
|
|
|
|
'fontpkg': r'''
|
|
|
|
\usepackage{charter}
|
|
|
|
\usepackage[defaultsans]{lato}
|
|
|
|
\usepackage{inconsolata}
|
|
|
|
''',
|
|
|
|
'preamble': r'''
|
|
|
|
\usepackage{multicol}
|
|
|
|
''',
|
|
|
|
'maketitle': r'''
|
|
|
|
\renewcommand{\releasename}{}
|
|
|
|
\maketitle
|
|
|
|
''',
|
|
|
|
'classoptions':',openany,oneside',
|
|
|
|
'babel': r'''
|
|
|
|
\usepackage[english]{babel}
|
|
|
|
\makeatletter
|
|
|
|
\@namedef{ver@color.sty}{}
|
|
|
|
\makeatother
|
|
|
|
\usepackage{silence}
|
|
|
|
\WarningFilter{Fancyhdr}{\fancyfoot's `E' option without twoside}
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
|
2022-03-12 23:35:27 -05:00
|
|
|
# -- Options for manual page output ------------------------------------------------------------------------------------
|
2020-02-25 08:52:51 -05:00
|
|
|
|
2022-02-09 19:53:12 -05:00
|
|
|
man_pages = [
|
|
|
|
('index', basic_filename, project,
|
|
|
|
[authors], 1)
|
|
|
|
]
|
2022-02-09 19:45:12 -05:00
|
|
|
|
|
|
|
# -- Sphinx.Ext.InterSphinx --------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
intersphinx_mapping = {
|
|
|
|
"python": ("https://docs.python.org/3/", None),
|
2022-02-21 13:17:33 -05:00
|
|
|
"arch-defs": ("https://f4pga.readthedocs.io/projects/arch-defs/en/latest/", None),
|
2022-02-09 19:45:12 -05:00
|
|
|
"fasm": ("https://fasm.readthedocs.io/en/latest/", None),
|
|
|
|
"prjtrellis": ("https://prjtrellis.readthedocs.io/en/latest/", None),
|
2022-02-21 13:17:33 -05:00
|
|
|
"prjxray": ("https://f4pga.readthedocs.io/projects/prjxray/en/latest/", None),
|
2022-02-09 19:45:12 -05:00
|
|
|
"vtr": ("https://docs.verilogtorouting.org/en/latest/", None),
|
|
|
|
}
|
2022-03-08 20:47:32 -05:00
|
|
|
|
|
|
|
# -- Sphinx.Ext.ExtLinks -----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extlinks = {
|
|
|
|
'wikipedia': ('https://en.wikipedia.org/wiki/%s', 'wikipedia:'),
|
|
|
|
'gh': ('https://github.com/%s', 'gh:'),
|
|
|
|
'ghsharp': ('https://github.com/chipsalliance/f4pga/issues/%s', '#'),
|
|
|
|
'ghissue': ('https://github.com/chipsalliance/f4pga/issues/%s', 'issue #'),
|
|
|
|
'ghpull': ('https://github.com/chipsalliance/f4pga/pull/%s', 'pull request #'),
|
|
|
|
'ghsrc': ('https://github.com/chipsalliance/f4pga/blob/master/%s', '')
|
|
|
|
}
|