[Doc] Add example circuit model about multi-mode flip-flops; Separate data-path FF circuit model and configuration-chain FF circuit model;

This commit is contained in:
tangxifan 2021-05-24 13:03:40 -06:00
parent a2b2642ec1
commit b6b98a75b8
3 changed files with 225 additions and 13 deletions

View File

@ -963,16 +963,15 @@ This example shows:
.. note:: If the embedded harden logic are driven partially by LUT outputs, users may use the :ref:`file_formats_bitstream_setting` to gaurantee correct bitstream generation for the LUTs.
Flip-Flops
~~~~~~~~~~
Datapath Flip-Flops
~~~~~~~~~~~~~~~~~~~
Template
````````
.. code-block:: xml
<circuit_model type="ccff|ff" name="<string>" prefix="<string>" spice_netlist="<string>" verilog_netlist="<string>"/>
<circuit_model type="ff" name="<string>" prefix="<string>" spice_netlist="<string>" verilog_netlist="<string>"/>
<design_technology type="cmos"/>
<input_buffer exist="<string>" circuit_model_name="<string>"/>
<output_buffer exist="<string>" circuit_model_name="<string>"/>
@ -987,16 +986,14 @@ Template
.. note:: FPGA-Verilog/SPICE currently support only one clock domain in the FPGA. Therefore there should be only one clock port to be defined and the size of the clock port should be 1.
.. option:: <circuit_model type="ccff|ff" name="<string>" prefix="<string>" spice_netlist="<string>" verilog_netlist="<string>"/>
.. option:: type="ff"
- ``type="ccff|ff"`` Specify the type of a flip-flop. ``ff`` is a regular flip-flop while ``ccff`` denotes a configuration-chain flip-flop
``ff`` is a regular flip-flop to be used in datapath logic, e.g., a configurable logic block.
.. note:: A flip-flop should at least have three types of ports, ``input``, ``output`` and ``clock``.
.. note:: If the user provides a customized Verilog/SPICE netlist, the bandwidth of ports should be defined to the same as the Verilog/SPICE netlist.
.. note:: In a valid FPGA architecture, users should provide at least either a ``ccff`` or ``sram`` circuit model, so that the configurations can loaded to core logic.
.. _circuit_model_dff_example:
D-type Flip-Flop
@ -1029,6 +1026,68 @@ This example shows:
- The flip-flop has ``set`` and ``reset`` functionalities
- The flip-flop port names defined differently in standard cell library and VPR architecture. The ``lib_name`` capture the port name defined in standard cells, while ``prefix`` capture the port name defined in ``pb_type`` of VPR architecture file
.. _circuit_model_multi_mode_ff_example:
Multi-mode Flip-Flop
````````````````````
:numref:`fig_multi_mode_ff_circuit_model` illustrates an example of a flip-flop which can be operate in different modes.
.. _fig_multi_mode_ff_circuit_model:
.. figure:: ./figures/multi_mode_ff_circuit_model.svg
:scale: 100%
:alt: Multi-mode flip-flop example
An example of a flip-flop which can be operate in different modes
The code describing this FF is:
.. code-block:: xml
<circuit_model type="ff" name="frac_ff" prefix="frac_ff" verilog_netlist="frac_ff.v" spice_netlist="frac_ff.sp">
<port type="input" prefix="D" lib_name="D" size="1"/>
<port type="input" prefix="Reset" lib_name="RST_OP" size="1" is_global="true"/>
<port type="output" prefix="Q" lib_name="Q" size="1"/>
<port type="clock" prefix="clock" lib_name="CLK" size="1" is_global="true"/>
<port type="sram" prefix="MODE" lib_name="MODE" size="1" mode_select="true" circuit_model_name="CCFF" default_value="0"/>
</circuit_model>
This example shows:
- A multi-mode flip-flop which is defined in a Verilog netlist ``frac_ff.v`` and a SPICE netlist ``frac_ff.sp``
- The flip-flop has a ``reset`` pin which can be either active-low or active-high, depending on the mode selection pin ``MODE``.
- The mode-selection bit will be generated by a configurable memory outside the flip-flop, which will be implemented by a circuit model ``CCFF`` defined by users (see an example in :ref:`circuit_model_ccff_example`).
- The flip-flop port names defined differently in standard cell library and VPR architecture. The ``lib_name`` capture the port name defined in standard cells, while ``prefix`` capture the port name defined in ``pb_type`` of VPR architecture file
Configuration Chain Flip-Flop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Template
````````
.. code-block:: xml
<circuit_model type="ccff" name="<string>" prefix="<string>" spice_netlist="<string>" verilog_netlist="<string>"/>
<design_technology type="cmos"/>
<input_buffer exist="<string>" circuit_model_name="<string>"/>
<output_buffer exist="<string>" circuit_model_name="<string>"/>
<port type="input" prefix="<string>" size="<int>"/>
<port type="output" prefix="<string>" size="<int>"/>
<port type="clock" prefix="<string>" size="<int>"/>
</circuit_model>
.. note:: The circuit designs of configurable memory elements are highly dependent on the technology node and well optimized by engineers. Therefore, FPGA-Verilog/SPICE requires users to provide their customized FF Verilog/SPICE/Verilog netlists. A sample Verilog/SPICE netlist of FF can be found in the directory SpiceNetlists in the released package.
The information of input and output buffer should be clearly specified according to the customized SPICE netlist! The existence of input/output buffers will influence the decision in creating SPICE testbenches, which may leads to larger errors in power analysis.
.. note:: FPGA-Verilog/SPICE currently support only one clock domain for any configuration protocols in the FPGA. Therefore there should be only one clock port to be defined and the size of the clock port should be 1.
.. note:: A flip-flop should at least have three types of ports, ``input``, ``output`` and ``clock``.
.. note:: If the user provides a customized Verilog/SPICE netlist, the bandwidth of ports should be defined to the same as the Verilog/SPICE netlist.
.. note:: In a valid FPGA architecture, users should provide at least either a ``ccff`` or ``sram`` circuit model, so that the configurations can loaded to core logic.
.. _circuit_model_ccff_example:
Regular Configuration-chain Flip-flop

