Overwriting old documentation without DCO
Signed-off-by: Michael Gielda <mgielda@antmicro.com>
This commit is contained in:
commit
caf9e185ef
|
@ -0,0 +1,3 @@
|
|||
build/
|
||||
*.pyc
|
||||
*.sw*
|
|
@ -0,0 +1,113 @@
|
|||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
CMDS = cd source/prjxray/docs && make links && cd - &&
|
||||
SPHINXBUILD = $(CMDS) sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp epub latex latexpdf text man changes linkcheck doctest
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
sed -i 's/PDFLATEX = pdflatex/PDFLATEX = texfot pdflatex/' $(BUILDDIR)/latex/Makefile
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
sed -i 's/PDFLATEX = pdflatex/PDFLATEX = texfot pdflatex/' $(BUILDDIR)/latex/Makefile
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
make -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
|
@ -0,0 +1 @@
|
|||
git+https://github.com/SymbiFlow/sphinx_symbiflow_theme
|
|
@ -0,0 +1,245 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
needs_sphinx = '1.6'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.todo']
|
||||
|
||||
numfig = True
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'SymbiFlow - documentation'
|
||||
basic_filename = u'symbiflow-docs'
|
||||
authors = u'SymbiFlow'
|
||||
copyright = authors + u', 2019'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = ''
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = ''
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
today_fmt = '%Y-%m-%d'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'default'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
|
||||
html_theme = "sphinx_symbiflow_theme"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = None
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
html_title = project
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
html_last_updated_fmt = today_fmt
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
html_show_sphinx = False
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = basic_filename
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', basic_filename+'.tex', project,
|
||||
authors, 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', basic_filename, project,
|
||||
[authors], 1)
|
||||
]
|
||||
|
||||
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}
|
||||
'''
|
||||
}
|
||||
|
||||
rst_prolog = """
|
||||
.. role:: raw-latex(raw)
|
||||
:format: latex
|
||||
|
||||
.. role:: raw-html(raw)
|
||||
:format: html
|
||||
"""
|
|
@ -0,0 +1,217 @@
|
|||
FPGA ASM (FASM) Specification
|
||||
=============================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The FASM is a file format designed to specify the bits in an FPGA bitstream that need to be set (e.g. binary 1) or cleared (e.g. binary 0).
|
||||
|
||||
A FASM file declares that specific "Features" within the bitstream should be enabled. Enabling a feature will cause bits within the bitstream to be set or cleared.
|
||||
|
||||
A FASM file is illegal if a bit in the final bitstream must be set and cleared to respect the set of features specified in the FASM file.
|
||||
|
||||
An empty FASM file will generate a platform specific "default" bitstream. The FASM file will specific zero or more features that mutate the "default" bitstream into the target bitstream.
|
||||
|
||||
File Syntax description
|
||||
-----------------------
|
||||
|
||||
FASM is a line oriented format.
|
||||
|
||||
* A single FASM line will do nothing (blank or comments or annotations) or enable a set of features.
|
||||
* The FASM file format does not support line continuations. Enabling a feature will always be contained within one line.
|
||||
* Constants and arrays follow verilog syntax
|
||||
|
||||
Due to the line orientated format, a FASM file has the following properties:
|
||||
|
||||
* Removing a line from a FASM file, produces a FASM file.
|
||||
* Concatenating two FASM files together, produces a FASM file.
|
||||
* Sorting a FASM file does not change the resulting bitstream.
|
||||
|
||||
If two FASM files are identical, then the resulting bitstream should have identical set of features are enabled. FASM does support various equivalent forms for enabling features, so there is a "canonical" form of a FASM file that removes this variation. If the canonical forms of two FASM files are the same, then they must generate the same bitstream.
|
||||
|
||||
Lines
|
||||
+++++
|
||||
|
||||
Examples FASM feature lines
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Canonical enabling of feature
|
||||
`````````````````````````````
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
# Set a single feature bit to 1 (with an implicit 1)
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0
|
||||
CLBLL_L_X12Y124.SLICEL_X0.BLUT.INIT[17]
|
||||
|
||||
Recommended bitarray
|
||||
````````````````````
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
# Setting a bitarray
|
||||
CLBLL_R_X13Y132.SLICEL_X0.ALUT.INIT[63:32] = 32'b11110000111100001111000011110000
|
||||
|
||||
Permitted advanced variations
|
||||
`````````````````````````````
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
# The bitarray syntax also allows explicit 1 and explicit 0, if verbosity is desired.
|
||||
# An explicit 1 is the same as an implicit 1.
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 = 1
|
||||
CLBLL_L_X12Y124.SLICEL_X0.BLUT.INIT[17] = 1
|
||||
# Explicit bit range to 1
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0[0:0] = 1'b1
|
||||
CLBLL_L_X12Y124.SLICEL_X0.BLUT.INIT[17:17] = 1'b1
|
||||
|
||||
# An explicit 0 has no effect on the bitstream output.
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 = 0
|
||||
CLBLL_L_X12Y124.SLICEL_X0.BLUT.INIT[17] = 0
|
||||
# Explicit bit range to 0
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0[0:0] = 1'b0
|
||||
CLBLL_L_X12Y124.SLICEL_X0.BLUT.INIT[17:17] = 1'b0
|
||||
|
||||
Annotations
|
||||
+++++++++++
|
||||
|
||||
To allow tools to output machine usable annotations (e.g. compiler metadata), annotations are supported. Annotations can be on the line with a FASM feature, or on a line by itself. An annotations must not change the output bitstream. If an annotation would have an affect on the output bitstream, it should be a FASM feature.
|
||||
|
||||
Annotations that are on the same line as a FASM feature are associated with the feature. Annotations that are on a line with no FASM feature as associated with the FASM file itself.
|
||||
|
||||
Example Annotations
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
# Annotation on a FASM feature
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 { .attr = "" }
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 { .filename = "/a/b/c.txt" }
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 { module = "top", file = "/a/b/d.txt", line_number = "123" }
|
||||
|
||||
# Annotation by itself
|
||||
{ .top_module = "/a/b/c/d.txt" }
|
||||
|
||||
# Annotation with FASM feature and comment
|
||||
INT_L_X10Y146.SW6BEG0.WW2END0 { .top_module = "/a/b/c/d.txt" } # This is a comment
|
||||
|
||||
Formal syntax specification of a line of a FASM file
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
Identifier ::= [a-zA-Z] [0-9a-zA-Z]*
|
||||
Feature ::= Identifier ( '.' Identifier )*
|
||||
S ::= #x9 | #x20
|
||||
|
||||
DecimalValue ::= [0-9_]*
|
||||
HexidecimalValue ::= [0-9a-fA-F_]+
|
||||
OctalValue ::= [0-7_]+
|
||||
BinaryValue ::= [01_]+
|
||||
|
||||
VerilogValue ::= (( DecimalValue? S* "'" ( 'h' S* HexidecimalValue | 'b' S* BinaryValue | 'd' S* DecimalValue | 'o' S* OctalValue ) | DecimalValue )
|
||||
|
||||
FeatureAddress ::= '[' DecimalValue (':' DecimalValue)? ']'
|
||||
|
||||
Any ::= [^#xA#]
|
||||
Comment ::= '#' Any*
|
||||
|
||||
AnnotationName ::= [.a-zA-Z] [_0-9a-zA-Z]*
|
||||
NonEscapeCharacters ::= [^\"]
|
||||
EscapeSequences ::= '\\' | '\"'
|
||||
Annotation ::= AnnotationName S* '=' S* '"' (NonEscapeCharacters | EscapeSequences)* '"'
|
||||
Annotations ::= '{' S* Annotation ( ',' S* Annotation )* S* '}'
|
||||
|
||||
SetFasmFeature ::= Feature FeatureAddress? S* ('=' S* VerilogValue)?
|
||||
FasmLine ::= S* SetFasmFeature? S* Annotations? S* Comment?
|
||||
|
||||
Canonicalization
|
||||
++++++++++++++++
|
||||
|
||||
If two FASM files have been canonicalized, then they enable an identical set of features. The canonical FASM file is also equivalent to the FASM file that would be generated by taking the output bitstream and converting it back into a FASM file.
|
||||
|
||||
The canonicalization process is as follows:
|
||||
|
||||
#. Flatten any ``FeatureAddress`` with width greater than 1.
|
||||
|
||||
* For ``SetFasmFeature`` lines with a ``FeatureAddress`` width greater than 1 bit, 1 ``SetFasmFeature`` for the width the original ``FeatureAddress``.
|
||||
* When flattening, if the flattened address is 0, do not emit the address.
|
||||
#. Remove all comments and annotations.
|
||||
#. If the ``FeatureValue`` is 0, remove the FASM line.
|
||||
#. If the ``FeatureValue`` is 1, only output the ``Feature`` and the ``FeatureAddress`` if the ``Feature`` has addresses other than 0.
|
||||
#. Remove any lines that do not modify the default bitstream.
|
||||
|
||||
* Example are psuedo-pips in Xilinx parts.
|
||||
#. Sort the lines in the FASM file.
|
||||
|
||||
Example Canonicalization
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
``ALUT.INIT[0] = 1``
|
||||
|
||||
becomes
|
||||
|
||||
``ALUT.INIT``
|
||||
|
||||
----
|
||||
|
||||
``ALUT.SMALL = 1``
|
||||
|
||||
becomes
|
||||
|
||||
``ALUT.SMALL``
|
||||
|
||||
----
|
||||
|
||||
``ALUT.INIT[3:0] = 4'b1101``
|
||||
|
||||
becomes
|
||||
|
||||
``ALUT.INIT``
|
||||
|
||||
``ALUT.INIT[2]``
|
||||
|
||||
``ALUT.INIT[3]``
|
||||
|
||||
Meaning of a FASM line
|
||||
----------------------
|
||||
|
||||
.. csv-table:: Simplified ``SetFasmFeature``
|
||||
:delim: |
|
||||
:header-rows: 1
|
||||
|
||||
YYYY.XXXXX | [A:B] | = C
|
||||
``Feature`` | ``FeatureAddress`` | ``FeatureValue``
|
||||
**Required** | *Optional* | *Optional*
|
||||
|
||||
Each line of a FASM file that enables a feature is defined by a ``SetFasmFeature``. Table 1 provides a simplified ``SetFasmFeature`` parse has three parts, the feature to be set (``Feature``), the address within the feature to be set (``FeatureAddress``) and the value of the feature (``FeatureValue``). Both the ``FeatureAddress`` and ``FeatureValue`` are optional.
|
||||
|
||||
When a FASM file declares that a feature is to be enabled or disabled, then specific bits in the bitstream will be cleared or set.
|
||||
|
||||
This section describes how the state of the bits are determined.
|
||||
|
||||
Feature
|
||||
+++++++
|
||||
|
||||
The ``Feature`` should uniquely specify a feature within the bitstream. If the feature is repeated across FPGA elements, a prefix identifier is required to uniquely identify where a feature is located.
|
||||
|
||||
For example all SLICEL tiles have ALUT.INIT feature, however each tile CLBLL_L tile actually have two SLICEL, and there are many CLBLL_L tiles with a 7-series FPGA. So a unique path would required to both clarify which tile is being set, and which SLICEL within the tile is being set.
|
||||
|
||||
FeatureAddress and FeatureValue
|
||||
+++++++++++++++++++++++++++++++
|
||||
|
||||
If the ``FeatureAddress`` is not specified, then the address selected is 0.
|
||||
|
||||
If the ``FeatureValue`` is not specified, then the value is 1.
|
||||
|
||||
If the ``FeatureAddress`` is specified as a specific bit rather than a range (e.g. "[5]"), then the ``FeatureValue`` width must be 1-bit wide (e.g. 0 or 1). If the ``FeatureAddress`` is a range (e.g. "[15:0]"), then the ``FeatureValue`` width must be equal or less than the ``FeatureAddress`` width. It is invalid to specific a ``FeatureValue`` wider than the ``FeatureAddress``.
|
||||
|
||||
For example, if the ``FeatureAddress`` was [15:0], then the address width is 16 bits, and the ``FeatureValue`` must be 16 bits or less. So a ``FeatureValue`` of 16'hFFFF is valid, but a ``FeatureValue`` of 17'h10000 is invalid.
|
||||
|
||||
When the ``FeatureAddress`` is wider than 1 bit, the ``FeatureValue`` is shifted and masked for each specific address before enabling or disabling the feature. So for a ``FeatureAddress`` of [7:4], the feature at address 4 is set with a value of (``FeatureValue`` >> 0) & 1, and the feature at address 5 is set with a value of (``FeatureValue`` >> 1) & 1, etc.
|
||||
|
||||
If the value of a feature is 1, then the output bitstream must clear and set all bits as specified.
|
||||
If the value of a feature is 0, then no change to the "default" bitstream is made.
|
||||
|
||||
Note that the absence of a FASM feature line does not imply that the feature is set to 0. It only means that the relevant bits are used from the implementation specific "default" bitstream.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
=======================
|
||||
SymbiFlow documentation
|
||||
=======================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
introduction
|
||||
fasm-specification
|
||||
prjxray/docs/index
|
|
@ -0,0 +1,8 @@
|
|||
Introduction
|
||||
============
|
||||
|
||||
This is the documentation for the SymbiFlow open FPGA toolchain project.
|
||||
|
||||
A useful diagram that explains the relationship between various parts/files/programs of the project:
|
||||
|
||||
https://docs.google.com/drawings/d/1GwzV6Rs0gbiGI4DznWwG4000BLOcsuYYgYQ0YDqgXHY/edit
|
Loading…
Reference in New Issue