View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.1" xmlns:xl="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="249.96086 276.12 209.06514 170.76" width="209.06514" height="170.76">
<defs>
<font-face font-family="Times New Roman" font-size="14" panose-1="2 2 6 3 5 4 5 2 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="0" x-height="447.2656" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-weight="400">
<font-face-src>
<font-face-name name="TimesNewRomanPSMT"/>
</font-face-src>
</font-face>
<font-face font-family="Times New Roman" font-size="9" panose-1="2 2 6 3 5 4 5 2 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="0" x-height="447.2656" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-weight="400">
<font-face-src>
<font-face-name name="TimesNewRomanPSMT"/>
</font-face-src>
</font-face>
<font-face font-family="Times New Roman" font-size="12" panose-1="2 2 6 3 5 4 5 2 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="0" x-height="447.2656" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-weight="400">
<font-face-src>
<font-face-name name="TimesNewRomanPSMT"/>
</font-face-src>
</font-face>
</defs>
<metadata> Produced by OmniGraffle 7.18.5\n2021-05-24 18:52:28 +0000</metadata>
<g id="multi_mode_ff" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
<title>multi_mode_ff</title>
<g id="multi_mode_ff_Layer_1">
<title>Layer 1</title>
<g id="Graphic_34">
<rect x="295.92" y="279.72" width="151.39959" height="140.4" fill="#ffffc0"/>
<rect x="295.92" y="279.72" width="151.39959" height="140.4" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Graphic_12">
<rect x="367.0598" y="298.8" width="67.44001" height="58.68" fill="white"/>
<rect x="367.0598" y="298.8" width="67.44001" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<text transform="translate(372.0598 320.34263)" fill="black">
<tspan font-family="Times New Roman" font-size="14" font-weight="400" fill="black" x="20.933872" y="12">FF</tspan>
</text>
</g>
<g id="Graphic_11">
<text transform="translate(368.12027 314.24883)" fill="black">
<tspan font-family="Times New Roman" font-size="9" font-weight="400" fill="black" x="0" y="8">D</tspan>
</text>
</g>
<g id="Graphic_10">
<text transform="translate(375.2564 338.94)" fill="black">
<tspan font-family="Times New Roman" font-size="9" font-weight="400" fill="black" x="0" y="8">CLK</tspan>
</text>
</g>
<g id="Line_9">
<line x1="365.9288" y1="319.13116" x2="295.5" y2="319.13116" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_8">
<line x1="365.9288" y1="343.63115" x2="295.92" y2="343.75" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_7">
<line x1="447.3196" y1="314.44" x2="435.6308" y2="314.45366" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Graphic_6">
<path d="M 367.0598 340.05115 L 374.6198 344.13115 L 367.0598 348.21115 Z" fill="#ccc"/>
<path d="M 367.0598 340.05115 L 374.6198 344.13115 L 367.0598 348.21115 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
</g>
<g id="Graphic_5">
<text transform="translate(424.8 309.74883)" fill="black">
<tspan font-family="Times New Roman" font-size="9" font-weight="400" fill="black" x="0" y="8">Q</tspan>
</text>
</g>
<g id="Graphic_13">
<text transform="translate(393.893 347.09767)" fill="black">
<tspan font-family="Times New Roman" font-size="9" font-weight="400" fill="black" x="0" y="8">RST</tspan>
</text>
</g>
<g id="Line_16">
<line x1="401.64593" y1="367.8623" x2="401.64593" y2="357.48" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Group_21">
<g id="Graphic_17">
<path d="M 325.0602 378 L 340.04 385.68 L 325.0602 393.36 Z" fill="white"/>
<path d="M 325.0602 378 L 340.04 385.68 L 325.0602 393.36 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Graphic_18">
<circle cx="342.74" cy="385.3" r="2.70000442162365" fill="white"/>
<circle cx="342.74" cy="385.3" r="2.70000442162365" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</g>
<g id="Graphic_20">
<path d="M 357.84 413.64 L 357.84 375.48 L 368.2223 383.112 L 368.2223 406.008 Z" fill="white"/>
<path d="M 357.84 413.64 L 357.84 375.48 L 368.2223 383.112 L 368.2223 406.008 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_22">
<line x1="310.1" y1="385.39" x2="324.06028" y2="385.57033" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_23">
<line x1="346.43835" y1="385.4102" x2="357.84" y2="385.75" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_24">
<line x1="310" y1="402.25" x2="357.84" y2="402.25" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_25">
<line x1="310.1" y1="385.39" x2="310" y2="402.25" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_26">
<line x1="295.92" y1="394.06" x2="309.88028" y2="394.2403" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_27">
<path d="M 369.2223 394.59046 L 401.64593 394.75 L 401.87445 368.25" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Group_33">
<g id="Graphic_28">
<rect x="357.84" y="435.18766" width="10.382324" height="10.382324" fill="#ccc"/>
<rect x="357.84" y="435.18766" width="10.382324" height="10.382324" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Line_29">
<line x1="368.2223" y1="446.38" x2="357.84" y2="435.3175" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
</g>
<g id="Line_30">
<line x1="357.18676" y1="445.525" x2="368.2223" y2="434.88" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
</g>
</g>
<g id="Line_32">
<line x1="363.03115" y1="410.824" x2="363.03115" y2="434.18766" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
<g id="Graphic_35">
<text transform="translate(300.92 281.12)" fill="black">
<tspan font-family="Times New Roman" font-size="14" font-weight="400" fill="black" x="0" y="12">Multi-mode FF</tspan>
</text>
</g>
<g id="Graphic_36">
<text transform="translate(450.36 305.6214)" fill="black">
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="0" y="11">Q</tspan>
</text>
</g>
<g id="Graphic_37">
<text transform="translate(284.6425 310.1214)" fill="black">
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="0" y="11">D</tspan>
</text>
</g>
<g id="Graphic_38">
<text transform="translate(366.59038 420.3702)" fill="black">
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="0" y="11">MODE</tspan>
</text>
</g>
<g id="Graphic_39">
<text transform="translate(269.30852 336.87627)" fill="black">
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="0" y="11">CLK</tspan>
</text>
</g>
<g id="Graphic_40">
<text transform="translate(249.96086 387.3051)" fill="black">
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="0" y="11">RST_OP</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -42,15 +42,16 @@ Supported Circuit Designs
+-----------------+--------------+-----------+-----------------------------------------------------+
| | Configurable | No | Yes | - :ref:`circuit_model_config_latch_example` |
| | Memory | | | - :ref:`circuit_model_sram_blwl_example` |
| | | | - :ref:`circuit_model_dff_example` |
| | | | - :ref:`circuit_model_ccff_example` |
| | | | - :ref:`circuit_model_ccff_enable_example` |
| | | | - :ref:`circuit_model_ccff_scanable_example` |
+-----------------+--------------+-----------+-----------------------------------------------------+
| Block RAM | No | Yes | - **Any size** |
| | | | - Single-port |
| | | | - Dual-port |
| | | | - Fracturable |
| Data Memory | No | Yes | - **Any size** |
| | | | - :ref:`circuit_model_dff_example` |
| | | | - :ref:`circuit_model_multi_mode_ff_example` |
| | | | - Single-port Block RAM |
| | | | - Dual-port Block RAM |
| | | | - Multi-mode Block RAM |
+-----------------+--------------+-----------+-----------------------------------------------------+
| | Arithmetic | No | Yes | - **Any size** |
| | Units | | | - Multiplier |