Merge branch 'master' into verilog_testbench
|
@ -210,6 +210,7 @@ jobs:
|
|||
- name: fpga_bitstream_reg_test
|
||||
- name: fpga_sdc_reg_test
|
||||
- name: fpga_spice_reg_test
|
||||
- name: micro_benchmark_reg_test
|
||||
- name: quicklogic_reg_test
|
||||
- name: vtr_benchmark_reg_test
|
||||
- name: iwls_benchmark_reg_test
|
||||
|
@ -257,6 +258,7 @@ jobs:
|
|||
- name: fpga_bitstream_reg_test
|
||||
- name: fpga_sdc_reg_test
|
||||
- name: fpga_spice_reg_test
|
||||
- name: micro_benchmark_reg_test
|
||||
- name: quicklogic_reg_test
|
||||
- name: vtr_benchmark_reg_test
|
||||
- name: iwls_benchmark_reg_test
|
||||
|
|
|
@ -284,6 +284,8 @@ This example shows:
|
|||
SRAMs
|
||||
~~~~~
|
||||
|
||||
.. note:: OpenFPGA does not auto-generate any netlist for SRAM cells. Users should define the HDL modeling in external netlists and ensure consistency to physical designs.
|
||||
|
||||
Template
|
||||
````````
|
||||
|
||||
|
@ -963,16 +965,17 @@ 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.
|
||||
|
||||
Datapath Flip-Flops
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Flip-Flops
|
||||
~~~~~~~~~~
|
||||
.. note:: OpenFPGA does not auto-generate any netlist for datapath flip-flops. Users should define the HDL modeling in external netlists and ensure consistency to physical designs.
|
||||
|
||||
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 +990,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 +1030,70 @@ 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: 150%
|
||||
: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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note:: OpenFPGA does not auto-generate any netlist for configuration chain flip-flops. Users should define the HDL modeling in external netlists and ensure consistency to physical designs.
|
||||
|
||||
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
|
||||
|
@ -1147,6 +1212,8 @@ The code describing this FF is:
|
|||
Hard Logics
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. note:: OpenFPGA does not auto-generate any netlist for the hard logics. Users should define the HDL modeling in external netlists and ensure consistency to physical designs.
|
||||
|
||||
Template
|
||||
````````
|
||||
|
||||
|
@ -1175,6 +1242,13 @@ Template
|
|||
|
||||
Full Adder
|
||||
``````````
|
||||
.. figure:: ./figures/full_adder_1bit_circuit_model.svg
|
||||
:scale: 200%
|
||||
:alt: An example of a 1-bit full adder
|
||||
|
||||
An example of a 1-bit full adder.
|
||||
|
||||
The code describing the 1-bit full adder is:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
|
@ -1189,6 +1263,134 @@ Full Adder
|
|||
<port type="output" prefix="sumout" size="1"/>
|
||||
</circuit_model>
|
||||
|
||||
This example shows:
|
||||
- A 1-bit full adder which is defined in a Verilog netlist ``adder.v`` and a SPICE netlist ``adder.sp``
|
||||
- The adder has three 1-bit inputs, i.e., ``a``, ``b`` and ``cin``, and two 2-bit outputs, i.e., ``cout``, ``sumout``.
|
||||
|
||||
.. _circuit_model_single_mode_mult8x8_example:
|
||||
|
||||
Multiplier
|
||||
``````````
|
||||
|
||||
.. figure:: ./figures/single_mode_mult8x8_circuit_model.svg
|
||||
:scale: 200%
|
||||
:alt: An example of a 8-bit multiplier.
|
||||
|
||||
An example of a 8-bit multiplier.
|
||||
|
||||
The code describing the multiplier is:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<circuit_model type="hard_logic" name="mult8x8" prefix="mult8x8" spice_netlist="dsp.sp" verilog_netlist="dsp.v">
|
||||
<design_technology type="cmos"/>
|
||||
<input_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<output_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<port type="input" prefix="a" size="8"/>
|
||||
<port type="input" prefix="b" size="8"/>
|
||||
<port type="output" prefix="out" size="16"/>
|
||||
</circuit_model>
|
||||
|
||||
This example shows:
|
||||
- A 8-bit multiplier which is defined in a Verilog netlist ``dsp.v`` and a SPICE netlist ``dsp.sp``
|
||||
|
||||
.. _circuit_model_multi_mode_mult8x8_example:
|
||||
|
||||
Multi-mode Multiplier
|
||||
`````````````````````
|
||||
|
||||
.. figure:: ./figures/multi_mode_mult8x8_circuit_model.svg
|
||||
:scale: 200%
|
||||
:alt: An example of a 8-bit multiplier which can operating in two modes: (1) dual 4-bit multipliers; and (2) 8-bit multiplier
|
||||
|
||||
An example of a 8-bit multiplier which can operating in two modes: (1) dual 4-bit multipliers; and (2) 8-bit multiplier
|
||||
|
||||
The code describing the multiplier is:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<circuit_model type="hard_logic" name="frac_mult8x8" prefix="frac_mult8x8" spice_netlist="dsp.sp" verilog_netlist="dsp.v">
|
||||
<design_technology type="cmos"/>
|
||||
<input_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<output_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<port type="input" prefix="a" size="8"/>
|
||||
<port type="input" prefix="b" size="8"/>
|
||||
<port type="output" prefix="out" size="16"/>
|
||||
<port type="sram" prefix="mode" size="1" mode_select="true" circuit_model_name="CCFF" default_value="0"/>
|
||||
</circuit_model>
|
||||
|
||||
This example shows:
|
||||
- A multi-mode 8-bit multiplier which is defined in a Verilog netlist ``dsp.v`` and a SPICE netlist ``dsp.sp``
|
||||
- The multi-mode multiplier can operating in two modes: (1) dual 4-bit multipliers; and (2) 8-bit multiplier
|
||||
- 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`).
|
||||
|
||||
.. _circuit_model_single_mode_dpram_example:
|
||||
|
||||
Dual Port Block RAM
|
||||
```````````````````
|
||||
|
||||
.. figure:: ./figures/single_mode_dpram128x8_memory_circuit_model.svg
|
||||
:scale: 150%
|
||||
:alt: An example of a dual port block RAM with 128 addresses and 8-bit data width.
|
||||
|
||||
An example of a dual port block RAM with 128 addresses and 8-bit data width.
|
||||
|
||||
The code describing this block RAM is:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<circuit_model type="hard_logic" name="dpram_128x8" prefix="dpram_128x8" spice_netlist="dpram.sp" verilog_netlist="dpram.v">
|
||||
<design_technology type="cmos"/>
|
||||
<input_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<output_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<port type="input" prefix="waddr" size="7"/>
|
||||
<port type="input" prefix="raddr" size="7"/>
|
||||
<port type="input" prefix="data_in" size="8"/>
|
||||
<port type="input" prefix="wen" size="1"/>
|
||||
<port type="input" prefix="ren" size="1"/>
|
||||
<port type="output" prefix="data_out" size="8"/>
|
||||
<port type="clock" prefix="clock" size="1" is_global="true" default_val="0"/>
|
||||
</circuit_model>
|
||||
|
||||
This example shows:
|
||||
- A 128x8 dual port RAM which is defined in a Verilog netlist ``dpram.v`` and a SPICE netlist ``dpram.sp``
|
||||
- The clock port of the RAM is controlled by a global signal (see details about global signal definition in :ref:`annotate_vpr_arch_physical_tile_annotation`).
|
||||
|
||||
.. _circuit_model_multi_mode_dpram_example:
|
||||
|
||||
Multi-mode Dual Port Block RAM
|
||||
``````````````````````````````
|
||||
|
||||
.. figure:: ./figures/multi_mode_dpram128x8_memory_circuit_model.svg
|
||||
:scale: 150%
|
||||
:alt: An example of a multi-mode dual port block RAM with 128 addresses and 8-bit data width.
|
||||
|
||||
An example of a dual port block RAM which can operate in two modes: 128x8 and 256x4.
|
||||
|
||||
The code describing this block RAM is:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<circuit_model type="hard_logic" name="frac_dpram_128x8" prefix="frac_dpram_128x8" spice_netlist="frac_dpram.sp" verilog_netlist="frac_dpram.v">
|
||||
<design_technology type="cmos"/>
|
||||
<input_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<output_buffer exist="true" circuit_model_name="inv1x"/>
|
||||
<port type="input" prefix="waddr" size="8"/>
|
||||
<port type="input" prefix="raddr" size="8"/>
|
||||
<port type="input" prefix="data_in" size="8"/>
|
||||
<port type="input" prefix="wen" size="1"/>
|
||||
<port type="input" prefix="ren" size="1"/>
|
||||
<port type="output" prefix="data_out" size="8"/>
|
||||
<port type="clock" prefix="clock" size="1" is_global="true" default_val="0"/>
|
||||
<port type="sram" prefix="mode" size="1" mode_select="true" circuit_model_name="CCFF" default_value="0"/>
|
||||
</circuit_model>
|
||||
|
||||
This example shows:
|
||||
- A fracturable dual port RAM which is defined in a Verilog netlist ``frac_dpram.v`` and a SPICE netlist ``frac_dpram.sp``
|
||||
- The dual port RAM can operate in two modes: (1) 128 addresses with 8-bit data width; (2) 256 addresses with 4-bit data width
|
||||
- The clock port of the RAM is controlled by a global signal (see details about global signal definition in :ref:`annotate_vpr_arch_physical_tile_annotation`).
|
||||
- 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`).
|
||||
|
||||
Routing Wire Segments
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -1255,6 +1457,8 @@ This example shows
|
|||
I/O pads
|
||||
~~~~~~~~
|
||||
|
||||
.. note:: OpenFPGA does not auto-generate any netlist for I/O cells. Users should define the HDL modeling in external netlists and ensure consistency to physical designs.
|
||||
|
||||
Template
|
||||
````````
|
||||
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<?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="155.08 312.04775 148.51908 123.62449" width="148.51908" height="123.62449">
|
||||
<defs>
|
||||
<font-face font-family="Times New Roman" font-size="14" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1166.6423" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<font-face font-family="Times New Roman" font-size="13" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1256.384" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -2 5 4" markerWidth="5" markerHeight="4" color="black">
|
||||
<g>
|
||||
<path d="M 2.4 0 L 0 -.9 L 0 .9 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
</defs>
|
||||
<metadata> Produced by OmniGraffle 7.18.5\n2021-05-24 20:57:16 +0000</metadata>
|
||||
<g id="1-bit_full_adder" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
|
||||
<title>1-bit full adder</title>
|
||||
<g id="1-bit_full_adder_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_35772">
|
||||
<rect x="192.24" y="344.52" width="57.6" height="58.68" fill="#ffffc0"/>
|
||||
<rect x="192.24" y="344.52" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(197.24 366.06263)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="7.4689445" y="12">adder</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_35773"/>
|
||||
<g id="Graphic_35774">
|
||||
<text transform="translate(211.44037 312.04775)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="1.6587038" y="12">cin</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_35775">
|
||||
<text transform="translate(155.08 351.9)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.4363742" y="12">a</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_35776">
|
||||
<text transform="translate(155.08 375.26)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.4363742" y="12">b</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_35778">
|
||||
<line x1="166.45275" y1="359.73463" x2="184.14042" y2="359.91665" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_35779">
|
||||
<line x1="166.45275" y1="382.93925" x2="184.14117" y2="382.63795" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_35780">
|
||||
<line x1="250.84" y1="373.86" x2="257.94" y2="373.86" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_35786">
|
||||
<text transform="translate(266.04 366.08387)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">sumout</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_35787">
|
||||
<line x1="221.04" y1="327.6" x2="221.04" y2="335.42" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_35788">
|
||||
<text transform="translate(206.52018 420.12)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="3.3288927" y="12">cout</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_35789">
|
||||
<line x1="221.04" y1="404.2" x2="221.04" y2="412.02" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,342 @@
|
|||
<?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="372.172 88.78 661.168 257.155" width="661.168" height="257.155">
|
||||
<defs>
|
||||
<font-face font-family="Times New Roman" font-size="13" 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>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -2 5 4" markerWidth="5" markerHeight="4" color="black">
|
||||
<g>
|
||||
<path d="M 2.4 0 L 0 -.9 L 0 .9 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="black">
|
||||
<g>
|
||||
<path d="M 8 0 L 0 -3 L 0 3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
<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>
|
||||
<font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 8 3 0 0 0 9 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="975.0061" descent="-216.99524" font-weight="700">
|
||||
<font-face-src>
|
||||
<font-face-name name="HelveticaNeue-Bold"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<font-face font-family="STIXGeneral" font-size="13" units-per-em="1000" underline-position="-75" underline-thickness="50" slope="0" x-height="450" cap-height="662" ascent="1055.0021" descent="-455.0009" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="STIXGeneral-Regular"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
</defs>
|
||||
<metadata> Produced by OmniGraffle 7.18.5\n2021-05-24 20:15:49 +0000</metadata>
|
||||
<g id="multi_mode_dual_port_bram_1" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
|
||||
<title>multi_mode_dual_port_bram 1</title>
|
||||
<g id="multi_mode_dual_port_bram_1_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_80">
|
||||
<rect x="372.672" y="153.9355" width="309.24" height="120.61165" fill="white"/>
|
||||
<rect x="372.672" y="153.9355" width="309.24" height="120.61165" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_79">
|
||||
<rect x="723.6" y="89.28" width="309.24" height="128.37183" fill="white"/>
|
||||
<rect x="723.6" y="89.28" width="309.24" height="128.37183" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_52">
|
||||
<rect x="723.6" y="217.06317" width="309.24" height="128.37183" fill="white"/>
|
||||
<rect x="723.6" y="217.06317" width="309.24" height="128.37183" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_2">
|
||||
<rect x="431.28" y="178.56" width="180.36" height="90.36" fill="#ffffc0"/>
|
||||
<rect x="431.28" y="178.56" width="180.36" height="90.36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_3">
|
||||
<path d="M 431.28 248.6386 L 443.16 253.9786 L 431.28 259.3186 Z" fill="#ccc"/>
|
||||
<path d="M 431.28 248.6386 L 443.16 253.9786 L 431.28 259.3186 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_4">
|
||||
<text transform="translate(443.16 246.20248)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="2.1677246" y="12">clock</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_6">
|
||||
<text transform="translate(554.04 186.389)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">raddr[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_7">
|
||||
<text transform="translate(433.44 185.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">waddr[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_8">
|
||||
<text transform="translate(433.44 203.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">wen</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_9">
|
||||
<text transform="translate(581.9575 201.94124)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">ren</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_10">
|
||||
<text transform="translate(433.44 221.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".17456055" y="12">data_in[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_11">
|
||||
<text transform="translate(537.7457 218.84248)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".803154" y="12">data_out[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_12">
|
||||
<line x1="384.84" y1="192.96" x2="421.74" y2="193.01682" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_13">
|
||||
<line x1="384.84" y1="209.21736" x2="419.94" y2="209.27141" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_14">
|
||||
<line x1="384.84" y1="228.31612" x2="421.74" y2="228.37295" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_15">
|
||||
<line x1="384.84" y1="253.4786" x2="419.94" y2="253.53265" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_16">
|
||||
<line x1="613.08" y1="226.76248" x2="649.98" y2="226.8193" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_17">
|
||||
<line x1="658.08" y1="209.93054" x2="622.98" y2="209.87648" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_18">
|
||||
<line x1="658.08" y1="193.0293" x2="621.18" y2="192.97247" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_19">
|
||||
<line x1="406.25" y1="188.54" x2="399.8125" y2="198.1131" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_24">
|
||||
<line x1="406.25" y1="222.47592" x2="399.8125" y2="232.04903" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_25">
|
||||
<line x1="645.4375" y1="188.02956" x2="639" y2="197.60268" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_26">
|
||||
<line x1="636.4375" y1="221.83204" x2="630" y2="231.40516" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_27">
|
||||
<text transform="translate(571.8075 242.64)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="5.4590435" y="11">mode</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_29">
|
||||
<line x1="656.64" y1="249.46418" x2="621.54" y2="249.41012" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_51">
|
||||
<rect x="782.208" y="119.715" width="180.36" height="90.36" fill="#c0ffff"/>
|
||||
<rect x="782.208" y="119.715" width="180.36" height="90.36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_50">
|
||||
<path d="M 782.208 189.7936 L 794.088 195.1336 L 782.208 200.4736 Z" fill="#ccc"/>
|
||||
<path d="M 782.208 189.7936 L 794.088 195.1336 L 782.208 200.4736 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_49">
|
||||
<text transform="translate(794.088 187.35749)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="2.1677246" y="12">clock</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_48">
|
||||
<text transform="translate(904.968 127.544)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">raddr[6:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_47">
|
||||
<text transform="translate(784.368 126.195)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">waddr[6:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_46">
|
||||
<text transform="translate(784.368 144.195)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">wen</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_45">
|
||||
<text transform="translate(932.8855 143.09625)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">ren</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_44">
|
||||
<text transform="translate(784.368 162.195)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".17456055" y="12">data_in[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_43">
|
||||
<text transform="translate(888.6737 159.99749)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".803154" y="12">data_out[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_42">
|
||||
<line x1="735.768" y1="134.115" x2="772.668" y2="134.17183" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_41">
|
||||
<line x1="735.768" y1="150.37237" x2="770.868" y2="150.42642" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_40">
|
||||
<line x1="735.768" y1="169.47113" x2="772.668" y2="169.52796" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_39">
|
||||
<line x1="735.768" y1="194.6336" x2="770.868" y2="194.68766" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_38">
|
||||
<line x1="964.008" y1="167.91749" x2="1000.908" y2="167.97431" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_37">
|
||||
<line x1="1009.008" y1="151.08555" x2="973.908" y2="151.0315" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_36">
|
||||
<line x1="1009.008" y1="134.1843" x2="972.108" y2="134.12748" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_35">
|
||||
<line x1="757.178" y1="129.695" x2="750.7405" y2="139.26812" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_34">
|
||||
<line x1="757.178" y1="163.63093" x2="750.7405" y2="173.20404" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_33">
|
||||
<line x1="996.3655" y1="129.18457" x2="989.928" y2="138.75769" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_32">
|
||||
<line x1="987.3655" y1="162.98705" x2="980.928" y2="172.56017" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_31">
|
||||
<text transform="translate(922.7355 183.795)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="5.4590435" y="11">mode</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_30">
|
||||
<line x1="1007.568" y1="190.6192" x2="972.468" y2="190.56513" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_53">
|
||||
<text transform="translate(1010.048 178.44562)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="16" font-weight="700" fill="black" x="6394885e-19" y="16">‘1’</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_75">
|
||||
<rect x="782.208" y="245.355" width="180.36" height="90.36" fill="#c0ffc0"/>
|
||||
<rect x="782.208" y="245.355" width="180.36" height="90.36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_74">
|
||||
<path d="M 782.208 315.4336 L 794.088 320.7736 L 782.208 326.1136 Z" fill="#ccc"/>
|
||||
<path d="M 782.208 315.4336 L 794.088 320.7736 L 782.208 326.1136 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_73">
|
||||
<text transform="translate(794.088 312.9975)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="2.1677246" y="12">clock</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_72">
|
||||
<text transform="translate(904.968 253.184)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">raddr[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_71">
|
||||
<text transform="translate(784.368 251.835)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">waddr[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_70">
|
||||
<text transform="translate(784.368 269.835)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">wen</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_69">
|
||||
<text transform="translate(932.8855 268.73624)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">ren</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_68">
|
||||
<text transform="translate(784.368 287.835)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".17456055" y="12">data_in[3:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_67">
|
||||
<text transform="translate(888.6737 285.6375)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".803154" y="12">data_out[3:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_66">
|
||||
<line x1="735.768" y1="259.755" x2="772.668" y2="259.81183" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_65">
|
||||
<line x1="735.768" y1="276.01237" x2="770.868" y2="276.06642" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_64">
|
||||
<line x1="735.768" y1="295.11113" x2="772.668" y2="295.16795" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_63">
|
||||
<line x1="735.768" y1="320.2736" x2="770.868" y2="320.32766" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_62">
|
||||
<line x1="964.008" y1="293.5575" x2="1000.908" y2="293.6143" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_61">
|
||||
<line x1="1009.008" y1="276.72554" x2="973.908" y2="276.6715" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_60">
|
||||
<line x1="1009.008" y1="259.8243" x2="972.108" y2="259.76748" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_59">
|
||||
<line x1="757.178" y1="255.335" x2="750.7405" y2="264.90812" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_58">
|
||||
<line x1="757.178" y1="289.27093" x2="750.7405" y2="298.84404" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_57">
|
||||
<line x1="996.3655" y1="254.82457" x2="989.928" y2="264.39768" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_56">
|
||||
<line x1="987.3655" y1="288.62705" x2="980.928" y2="298.20016" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_55">
|
||||
<text transform="translate(922.7355 309.435)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="12" font-weight="400" fill="black" x="5.4590435" y="11">mode</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_54">
|
||||
<line x1="1007.568" y1="316.2592" x2="972.468" y2="316.20513" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_76">
|
||||
<text transform="translate(1010.048 306.95783)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="16" font-weight="700" fill="black" x="6394885e-19" y="16">‘0’</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_77">
|
||||
<text transform="translate(727.128 219.7961)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="14">Operating mode 2: Dual port 256</tspan>
|
||||
<tspan font-family="STIXGeneral" font-size="13" font-weight="400" fill="black" y="14">x</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" y="14">4 RAM</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_78">
|
||||
<text transform="translate(727.128 95.31501)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">Operating mode 1: Dual port 128x8 RAM</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_81">
|
||||
<text transform="translate(376.2 153.9355)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">Schematic: Multi-mode dual port 128x8/256x4 RAM</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_82">
|
||||
<path d="M 689.5061 176.1904 L 696.6112 183.2955 L 708.2277 171.679 L 711.78025 175.23154 L 712.4533 160.34827 L 697.57005 161.02135 L 701.1226 164.5739 Z" fill="#ff4040"/>
|
||||
<path d="M 689.5061 176.1904 L 696.6112 183.2955 L 708.2277 171.679 L 711.78025 175.23154 L 712.4533 160.34827 L 697.57005 161.02135 L 701.1226 164.5739 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_83">
|
||||
<path d="M 698.3752 233.85175 L 691.2701 240.95684 L 702.8866 252.57335 L 699.33405 256.1259 L 714.2173 256.79898 L 713.54425 241.9157 L 709.9917 245.46825 Z" fill="#ff4040"/>
|
||||
<path d="M 698.3752 233.85175 L 691.2701 240.95684 L 702.8866 252.57335 L 699.33405 256.1259 L 714.2173 256.79898 L 713.54425 241.9157 L 709.9917 245.46825 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 21 KiB |
|
@ -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 |
|
@ -0,0 +1,249 @@
|
|||
<?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="264.73112 332.86 459.72887 267.47224" width="459.72887" height="267.47224">
|
||||
<defs>
|
||||
<font-face font-family="Times New Roman" font-size="14" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1166.6423" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<font-face font-family="Times New Roman" font-size="13" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1256.384" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -2 5 4" markerWidth="5" markerHeight="4" color="black">
|
||||
<g>
|
||||
<path d="M 2.4 0 L 0 -.9 L 0 .9 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
<font-face font-family="Times New Roman" font-size="13" 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 21:09:05 +0000</metadata>
|
||||
<g id="multi_mode_mult_8x8" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
|
||||
<title>multi_mode_mult_8x8</title>
|
||||
<g id="multi_mode_mult_8x8_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_38">
|
||||
<rect x="265.23112" y="415.98" width="211.68" height="116.08224" fill="white"/>
|
||||
<rect x="265.23112" y="415.98" width="211.68" height="116.08224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_35">
|
||||
<rect x="512.28" y="333.36" width="211.68" height="149.04" fill="white"/>
|
||||
<rect x="512.28" y="333.36" width="211.68" height="149.04" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_13">
|
||||
<rect x="336.2311" y="441.36" width="57.6" height="58.68" fill="#ffffc0"/>
|
||||
<rect x="336.2311" y="441.36" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(341.2311 455.10526)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="5.2677727" y="12">MULT</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="13.693066" y="27.594727">8x8</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_10">
|
||||
<text transform="translate(265.23112 449.24)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="5.632742" y="12">a[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_9">
|
||||
<text transform="translate(268.29112 472.1)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.5727406" y="12">b[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_8">
|
||||
<line x1="310.44387" y1="456.93384" x2="328.13117" y2="456.8695" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_7">
|
||||
<line x1="307.38387" y1="479.6596" x2="328.1316" y2="479.4297" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_6">
|
||||
<line x1="394.8311" y1="470.7" x2="411.51837" y2="470.7" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_5">
|
||||
<text transform="translate(419.61837 462.92387)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">out[15:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_14">
|
||||
<line x1="322.39087" y1="451.17" x2="316.7111" y2="461.86224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_15">
|
||||
<line x1="322.39087" y1="474.53" x2="316.7111" y2="485.22224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_24">
|
||||
<rect x="583.28" y="354.6" width="57.6" height="58.68" fill="#c0ffff"/>
|
||||
<rect x="583.28" y="354.6" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(588.28 360.5479)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="5.2677727" y="12">MULT</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="13.693066" y="27.594727">4x4</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="14.851757" y="43.189453">[0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_23">
|
||||
<text transform="translate(512.28 362.48)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="5.632742" y="12">a[7:4]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_22">
|
||||
<text transform="translate(515.34 385.34)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.5727406" y="12">b[7:4]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_21">
|
||||
<line x1="557.49274" y1="370.17385" x2="575.18004" y2="370.10948" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_20">
|
||||
<line x1="554.43274" y1="392.89958" x2="575.1805" y2="392.66973" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_19">
|
||||
<line x1="641.88" y1="383.94" x2="658.5672" y2="383.94" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_18">
|
||||
<text transform="translate(666.6672 376.16387)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">out[15:8]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_17">
|
||||
<line x1="569.43975" y1="364.41" x2="563.76" y2="375.10224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_16">
|
||||
<line x1="569.43975" y1="387.77" x2="563.76" y2="398.46224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_33">
|
||||
<rect x="583.28" y="418.96774" width="57.6" height="58.68" fill="#c0ffff"/>
|
||||
<rect x="583.28" y="418.96774" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(588.28 424.91565)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="5.2677727" y="12">MULT</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="13.693066" y="27.594727">4x4</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="14.851757" y="43.189453">[1]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_32">
|
||||
<text transform="translate(512.28 426.84774)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="5.632742" y="12">a[3:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_31">
|
||||
<text transform="translate(515.34 449.70774)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.5727406" y="12">b[3:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_30">
|
||||
<line x1="557.49274" y1="434.5416" x2="575.18004" y2="434.47723" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_29">
|
||||
<line x1="554.43274" y1="457.26733" x2="575.1805" y2="457.0375" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_28">
|
||||
<line x1="641.88" y1="448.30774" x2="661.8172" y2="448.30774" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_27">
|
||||
<text transform="translate(669.9172 440.5316)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">out[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_26">
|
||||
<line x1="569.43975" y1="428.77774" x2="563.76" y2="439.47" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_25">
|
||||
<line x1="569.43975" y1="452.13774" x2="563.76" y2="462.83" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_34">
|
||||
<text transform="translate(515.34 335.52)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">Operating mode 1: Dual 4x4 multiplier</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_36">
|
||||
<line x1="365.0311" y1="516.51" x2="365.0311" y2="509.14" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_37">
|
||||
<text transform="translate(342.42474 516.51)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="8.527273" y="12">mode</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_39">
|
||||
<text transform="translate(268.29112 415.98)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">Schematic: multi-mode 8x8 multiplier</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_59">
|
||||
<rect x="512.28" y="490.32" width="211.68" height="109.51224" fill="white"/>
|
||||
<rect x="512.28" y="490.32" width="211.68" height="109.51224" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_58">
|
||||
<rect x="583.28" y="511.56" width="57.6" height="58.68" fill="#c0ffc0"/>
|
||||
<rect x="583.28" y="511.56" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(588.28 525.30526)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="5.2677727" y="12">MULT</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="13.693066" y="27.594727">8x8</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_57">
|
||||
<text transform="translate(512.28 519.44)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="5.632742" y="12">a[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_56">
|
||||
<text transform="translate(515.34 542.3)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.5727406" y="12">b[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_55">
|
||||
<line x1="557.49274" y1="527.13384" x2="575.18004" y2="527.0695" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_54">
|
||||
<line x1="554.43274" y1="549.8596" x2="575.1805" y2="549.6297" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_53">
|
||||
<line x1="641.88" y1="540.9" x2="658.5672" y2="540.9" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_52">
|
||||
<text transform="translate(666.6672 533.12386)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">out[15:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_51">
|
||||
<line x1="569.43975" y1="521.37" x2="563.76" y2="532.06223" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_50">
|
||||
<line x1="569.43975" y1="544.73" x2="563.76" y2="555.42223" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_40">
|
||||
<text transform="translate(529.6 492.48)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">Operating mode 2: 8x8 multiplier</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_61">
|
||||
<line x1="614.85374" y1="584.28" x2="614.8337" y2="578.33994" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_60">
|
||||
<text transform="translate(586.08 584.28)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.7555656" y="12">mode=‘0’</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_63">
|
||||
<path d="M 480.46366 439.4672 L 487.56876 446.5723 L 499.18527 434.9558 L 502.7378 438.50836 L 503.4109 423.6251 L 488.5276 424.29817 L 492.08017 427.8507 Z" fill="#ff4040"/>
|
||||
<path d="M 480.46366 439.4672 L 487.56876 446.5723 L 499.18527 434.9558 L 502.7378 438.50836 L 503.4109 423.6251 L 488.5276 424.29817 L 492.08017 427.8507 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_62">
|
||||
<path d="M 489.33276 497.12856 L 482.22766 504.23366 L 493.84417 515.85017 L 490.2916 519.4027 L 505.1749 520.0758 L 504.5018 505.1925 L 500.94927 508.7451 Z" fill="#ff4040"/>
|
||||
<path d="M 489.33276 497.12856 L 482.22766 504.23366 L 493.84417 515.85017 L 490.2916 519.4027 L 505.1749 520.0758 L 504.5018 505.1925 L 500.94927 508.7451 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_65">
|
||||
<line x1="656.3763" y1="406.80216" x2="648.9099" y2="405.8134" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_64">
|
||||
<text transform="translate(656.3763 402.84)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.7555656" y="12">mode=‘1’</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_66">
|
||||
<line x1="663.1438" y1="418.39224" x2="648.5182" y2="423.55417" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,104 @@
|
|||
<?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="383.84 177.56 275.24 92.36" width="275.24" height="92.36">
|
||||
<defs>
|
||||
<font-face font-family="Times New Roman" font-size="13" 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>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -2 5 4" markerWidth="5" markerHeight="4" color="black">
|
||||
<g>
|
||||
<path d="M 2.4 0 L 0 -.9 L 0 .9 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="black">
|
||||
<g>
|
||||
<path d="M 8 0 L 0 -3 L 0 3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
</defs>
|
||||
<metadata> Produced by OmniGraffle 7.18.5\n2021-05-24 19:57:04 +0000</metadata>
|
||||
<g id="single_mode_dual_port_bram" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
|
||||
<title>single_mode_dual_port_bram</title>
|
||||
<g id="single_mode_dual_port_bram_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_2">
|
||||
<rect x="431.28" y="178.56" width="180.36" height="90.36" fill="#ffffc0"/>
|
||||
<rect x="431.28" y="178.56" width="180.36" height="90.36" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_3">
|
||||
<path d="M 431.28 248.6386 L 443.16 253.9786 L 431.28 259.3186 Z" fill="#ccc"/>
|
||||
<path d="M 431.28 248.6386 L 443.16 253.9786 L 431.28 259.3186 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Graphic_4">
|
||||
<text transform="translate(443.16 246.20248)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="2.1677246" y="12">clock</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_6">
|
||||
<text transform="translate(554.04 186.389)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">raddr[6:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_7">
|
||||
<text transform="translate(433.44 185.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="0" y="12">waddr[6:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_8">
|
||||
<text transform="translate(433.44 203.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">wen</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_9">
|
||||
<text transform="translate(581.9575 201.94124)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x="5.414551" y="12">ren</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_10">
|
||||
<text transform="translate(433.44 221.04)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".17456055" y="12">data_in[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_11">
|
||||
<text transform="translate(537.7457 218.84248)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-weight="400" fill="black" x=".803154" y="12">data_out[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_12">
|
||||
<line x1="384.84" y1="192.96" x2="421.74" y2="193.01682" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_13">
|
||||
<line x1="384.84" y1="209.21736" x2="419.94" y2="209.27141" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_14">
|
||||
<line x1="384.84" y1="228.31612" x2="421.74" y2="228.37295" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_15">
|
||||
<line x1="384.84" y1="253.4786" x2="419.94" y2="253.53265" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_16">
|
||||
<line x1="613.08" y1="226.76248" x2="649.98" y2="226.8193" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_17">
|
||||
<line x1="658.08" y1="209.93054" x2="622.98" y2="209.87648" marker-end="url(#FilledArrow_Marker_2)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_18">
|
||||
<line x1="658.08" y1="193.0293" x2="621.18" y2="192.97247" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_19">
|
||||
<line x1="406.25" y1="188.54" x2="399.8125" y2="198.1131" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_24">
|
||||
<line x1="406.25" y1="222.47592" x2="399.8125" y2="232.04903" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_25">
|
||||
<line x1="645.4375" y1="188.02956" x2="639" y2="197.60268" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_26">
|
||||
<line x1="636.4375" y1="221.83204" x2="630" y2="231.40516" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
|
@ -0,0 +1,66 @@
|
|||
<?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="263.52 371.31224 204.94633 60.68" width="204.94633" height="60.68">
|
||||
<defs>
|
||||
<font-face font-family="Times New Roman" font-size="14" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1166.6423" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<font-face font-family="Times New Roman" font-size="13" panose-1="2 2 5 3 5 4 5 9 3 4" units-per-em="1000" underline-position="-108.88672" underline-thickness="48.828125" slope="-1256.384" x-height="430.1758" cap-height="662.1094" ascent="891.1133" descent="-216.3086" font-style="italic" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="TimesNewRomanPS-ItalicMT"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -2 5 4" markerWidth="5" markerHeight="4" color="black">
|
||||
<g>
|
||||
<path d="M 2.4 0 L 0 -.9 L 0 .9 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
</defs>
|
||||
<metadata> Produced by OmniGraffle 7.18.5\n2021-05-24 21:09:05 +0000</metadata>
|
||||
<g id="single_mode_mult_8x8" stroke-opacity="1" fill="none" stroke-dasharray="none" fill-opacity="1" stroke="none">
|
||||
<title>single_mode_mult_8x8</title>
|
||||
<g id="single_mode_mult_8x8_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_13">
|
||||
<rect x="334.52" y="372.31224" width="57.6" height="58.68" fill="#ffffc0"/>
|
||||
<rect x="334.52" y="372.31224" width="57.6" height="58.68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(339.52 386.0575)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="5.2677727" y="12">MULT</tspan>
|
||||
<tspan font-family="Times New Roman" font-size="14" font-style="italic" font-weight="400" fill="black" x="13.693066" y="27.594727">8x8</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_10">
|
||||
<text transform="translate(263.52 380.19224)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="5.632742" y="12">a[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_9">
|
||||
<text transform="translate(266.58 403.05224)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="2.5727406" y="12">b[7:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_8">
|
||||
<line x1="308.73274" y1="387.8861" x2="326.42005" y2="387.82172" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_7">
|
||||
<line x1="305.67274" y1="410.6118" x2="326.4205" y2="410.38197" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_6">
|
||||
<line x1="393.12" y1="401.65224" x2="409.80724" y2="401.65224" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_5">
|
||||
<text transform="translate(417.90724 393.8761)" fill="black">
|
||||
<tspan font-family="Times New Roman" font-size="13" font-style="italic" font-weight="400" fill="black" x="0" y="12">out[15:0]</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_14">
|
||||
<line x1="320.67975" y1="382.12224" x2="315" y2="392.8145" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
<g id="Line_15">
|
||||
<line x1="320.67975" y1="405.48224" x2="315" y2="416.1745" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
|
@ -0,0 +1,50 @@
|
|||
.. _file_format_bitstream_distribution_file:
|
||||
|
||||
Bitstream Distribution File (.xml)
|
||||
----------------------------------
|
||||
|
||||
The bitstream distribution file aims to show
|
||||
|
||||
- The total number of configuration bits under each block
|
||||
- The number of configuration bits per block
|
||||
|
||||
An example of design constraints is shown as follows.
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<block name="fpga_top" number_of_bits="527">
|
||||
<block name="grid_clb_1__1_" number_of_bits="136">
|
||||
</block>
|
||||
<block name="grid_io_top_1__2_" number_of_bits="8">
|
||||
</block>
|
||||
<block name="grid_io_right_2__1_" number_of_bits="8">
|
||||
</block>
|
||||
<block name="grid_io_bottom_1__0_" number_of_bits="8">
|
||||
</block>
|
||||
<block name="grid_io_left_0__1_" number_of_bits="8">
|
||||
</block>
|
||||
<block name="sb_0__0_" number_of_bits="58">
|
||||
</block>
|
||||
<block name="sb_0__1_" number_of_bits="57">
|
||||
</block>
|
||||
<block name="sb_1__0_" number_of_bits="59">
|
||||
</block>
|
||||
<block name="sb_1__1_" number_of_bits="56">
|
||||
</block>
|
||||
<block name="cbx_1__0_" number_of_bits="33">
|
||||
</block>
|
||||
<block name="cbx_1__1_" number_of_bits="33">
|
||||
</block>
|
||||
<block name="cby_0__1_" number_of_bits="30">
|
||||
</block>
|
||||
<block name="cby_1__1_" number_of_bits="33">
|
||||
</block>
|
||||
</block>
|
||||
|
||||
.. option:: name="<string>"
|
||||
|
||||
The block name represents the instance name which you can find in the fabric netlists
|
||||
|
||||
.. option:: number_of_bits="<string>"
|
||||
|
||||
The total number of configuration bits in this block
|
|
@ -5,7 +5,7 @@ Fabric-dependent Bitstream
|
|||
|
||||
.. _file_formats_fabric_bitstream_plain_text:
|
||||
|
||||
Plain text (.txt)
|
||||
Plain text (.bit)
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
This file format is designed to be directly loaded to an FPGA fabric.
|
||||
|
@ -43,27 +43,38 @@ The information depends on the type of configuration procotol.
|
|||
|
||||
.. option:: memory_bank
|
||||
|
||||
Multiple lines will be included, each of which is organized as <address><space><bits>.
|
||||
Note that due to the use of Bit-Line and Word-Line decoders, every two lines are paired.
|
||||
The first line represents the Bit-Line address and configuration bit.
|
||||
The second line represents the Word-Line address and configuration bit.
|
||||
Multiple lines will be included, each of which is organized as <bl_address><wl_address><bits>.
|
||||
The size of address line and data input bits are shown as a comment in the bitstream file, which eases the development of bitstream downloader.
|
||||
For example
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
// Bitstream width (LSB -> MSB): <bl_address 5 bits><wl_address 5 bits><data input 1 bits>
|
||||
|
||||
The first part represents the Bit-Line address.
|
||||
The second part represents the Word-Line address.
|
||||
The third part represents the configuration bit.
|
||||
For example
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<bitline_address> <bit_value>
|
||||
<wordline_address> <bit_value>
|
||||
<bitline_address> <bit_value>
|
||||
<wordline_address> <bit_value>
|
||||
<bitline_address><wordline_address><bit_value>
|
||||
<bitline_address><wordline_address><bit_value>
|
||||
...
|
||||
<bitline_address> <bit_value>
|
||||
<wordline_address> <bit_value>
|
||||
<bitline_address><wordline_address><bit_value>
|
||||
|
||||
.. note:: When there are multiple configuration regions, each ``<bit_value>`` may consist of multiple bits. For example, ``0110`` represents the bits for 4 configuration regions, where the 4 digits correspond to the bits from region ``0, 1, 2, 3`` respectively.
|
||||
|
||||
.. option:: frame_based
|
||||
|
||||
Multiple lines will be included, each of which is organized as <address><space><bits>.
|
||||
Multiple lines will be included, each of which is organized as ``<address><data_input_bits>``.
|
||||
The size of address line and data input bits are shown as a comment in the bitstream file, which eases the development of bitstream downloader.
|
||||
For example
|
||||
|
||||
.. code-block:: verilog
|
||||
|
||||
// Bitstream width (LSB -> MSB): <address 14 bits><data input 1 bits>
|
||||
|
||||
Note that the address may include don't care bit which is denoted as ``x``.
|
||||
|
||||
.. note:: OpenFPGA automatically convert don't care bit to logic ``0`` when generating testbenches.
|
||||
|
@ -72,10 +83,10 @@ The information depends on the type of configuration procotol.
|
|||
|
||||
.. code-block:: xml
|
||||
|
||||
<frame_address> <bit_value>
|
||||
<frame_address> <bit_value>
|
||||
<frame_address><bit_value>
|
||||
<frame_address><bit_value>
|
||||
...
|
||||
<frame_address> <bit_value>
|
||||
<frame_address><bit_value>
|
||||
|
||||
.. note:: When there are multiple configuration regions, each ``<bit_value>`` may consist of multiple bits. For example, ``0110`` represents the bits for 4 configuration regions, where the 4 digits correspond to the bits from region ``0, 1, 2, 3`` respectively.
|
||||
|
||||
|
|
|
@ -23,3 +23,5 @@ OpenFPGA widely uses XML format for interchangable files
|
|||
fabric_key
|
||||
|
||||
io_mapping_file
|
||||
|
||||
bitstream_distribution_file
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<?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="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" viewBox="501 16 702 175" width="702" height="175">
|
||||
<defs>
|
||||
<font-face font-family="Helvetica Neue" font-size="20" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="HelveticaNeue"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
<marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" stroke-linejoin="miter" stroke-miterlimit="10" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="black">
|
||||
<g>
|
||||
<path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/>
|
||||
</g>
|
||||
</marker>
|
||||
<font-face font-family="Helvetica Neue" font-size="18" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
|
||||
<font-face-src>
|
||||
<font-face-name name="HelveticaNeue"/>
|
||||
</font-face-src>
|
||||
</font-face>
|
||||
</defs>
|
||||
<metadata> Produced by OmniGraffle 7.18.5\n2021-06-03 22:42:19 +0000</metadata>
|
||||
<g id="block_diagram" fill-opacity="1" stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none">
|
||||
<title>block_diagram</title>
|
||||
<rect fill="white" x="501" y="16" width="702" height="175"/>
|
||||
<g id="block_diagram_Layer_1">
|
||||
<title>Layer 1</title>
|
||||
<g id="Graphic_91">
|
||||
<rect x="502.5" y="25.252" width="128.5" height="49" fill="#666"/>
|
||||
<rect x="502.5" y="25.252" width="128.5" height="49" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(507.5 37.972)" fill="white">
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x=".91" y="19">Bitstream file</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_92">
|
||||
<line x1="632" y1="49.752" x2="726.244" y2="49.752" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="block_diagram_block_diagram">
|
||||
<title>block_diagram</title>
|
||||
<g id="Graphic_89">
|
||||
<rect x="740.144" y="34" width="92.332" height="68" fill="#4040ff"/>
|
||||
<rect x="740.144" y="34" width="92.332" height="68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(745.144 44.44)" fill="white">
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="14.876" y="19">FPGA </tspan>
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="13.206" y="42.56">Fabric</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_88">
|
||||
<rect x="740.144" y="122" width="92.332" height="68" fill="#4040ff"/>
|
||||
<rect x="740.144" y="122" width="92.332" height="68" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(745.144 132.44)" fill="white">
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="13.206" y="19">User’s </tspan>
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="10.236" y="42.56">Design</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_87">
|
||||
<rect x="969.072" y="61" width="92.332" height="98.5" fill="#ff4040"/>
|
||||
<rect x="969.072" y="61" width="92.332" height="98.5" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
<text transform="translate(974.072 86.69)" fill="white">
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="10.216" y="19">Output </tspan>
|
||||
<tspan font-family="Helvetica Neue" font-size="20" font-weight="400" fill="white" x="3.7560004" y="42.56">Checker</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_86">
|
||||
<text transform="translate(598.566 99.248)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="18" font-weight="400" fill="black" x="45474735e-20" y="17">Input stimulus</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_85">
|
||||
<line x1="833.476" y1="68" x2="955.172" y2="68" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_84">
|
||||
<line x1="833.476" y1="156" x2="955.172" y2="156" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_83">
|
||||
<line x1="1062.404" y1="110.84803" x2="1091.601" y2="111.21822" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Graphic_82">
|
||||
<text transform="translate(1109.5 90.496)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="18" font-weight="400" fill="black" x="1.0814986" y="17">Number of </tspan>
|
||||
<tspan font-family="Helvetica Neue" font-size="18" font-weight="400" fill="black" x="20.431499" y="38.504">errors</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_81">
|
||||
<text transform="translate(842 39)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="18" font-weight="400" fill="black" x="22737368e-20" y="17">FPGA output vectors</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Graphic_80">
|
||||
<text transform="translate(842 163.496)" fill="black">
|
||||
<tspan font-family="Helvetica Neue" font-size="18" font-weight="400" fill="black" x="42632564e-21" y="17">Expected output vectors</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g id="Line_79">
|
||||
<path d="M 655.095 94.248 L 655.095 68 L 726.244 68" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="Line_78">
|
||||
<path d="M 655.095 125.752 L 655.095 156 L 726.244 156" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 284 KiB |
|
@ -16,24 +16,32 @@ In this part, we will introduce the hierarchy, dependency and functionality of e
|
|||
+-----------------+---------+----------------+---------------+
|
||||
|
||||
OpenFPGA can auto-generate two types of Verilog testbenches to validate the correctness of the fabric: full and formal-oriented.
|
||||
Both testbenches share the same organization, as depicted in :numref:`fig_verilog_testbench_organization` (a).
|
||||
Both testbenches share the same organization, as depicted in :numref:`fig_verilog_testbench_organization`.
|
||||
To enable self-testing, the FPGA and user's RTL design (simulate using an HDL simulator) are driven by the same input stimuli, and any mismatch on their outputs will raise an error flag.
|
||||
|
||||
.. _fig_verilog_testbench_organization:
|
||||
|
||||
.. figure:: figures/verilog_testbench_organization.png
|
||||
.. figure:: figures/full_testbench_block_diagram.svg
|
||||
:scale: 50%
|
||||
:alt: Functional Verification using ModelSim
|
||||
:alt: Verilog testbench principles
|
||||
|
||||
Principles of Verilog testbenches organization: (a) block diagram and (b) waveforms.
|
||||
Principles of Verilog testbenches: (1) using common input stimuli; (2) applying bitstream; (3) checking output vectors.
|
||||
|
||||
.. _fig_verilog_full_testbench_waveform:
|
||||
|
||||
.. figure:: figures/full_testbench_waveform.svg
|
||||
:scale: 50%
|
||||
:alt: Full testbench waveform
|
||||
|
||||
Illustration on the waveforms in full testbench
|
||||
|
||||
Full Testbench
|
||||
~~~~~~~~~~~~~~
|
||||
Full testbench aims at simulating an entire FPGA operating period, consisting of two phases:
|
||||
|
||||
- the **Configuration Phase**, where the synthesized design bitstream is loaded to the programmable fabric, as highlighted by the green rectangle of :numref:`fig_verilog_testbench_organization` (b);
|
||||
- the **Configuration Phase**, where the synthesized design bitstream is loaded to the programmable fabric, as highlighted by the green rectangle of :numref:`fig_verilog_full_testbench_waveform`;
|
||||
|
||||
- the **Operating Phase**, where random input vectors are auto-generated to drive both Devices Under Test (DUTs), as highlighted by the red rectangle of :numref:`fig_verilog_testbench_organization` (b). Using the full testbench, users can validate both the configuration circuits and programming fabric of an FPGA.
|
||||
- the **Operating Phase**, where random input vectors are auto-generated to drive both Devices Under Test (DUTs), as highlighted by the red rectangle of :numref:`fig_verilog_full_testbench_waveform`. Using the full testbench, users can validate both the configuration circuits and programming fabric of an FPGA.
|
||||
|
||||
Formal-oriented Testbench
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -69,6 +69,15 @@ write_fabric_bitstream
|
|||
Specify the file format [``plain_text`` | ``xml``]. By default is ``plain_text``.
|
||||
See file formats in :ref:`file_formats_fabric_bitstream_xml` and :ref:`file_formats_fabric_bitstream_plain_text`.
|
||||
|
||||
.. option:: --fast_configuration
|
||||
|
||||
Reduce the bitstream size when outputing by skipping dummy configuration bits. It is applicable to configuration chain, memory bank and frame-based configuration protocols. For configuration chain, when enabled, the zeros at the head of the bitstream will be skipped. For memory bank and frame-based, when enabled, all the zero configuration bits will be skipped. So ensure that your memory cells can be correctly reset to zero with a reset signal.
|
||||
|
||||
.. warning:: Fast configuration is only applicable to plain text file format!
|
||||
|
||||
.. note:: If both reset and set ports are defined in the circuit modeling for programming, OpenFPGA will pick the one that will bring largest benefit in speeding up configuration.
|
||||
|
||||
|
||||
.. option:: --verbose
|
||||
|
||||
Show verbose log
|
||||
|
@ -87,4 +96,22 @@ write_io_mapping
|
|||
|
||||
Show verbose log
|
||||
|
||||
report_bitstream_distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Output the bitstream distribution to a file
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
Specify the file name where the bitstream distribution will be outputted to.
|
||||
See file formats in :ref:`file_format_bitstream_distribution_file`.
|
||||
|
||||
.. option:: --depth <int> or -d <int>
|
||||
|
||||
Specify the maximum depth of the block which should appear in the block
|
||||
|
||||
.. option:: --verbose
|
||||
|
||||
Show verbose log
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ FPGA-Verilog
|
|||
write_fabric_verilog
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Write the Verilog netlist for FPGA fabric based on module graph
|
||||
Write the Verilog netlist for FPGA fabric based on module graph. See details in :ref:`fabric_netlists`.
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
|
@ -40,15 +40,19 @@ write_fabric_verilog
|
|||
|
||||
Show verbose log
|
||||
|
||||
write_verilog_testbench
|
||||
write_full_testbench
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Write the Verilog testbench for FPGA fabric
|
||||
Write the full testbench for FPGA fabric in Verilog format. See details in :ref:`fpga_verilog_testbench`.
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
The output directory for all the testbench netlists. We suggest the use of same output directory as fabric Verilog netlists. For example, ``--file /temp/testbench``
|
||||
|
||||
.. option:: --bitstream <string>
|
||||
|
||||
The bitstream file to be loaded to the full testbench, which should be in the same file format that OpenFPGA can outputs (See detailes in :ref:`file_formats_fabric_bitstream_plain_text`). For example, ``--bitstream and2.bit``
|
||||
|
||||
.. option:: --fabric_netlist_file_path <string>
|
||||
|
||||
Specify the fabric Verilog file if they are not in the same directory as the testbenches to be generated. If not specified, OpenFPGA will assume that the fabric netlists are the in the same directory as testbenches and assign default names. For example, ``--file /temp/fabric/fabric_netlists.v``
|
||||
|
@ -68,22 +72,113 @@ write_verilog_testbench
|
|||
|
||||
.. note:: If both reset and set ports are defined in the circuit modeling for programming, OpenFPGA will pick the one that will bring largest benefit in speeding up configuration.
|
||||
|
||||
.. option:: --print_top_testbench
|
||||
.. option:: --explicit_port_mapping
|
||||
|
||||
Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
Use explicit port mapping when writing the Verilog netlists
|
||||
|
||||
.. option:: --print_formal_verification_top_netlist
|
||||
.. option:: --default_net_type <string>
|
||||
|
||||
Generate a top-level module which can be used in formal verification
|
||||
Specify the default net type for the Verilog netlists. Currently, supported types are ``none`` and ``wire``. Default value: ``none``.
|
||||
|
||||
.. option:: --print_preconfig_top_testbench
|
||||
.. option:: --include_signal_init
|
||||
|
||||
Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
Output signal initialization to Verilog testbench to smooth convergence in HDL simulation
|
||||
|
||||
.. option:: --print_simulation_ini <string>
|
||||
.. option:: --verbose
|
||||
|
||||
Output an exchangeable simulation ini file, which is needed only when you need to interface different HDL simulators using openfpga flow-run scripts. For example, ``--print_simulation_ini /temp/testbench/sim.ini``
|
||||
Show verbose log
|
||||
|
||||
write_preconfigured_fabric_wrapper
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Write the Verilog wrapper for a preconfigured FPGA fabric. See details in :ref:`fpga_verilog_testbench`.
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
The output directory for the netlists. We suggest the use of same output directory as fabric Verilog netlists. For example, ``--file /temp/testbench``
|
||||
|
||||
.. option:: --fabric_netlist_file_path <string>
|
||||
|
||||
Specify the fabric Verilog file if they are not in the same directory as the testbenches to be generated. If not specified, OpenFPGA will assume that the fabric netlists are the in the same directory as testbenches and assign default names. For example, ``--file /temp/fabric/fabric_netlists.v``
|
||||
|
||||
.. option:: --pin_constraints_file <string> or -pcf <string>
|
||||
|
||||
Specify the *Pin Constraints File* (PCF) if you want to custom stimulus in testbenches. For example, ``-pin_constraints_file pin_constraints.xml``
|
||||
Strongly recommend for multi-clock simulations. See detailed file format about :ref:`file_format_pin_constraints_file`.
|
||||
|
||||
.. option:: --explicit_port_mapping
|
||||
|
||||
Use explicit port mapping when writing the Verilog netlists
|
||||
|
||||
.. option:: --default_net_type <string>
|
||||
|
||||
Specify the default net type for the Verilog netlists. Currently, supported types are ``none`` and ``wire``. Default value: ``none``.
|
||||
|
||||
.. option:: --support_icarus_simulator
|
||||
|
||||
Output Verilog netlists with syntax that iVerilog simulator can accept
|
||||
|
||||
.. option:: --verbose
|
||||
|
||||
Show verbose log
|
||||
|
||||
write_preconfigured_testbench
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Write the Verilog testbench for a preconfigured FPGA fabric. See details in :ref:`fpga_verilog_testbench`.
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
The output directory for all the testbench netlists. We suggest the use of same output directory as fabric Verilog netlists. For example, ``--file /temp/testbench``
|
||||
|
||||
.. option:: --fabric_netlist_file_path <string>
|
||||
|
||||
Specify the fabric Verilog file if they are not in the same directory as the testbenches to be generated. If not specified, OpenFPGA will assume that the fabric netlists are the in the same directory as testbenches and assign default names. For example, ``--file /temp/fabric/fabric_netlists.v``
|
||||
|
||||
.. option:: --reference_benchmark_file_path <string>
|
||||
|
||||
Must specify the reference benchmark Verilog file if you want to output any testbenches. For example, ``--reference_benchmark_file_path /temp/benchmark/counter_post_synthesis.v``
|
||||
|
||||
.. option:: --pin_constraints_file <string> or -pcf <string>
|
||||
|
||||
Specify the *Pin Constraints File* (PCF) if you want to custom stimulus in testbenches. For example, ``-pin_constraints_file pin_constraints.xml``
|
||||
Strongly recommend for multi-clock simulations. See detailed file format about :ref:`file_format_pin_constraints_file`.
|
||||
|
||||
.. option:: --explicit_port_mapping
|
||||
|
||||
Use explicit port mapping when writing the Verilog netlists
|
||||
|
||||
.. option:: --default_net_type <string>
|
||||
|
||||
Specify the default net type for the Verilog netlists. Currently, supported types are ``none`` and ``wire``. Default value: ``none``.
|
||||
|
||||
|
||||
.. option:: --support_icarus_simulator
|
||||
|
||||
Output Verilog netlists with syntax that iVerilog simulator can accept
|
||||
|
||||
.. option:: --verbose
|
||||
|
||||
Show verbose log
|
||||
|
||||
write_simulation_task_info
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Write an interchangeable file in ``.ini`` format to interface HDL simulators, such as iVerilog and Modelsim.
|
||||
|
||||
.. option:: --file <string> or -f <string>
|
||||
|
||||
Specify the file path to output simulation-related information. For example, ``--file simulation.ini``
|
||||
|
||||
.. option:: --hdl_dir <string>
|
||||
|
||||
Specify the directory path where HDL netlists are created. For example, ``--hdl_dir ./SRC``
|
||||
|
||||
.. option:: --reference_benchmark_file_path <string>
|
||||
|
||||
Must specify the reference benchmark Verilog file if you want to output any testbenches. For example, ``--reference_benchmark_file_path /temp/benchmark/counter_post_synthesis.v``
|
||||
|
||||
.. option:: --verbose
|
||||
|
||||
Show verbose log
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Why OpenFPGA?
|
||||
-------------
|
||||
|
||||
.. note:: If this is the first time you learn OpenFPGA, we strongly recommend you to watch the `introduction video <https://youtu.be/ocODUGcYGqo>`_
|
||||
.. note:: If this is your first time learning OpenFPGA, we strongly recommend you to watch the `introduction video <https://youtu.be/ocODUGcYGqo>`_
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. youtube:: ocODUGcYGqo
|
||||
|
||||
OpenFPGA aims to be an open-source framework that enables rapid prototyping of customizable FPGA architectures. As shown in :numref:`fig_openfpga_motivation`, a conventional approach will take a large group of experienced engineers more than one year to achieve production-ready layout and assoicated CAD tools. In fact, most of the engineering efforts are spent on manual layouts and developing ad-hoc CAD support.
|
||||
OpenFPGA aims to be an open-source framework that enables rapid prototyping of customizable FPGA architectures. As shown in :numref:`fig_openfpga_motivation`, a conventional approach will take a large group of experienced engineers more than one year to achieve production-ready layout and associated CAD tools. In fact, most of the engineering efforts are spent on manual layouts and developing ad-hoc CAD support.
|
||||
|
||||
.. _fig_openfpga_motivation:
|
||||
|
||||
|
@ -15,15 +15,15 @@ OpenFPGA aims to be an open-source framework that enables rapid prototyping of c
|
|||
:scale: 50%
|
||||
:alt: OpenFPGA: a fast prototyping framework for customizable FPGAs
|
||||
|
||||
Comparison on engineering time and effort to prototype an FPGA using OpenFPGA and conventional approaches [All the layout figures are permitted to publish under proper licenses]
|
||||
Comparison on engineering time and effort to prototype an FPGA using OpenFPGA and conventional approaches [All the layout figures are publishable under the proper licenses]
|
||||
|
||||
Using OpenFPGA, the development cycle in both hardware and software can be significantly accelerated. OpenFPGA can automatically generate Verilog netlists describing a full FPGA fabric based on an XML-based description file. Thanks to modern semi-custom design tools, production-ready layout generation can be achieved within 24 hours. To help sign-off, OpenFPGA can auto-generate Verilog testbenches to validate the correctness of FPGA fabric using modern verification tools.
|
||||
OpenFPGA also provides native bitstream generation support based the same XML-based description file used in Verilog generation. This avoid the recurring engineering in developing CAD tools for different FPGAs. Once the FPGA architecture is finalized, the CAD tool is ready to use.
|
||||
OpenFPGA also provides native bitstream generation support based on the same XML-based description file used in Verilog generation, avoiding the recurring engineering in developing CAD tools for different FPGAs. Once the FPGA architecture is finalized, the CAD tool is ready to use.
|
||||
|
||||
OpenFPGA can support any architecture that VPR can describe, covering most of the architecture enhancements available in modern FPGAs, and hence unlocks a large design space in prototyping customizable FPGAs. In addition, OpenFPGA provides enriched syntax which allows users to customized primitive circuit designed downto transistor-level parameters. This helps developers to customize the P.P.A. (Power, Performance and Area) to the best. All these features open the door of prototyping/studying flexible FPGAs to a small group of junior engineers or researchers.
|
||||
OpenFPGA can support any architecture that VPR can describe, covering most of the architecture enhancements available in modern FPGAs, and hence unlocks a large design space in prototyping customizable FPGAs. In addition, OpenFPGA provides enriched syntax which allows users to customize primitive circuits designed down to transistor-level parameters. This helps developers to customize the P.P.A. (Power, Performance and Area) to the best. All these features open the door of prototyping/studying flexible FPGAs to a small group of junior engineers or researchers.
|
||||
|
||||
In terms of tool functionality, OpenFPGA consists of the following parts: FPGA-Verilog, FPGA-SDC, FPGA-Bitstream and FPGA-SPICE.
|
||||
The rest of this section will focus on detailed motivation on each of them, as depicted in :numref:`fig_openfpga_framework`.
|
||||
The rest of this section will focus on detailed motivation for each of them, as depicted in :numref:`fig_openfpga_framework`.
|
||||
|
||||
.. _fig_openfpga_framework:
|
||||
|
||||
|
@ -39,7 +39,7 @@ Fully Customizable Architecture
|
|||
OpenFPGA supports VPR's architecture description language, which allows
|
||||
users to define versatile programmable fabrics down to point-to-point
|
||||
interconnection.
|
||||
OpenFPGA leverage VPR's architecture description by introducing an XML-based
|
||||
OpenFPGA leverages VPR's architecture description by introducing an XML-based
|
||||
architecture annotation, enabling fully customizable FPGA fabric down to
|
||||
circuit elements.
|
||||
As illustrated in :ref:`fig_openfpga_arch_lang_coverage`, OpenFPGA's
|
||||
|
@ -60,7 +60,9 @@ FPGA-Verilog
|
|||
~~~~~~~~~~~~
|
||||
|
||||
Driven by the strong need in data processing applications, Field Programmable Gate Arrays (FPGAs) are playing an ever-increasing role as programmable accelerators in modern
|
||||
computing systems. To fully unlock processing capabilities for domain-specific applications, FPGA architectures have to be tailored for seamless cooperation with other computing resources. However, prototyping and bringing to production a customized FPGA is a costly and complex endeavor even for industrial vendors. OpenFPGA, an opensource framework, aims to rapid prototype of customizable FPGA architectures through a semi-custom design approach. We propose an XML-to-Prototype design flow, where the Verilog netlists of a full FPGA fabric can be autogenerated using an extension of the XML language from the VTR framework and then fed into a back-end flow to generate production-ready layouts.
|
||||
computing systems. To fully unlock processing capabilities for domain-specific applications, FPGA architectures have to be tailored for seamless cooperation with other computing resources. However, prototyping and bringing to production a customized FPGA is a costly and complex endeavor even for industrial vendors.
|
||||
|
||||
OpenFPGA, an opensource framework, aims to rapidly prototype customizable FPGA architectures through a semi-custom design approach. We propose an XML-to-Prototype design flow, where the Verilog netlists of a full FPGA fabric can be autogenerated using an extension of the XML language from the VTR framework and then fed into a back-end flow to generate production-ready layouts.
|
||||
FPGA-Verilog is designed to output flexible and standard Verilog netlists, enabling various backend choices, as illustrated in :ref:`fig_fpga_verilog_motivation`.
|
||||
|
||||
.. _fig_fpga_verilog_motivation:
|
||||
|
@ -80,7 +82,7 @@ Design constraints are indepensible in modern ASIC design flows to guarantee the
|
|||
OpenFPGA includes a rich SDC generator in the OpenFPGA framework to deal with both PnR constraints and sign-off timing analysis.
|
||||
Our flow automatically generates two sets of SDC files.
|
||||
|
||||
- The first set of SDC is designed for the P&R flow, where all the combinational loops are broken to enable wellcontrolled timing-driven P&R. In addition, there are SDC files devoted to constrain pin-to-pin timing for all the resources in FPGAs, in order to obtain nicely constrained and homogeneous delays across the fabric. OpenFPGA allows users to define timing constraints in the architecture description and outputs timing constraints in standard format, enabling fully timing constrained backend flow (see :ref:`fig_fpga_sdc_motivation`).
|
||||
- The first set of SDC is designed for the P&R flow, where all the combinational loops are broken to enable well controlled timing-driven P&R. In addition, there are SDC files devoted to constrain pin-to-pin timing for all the resources in FPGAs, in order to obtain nicely constrained and homogeneous delays across the fabric. OpenFPGA allows users to define timing constraints in the architecture description and outputs timing constraints in standard format, enabling fully timing constrained backend flow (see :ref:`fig_fpga_sdc_motivation`).
|
||||
- The second set of SDC is designed for the timing analysis of a benchmark at the post P&R stage.
|
||||
|
||||
.. _fig_fpga_sdc_motivation:
|
||||
|
@ -98,20 +100,18 @@ The technical details can be found in our FPL'19 paper :cite:`XTang_FPL_2019`.
|
|||
FPGA-Bitstream
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
EDA support is essential for end-users to implement designs on a customized FPGA. OpenFPGA provides a general-purpose bitstream generator FPGA-Bitstream for any architecture that can be described by VPR. As the native CAD tool for any customized FPGA that is produced by FPGA-Verilog, FPGA-Bitstream is ready to use once users finalize the XML-based architecture description file. This eliminates the huge engineering efforts spent on developing bitstream generator for customized FPGAs.
|
||||
|
||||
Using FPGA-Bitstream, users can launch (1) Verilog-to-Bitstream flow. This is the typical implementation flow for end-users; (2) Verilog-to-Verification flow. OpenFPGA can output Verilog testbenches with self-testing features to validate users' implemetations on their customized FPGA fabrics.
|
||||
EDA support is essential for end-users to implement designs on a customized FPGA. OpenFPGA provides a general-purpose bitstream generator FPGA-Bitstream for any architecture that can be described by VPR. As the native CAD tool for any customized FPGA that is produced by FPGA-Verilog, FPGA-Bitstream is ready to use once users finalize the XML-based architecture description file. This eliminates the huge engineering efforts spent on developing bitstream generators for customized FPGAs. Using FPGA-Bitstream, users can launch (1) Verilog-to-Bitstream flow, the typical implementation flow for end-users; (2) Verilog-to-Verification flow. OpenFPGA can output Verilog testbenches with self-testing features to validate users' implemetations on their customized FPGA fabrics.
|
||||
|
||||
The technical details can be found in our TVLSI'19 paper :cite:`XTang_TVLSI_2019` and FPL'19 paper :cite:`XTang_FPL_2019`.
|
||||
|
||||
FPGA-SPICE
|
||||
~~~~~~~~~~
|
||||
|
||||
The built-in timing and power analysis engines of VPR are based on analytical models :cite:`VBetz_Book_1999,JGoeders_FPT_2012`. Analytical model-based analysis can promise accuracy only on a limited number of circuit designs for which the model is valid. As the technology advancements create more opportunities on circuit designs and FPGA architectures, the analytical power model require to be updated to follow the new trends. However, without referring to simulation results, the analytical power models cannot prove their accuracy. SPICE simulators have the advantages of generality and accuracy over analytical models. For this reason, SPICE simulation results are often selected to check the accuracy of analytical models. Therefore, there is a strong need for a simulation-based power analysis approach for FPGAs, which can support general circuit designs.
|
||||
The built-in timing and power analysis engines of VPR are based on analytical models :cite:`VBetz_Book_1999,JGoeders_FPT_2012`. Analytical model-based analysis can promise accuracy only on a limited number of circuit designs for which the model is valid. As the technology advancements create more opportunities on circuit designs and FPGA architectures, the analytical power model requires updates to follow the new trends. However, without referring to simulation results, the analytical power models cannot prove their accuracy. SPICE simulators have the advantages of generality and accuracy over analytical models. For this reason, SPICE simulation results are often selected to check the accuracy of analytical models. Therefore, there is a strong need for a simulation-based power analysis approach for FPGAs, which can support general circuit designs.
|
||||
|
||||
It motivates us to develop FPGA-SPICE, an add-on for the current State-of-Art FPGA architecture exploration tools, VPR :cite:`JRose_FPGA_2012`.
|
||||
FPGA-SPICE aims at generating SPICE netlists and testbenches for the FPGA architectures supported by VPR. The SPICE netlists and testbenches are generated according to the placement and routing results of VPR. As a result, SPICE simulator can be used to perform precise delay and power analysis. The SPICE simulation results are useful in three aspects: (1) it can provide accurate power analysis; (2) it helps to improve the accuracy of built-in analytical models; and moreover (3) it creates opportunities in developing novel analytical models.
|
||||
FPGA-SPICE aims at generating SPICE netlists and testbenches for the FPGA architectures supported by VPR. The SPICE netlists and testbenches are generated according to the placement and routing results of VPR. As a result, SPICE simulator can be used to perform precise delay and power analysis. The SPICE simulation results are useful in three aspects: (1) they provide accurate power analysis; (2) they help to improve the accuracy of built-in analytical models; and moreover (3) they create opportunities in developing novel analytical models.
|
||||
|
||||
SPICE modeling for FPGA architectures requires detailed transistor-level modeling for all the circuit elements within the considered FPGA architecture. However, current VPR architectural description language :cite:`JLuu_FPGA_2011` does not offer enough transistor-level parameters to model the most common circuit modules, such as multiplexers and LUTs. Therefore, we develop an extension on the VPR architectural description language to model the transistor-level circuit designs.
|
||||
SPICE modeling for FPGA architectures requires detailed transistor-level modeling for all the circuit elements within the considered FPGA architecture. However, current VPR architectural description language :cite:`JLuu_FPGA_2011` does not offer enough transistor-level parameters to model the most common circuit modules, such as multiplexers and LUTs. Therefore, we are developing an extension on the VPR architectural description language to model the transistor-level circuit designs.
|
||||
|
||||
The technical details can be found in our ICCD’15 paper :cite:`XTang_ICCD_2015` and TVLSI'19 paper :cite:`XTang_TVLSI_2019`.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Technical Highlights
|
||||
--------------------
|
||||
|
||||
The follow lists of technical features are created to help users spot their needs in customizing FPGA fabrics.(**as of February 2021**)
|
||||
The following lists of technical features were created to help users find their needs for customizing FPGA fabrics.(**as of February 2021**)
|
||||
|
||||
Supported Circuit Designs
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -42,19 +42,21 @@ 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 |
|
||||
| | | | - :ref:`circuit_model_single_mode_dpram_example` |
|
||||
| | | | - :ref:`circuit_model_multi_mode_dpram_example` |
|
||||
+-----------------+--------------+-----------+-----------------------------------------------------+
|
||||
| | Arithmetic | No | Yes | - **Any size** |
|
||||
| | Units | | | - Multiplier |
|
||||
| | | | - :ref:`circuit_model_full_adder_example` |
|
||||
| | Units | | | - :ref:`circuit_model_full_adder_example` |
|
||||
| | | | - :ref:`circuit_model_single_mode_mult8x8_example` |
|
||||
| | | | - :ref:`circuit_model_multi_mode_mult8x8_example` |
|
||||
+-----------------+--------------+-----------+-----------------------------------------------------+
|
||||
| I/O | No | Yes | - :ref:`circuit_model_gpio_example` |
|
||||
| | | | - Bi-directional buffer |
|
||||
|
@ -62,13 +64,13 @@ Supported Circuit Designs
|
|||
+-----------------+--------------+-----------+-----------------------------------------------------+
|
||||
|
||||
|
||||
* The user defined netlist could come from a standard cell
|
||||
* The user defined netlist could come from a standard cell. See :ref:`tutorial_standard_cell` for details.
|
||||
|
||||
Supported FPGA Architectures
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We support most FPGA architectures that VPR can support!
|
||||
The following are most commonly seen architectural features:
|
||||
The following are the most commonly seen architectural features:
|
||||
|
||||
+------------------------+----------------------------------------------+
|
||||
| Block Type | Architecture features |
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
.. _tutorial_standard_cell:
|
||||
|
||||
Build an FPGA fabric using Standard Cell Libraries
|
||||
==================================================
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
.. _tutorial_user_def_temp:
|
||||
|
||||
Integrating Custom Verilog Modules with user_defined_template.v
|
||||
================================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. youtube:: YTggSZHsTjg
|
||||
|
||||
Introduction and Setup
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
**In this tutorial, we will**
|
||||
|
|
|
@ -24,13 +24,13 @@ In general, please follow the steps to compile
|
|||
|
||||
.. note:: cmake3.12+ is recommended to compile OpenFPGA with GUI
|
||||
|
||||
.. note:: Recommand to use ``make -j`` to accelerate the compilation
|
||||
.. note:: Recommend using ``make -j<int>`` to accelerate the compilation, where ``<int>`` denotes the number of cores to be used in compilation.
|
||||
|
||||
.. note:: VPR's GUI requires gtk-3, and can be enabled with ``cmake .. -DVPR_USE_EZGL=on``
|
||||
|
||||
**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, users can run the following command from OpenFPGA root repository
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
|
@ -38,7 +38,7 @@ To quickly verify the tool is well compiled, user can run the following command
|
|||
|
||||
Dependencies
|
||||
~~~~~~~~~~~~
|
||||
Full list of dependencies can be found at install_dependencies_build_
|
||||
Full list of dependencies can be found at install_dependencies_build_.
|
||||
In particular, OpenFPGA requires specific versions for the following dependencies:
|
||||
|
||||
:cmake:
|
||||
|
@ -53,8 +53,8 @@ In particular, OpenFPGA requires specific versions for the following dependencie
|
|||
Running with the docker image
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Users can skip the traditional installation process by using Dockerized version
|
||||
of the OpenFPGA tool. OpenFPGA project maintains the docker image/Github package of
|
||||
Users can skip the traditional installation process by using the Dockerized version
|
||||
of the OpenFPGA tool. The OpenFPGA project maintains the docker image/Github package of
|
||||
the latest stable version of OpenFPGA in the following repository
|
||||
`openfpga-master <https://github.com/orgs/lnis-uofu/packages/container/package/openfpga-master>`_.
|
||||
This image contains precompiled OpenFPGA binaries with all prerequisites installed.
|
||||
|
|
|
@ -22,13 +22,13 @@ Once the ``openfpga.sh`` script is sourced, you can run any of the following com
|
|||
|
||||
.. option:: run-task <task_name> **kwarags
|
||||
|
||||
This command runs the specified task listed from the ``list-task`` command or from the existing directory. The command name is relative to the ``TASK_DIRECTORY``. User can provide any additional arguments which are listed `here <_openfpga_task_args>`_ to this command.
|
||||
This command runs the specified task listed from the ``list-task`` command or from the existing directory. The command name is relative to the ``TASK_DIRECTORY``. Users can provide any additional arguments which are listed `here <_openfpga_task_args>`_ to this command.
|
||||
|
||||
.. option:: run-modelsim
|
||||
|
||||
This command runs the verification using ModelSim.
|
||||
The test benches are generated during the OpenFPGA run.
|
||||
**Note**: user need to have ``VSIM`` install and configured
|
||||
**Note**: users need to have ``VSIM`` installed and configured
|
||||
|
||||
|
||||
.. option:: run-regression-local
|
||||
|
|
|
@ -71,5 +71,27 @@ size_t find_bitstream_manager_config_bit_index_in_parent_block(const BitstreamMa
|
|||
return curr_index;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* Find the total number of configuration bits under a block
|
||||
* As configuration bits are stored only under the leaf blocks,
|
||||
* this function will recursively visit all the child blocks
|
||||
* until reaching a leaf block, where we collect the number of bits
|
||||
*******************************************************************/
|
||||
size_t rec_find_bitstream_manager_block_sum_of_bits(const BitstreamManager& bitstream_manager,
|
||||
const ConfigBlockId& block) {
|
||||
/* For leaf block, return directly with the number of bits, because it has not child block */
|
||||
if (0 < bitstream_manager.block_bits(block).size()) {
|
||||
VTR_ASSERT_SAFE(bitstream_manager.block_children(block).empty());
|
||||
return bitstream_manager.block_bits(block).size();
|
||||
}
|
||||
|
||||
size_t sum_of_bits = 0;
|
||||
/* Dive to child blocks if this block has any */
|
||||
for (const ConfigBlockId& child_block : bitstream_manager.block_children(block)) {
|
||||
sum_of_bits += rec_find_bitstream_manager_block_sum_of_bits(bitstream_manager, child_block);
|
||||
}
|
||||
|
||||
return sum_of_bits;
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -22,6 +22,9 @@ std::vector<ConfigBlockId> find_bitstream_manager_top_blocks(const BitstreamMana
|
|||
size_t find_bitstream_manager_config_bit_index_in_parent_block(const BitstreamManager& bitstream_manager,
|
||||
const ConfigBitId& bit_id);
|
||||
|
||||
size_t rec_find_bitstream_manager_block_sum_of_bits(const BitstreamManager& bitstream_manager,
|
||||
const ConfigBlockId& block);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
/********************************************************************
|
||||
* This file includes functions that report distribution of bitstream by blocks
|
||||
*******************************************************************/
|
||||
#include <chrono>
|
||||
#include <ctime>
|
||||
#include <fstream>
|
||||
|
||||
/* Headers from vtrutil library */
|
||||
#include "vtr_assert.h"
|
||||
#include "vtr_log.h"
|
||||
#include "vtr_time.h"
|
||||
|
||||
/* Headers from openfpgautil library */
|
||||
#include "openfpga_digest.h"
|
||||
#include "openfpga_tokenizer.h"
|
||||
#include "openfpga_version.h"
|
||||
|
||||
#include "openfpga_reserved_words.h"
|
||||
|
||||
#include "bitstream_manager_utils.h"
|
||||
#include "report_arch_bitstream_distribution.h"
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
/********************************************************************
|
||||
* This function write header information for an XML file of bitstream distribution
|
||||
*******************************************************************/
|
||||
static
|
||||
void report_architecture_bitstream_distribution_xml_file_head(std::fstream& fp) {
|
||||
valid_file_stream(fp);
|
||||
|
||||
auto end = std::chrono::system_clock::now();
|
||||
std::time_t end_time = std::chrono::system_clock::to_time_t(end);
|
||||
|
||||
fp << "<!-- " << std::endl;
|
||||
fp << "\t- Report Architecture Bitstream Distribution" << std::endl;
|
||||
fp << "\t- Version: " << openfpga::VERSION << std::endl;
|
||||
fp << "\t- Date: " << std::ctime(&end_time) ;
|
||||
fp << "--> " << std::endl;
|
||||
fp << std::endl;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* Recursively report the bitstream distribution of a block to a file
|
||||
* This function will use a Depth-First Search in outputting bitstream
|
||||
* for each block
|
||||
* For block with child blocks, we visit each child recursively
|
||||
* The reporting can be stopped at a given maximum hierarchy level
|
||||
* which is used to limit the length of the report
|
||||
*******************************************************************/
|
||||
static
|
||||
void rec_report_block_bitstream_distribution_to_xml_file(std::fstream& fp,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const ConfigBlockId& block,
|
||||
const size_t& max_hierarchy_level,
|
||||
const size_t& hierarchy_level) {
|
||||
valid_file_stream(fp);
|
||||
|
||||
if (hierarchy_level > max_hierarchy_level) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Write the bitstream distribution of this block */
|
||||
write_tab_to_file(fp, hierarchy_level);
|
||||
fp << "<block";
|
||||
fp << " name=\"" << bitstream_manager.block_name(block)<< "\"";
|
||||
fp << " number_of_bits=\"" << rec_find_bitstream_manager_block_sum_of_bits(bitstream_manager, block) << "\"";
|
||||
fp << ">" << std::endl;
|
||||
|
||||
/* Dive to child blocks if this block has any */
|
||||
for (const ConfigBlockId& child_block : bitstream_manager.block_children(block)) {
|
||||
rec_report_block_bitstream_distribution_to_xml_file(fp, bitstream_manager, child_block,
|
||||
max_hierarchy_level, hierarchy_level + 1);
|
||||
}
|
||||
|
||||
write_tab_to_file(fp, hierarchy_level);
|
||||
fp << "</block>" <<std::endl;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* Report the distribution of bitstream by blocks, e.g., the number of
|
||||
* configuration bits per SB/CB/CLB
|
||||
* This function can generate a report to a file
|
||||
*
|
||||
* Notes:
|
||||
* - The output format is a table whose format is compatible with RST files
|
||||
*******************************************************************/
|
||||
int report_architecture_bitstream_distribution(const BitstreamManager& bitstream_manager,
|
||||
const std::string& fname,
|
||||
const size_t& max_hierarchy_level) {
|
||||
/* Ensure that we have a valid file name */
|
||||
if (true == fname.empty()) {
|
||||
VTR_LOG_ERROR("Received empty file name to report bitstream!\n\tPlease specify a valid file name.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string timer_message = std::string("Report architecture bitstream distribution into XML file '") + fname + std::string("'");
|
||||
vtr::ScopedStartFinishTimer timer(timer_message);
|
||||
|
||||
/* Create the file stream */
|
||||
std::fstream fp;
|
||||
fp.open(fname, std::fstream::out | std::fstream::trunc);
|
||||
|
||||
check_file_stream(fname.c_str(), fp);
|
||||
|
||||
/* Put down a brief introduction */
|
||||
report_architecture_bitstream_distribution_xml_file_head(fp);
|
||||
|
||||
/* Find the top block, which has not parents */
|
||||
std::vector<ConfigBlockId> top_block = find_bitstream_manager_top_blocks(bitstream_manager);
|
||||
/* Make sure we have only 1 top block */
|
||||
VTR_ASSERT(1 == top_block.size());
|
||||
|
||||
/* Write bitstream, block by block, in a recursive way */
|
||||
rec_report_block_bitstream_distribution_to_xml_file(fp, bitstream_manager, top_block[0], max_hierarchy_level, 0);
|
||||
|
||||
/* Close file handler */
|
||||
fp.close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef REPORT_ARCH_BITSTREAM_DISTRIBUTION_H
|
||||
#define REPORT_ARCH_BITSTREAM_DISTRIBUTION_H
|
||||
|
||||
/********************************************************************
|
||||
* Include header files that are required by function declaration
|
||||
*******************************************************************/
|
||||
#include <string>
|
||||
#include "bitstream_manager.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
*******************************************************************/
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
int report_architecture_bitstream_distribution(const BitstreamManager& bitstream_manager,
|
||||
const std::string& fname,
|
||||
const size_t& max_hierarchy_level = 1);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
|
@ -10,17 +10,18 @@
|
|||
/* Headers from fabric key */
|
||||
#include "read_xml_arch_bitstream.h"
|
||||
#include "write_xml_arch_bitstream.h"
|
||||
#include "report_arch_bitstream_distribution.h"
|
||||
|
||||
int main(int argc, const char** argv) {
|
||||
/* Ensure we have only one or two argument */
|
||||
VTR_ASSERT((2 == argc) || (3 == argc));
|
||||
/* Ensure we have only one or two or 3 argument */
|
||||
VTR_ASSERT((2 == argc) || (3 == argc) || (4 == argc));
|
||||
|
||||
/* Parse the bitstream from an XML file */
|
||||
openfpga::BitstreamManager test_bitstream = openfpga::read_xml_architecture_bitstream(argv[1]);
|
||||
VTR_LOG("Read the bitstream from an XML file: %s.\n",
|
||||
argv[1]);
|
||||
|
||||
/* Output the circuit library to an XML file
|
||||
/* Output the bitstream database to an XML file
|
||||
* This is optional only used when there is a second argument
|
||||
*/
|
||||
if (3 <= argc) {
|
||||
|
@ -28,6 +29,15 @@ int main(int argc, const char** argv) {
|
|||
VTR_LOG("Echo the bitstream to an XML file: %s.\n",
|
||||
argv[2]);
|
||||
}
|
||||
/* Output the bitstream distribution to an XML file
|
||||
* This is optional only used when there is a third argument
|
||||
*/
|
||||
if (4 <= argc) {
|
||||
openfpga::report_architecture_bitstream_distribution(test_bitstream, argv[3]);
|
||||
VTR_LOG("Echo the bitstream distribution to an XML file: %s.\n",
|
||||
argv[3]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ constexpr char* DEFAULT_LB_DIR_NAME = "lb/";
|
|||
constexpr char* DEFAULT_RR_DIR_NAME = "routing/";
|
||||
constexpr char* DEFAULT_SUBMODULE_DIR_NAME = "sub_module/";
|
||||
|
||||
constexpr char* VPR_BENCHMARK_OUT_PORT_PREFIX = "out:";
|
||||
constexpr char* OPENFPGA_BENCHMARK_OUT_PORT_PREFIX = "out_";
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
|
||||
/* Headers from openfpgautil library */
|
||||
#include "openfpga_digest.h"
|
||||
#include "openfpga_reserved_words.h"
|
||||
|
||||
/* Headers from fpgabitstream library */
|
||||
#include "read_xml_arch_bitstream.h"
|
||||
#include "write_xml_arch_bitstream.h"
|
||||
#include "report_arch_bitstream_distribution.h"
|
||||
|
||||
#include "openfpga_naming.h"
|
||||
|
||||
|
@ -90,6 +92,7 @@ int write_fabric_bitstream(const OpenfpgaContext& openfpga_ctx,
|
|||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
CommandOptionId opt_file = cmd.option("file");
|
||||
CommandOptionId opt_file_format = cmd.option("format");
|
||||
CommandOptionId opt_fast_config = cmd.option("fast_configuration");
|
||||
|
||||
/* Write fabric bitstream if required */
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
@ -118,7 +121,9 @@ int write_fabric_bitstream(const OpenfpgaContext& openfpga_ctx,
|
|||
status = write_fabric_bitstream_to_text_file(openfpga_ctx.bitstream_manager(),
|
||||
openfpga_ctx.fabric_bitstream(),
|
||||
openfpga_ctx.arch().config_protocol,
|
||||
openfpga_ctx.fabric_global_port_info(),
|
||||
cmd_context.option_value(cmd, opt_file),
|
||||
cmd_context.option_enable(cmd, opt_fast_config),
|
||||
cmd_context.option_enable(cmd, opt_verbose));
|
||||
}
|
||||
|
||||
|
@ -149,6 +154,11 @@ int write_io_mapping(const OpenfpgaContext& openfpga_ctx,
|
|||
ModuleId top_module = openfpga_ctx.module_graph().find_module(top_module_name);
|
||||
VTR_ASSERT(true == openfpga_ctx.module_graph().valid_module_id(top_module));
|
||||
|
||||
/* VPR added a prefix to the output ports, remove them here */
|
||||
std::vector<std::string> prefix_to_remove;
|
||||
prefix_to_remove.push_back(std::string(VPR_BENCHMARK_OUT_PORT_PREFIX));
|
||||
prefix_to_remove.push_back(std::string(OPENFPGA_BENCHMARK_OUT_PORT_PREFIX));
|
||||
|
||||
IoMap io_map = build_fpga_io_mapping_info(openfpga_ctx.module_graph(),
|
||||
top_module,
|
||||
g_vpr_ctx.atom(),
|
||||
|
@ -156,7 +166,8 @@ int write_io_mapping(const OpenfpgaContext& openfpga_ctx,
|
|||
openfpga_ctx.io_location_map(),
|
||||
openfpga_ctx.vpr_netlist_annotation(),
|
||||
std::string(),
|
||||
std::string());
|
||||
std::string(),
|
||||
prefix_to_remove);
|
||||
|
||||
status = write_io_mapping_to_xml_file(io_map,
|
||||
cmd_context.option_value(cmd, opt_file),
|
||||
|
@ -165,4 +176,41 @@ int write_io_mapping(const OpenfpgaContext& openfpga_ctx,
|
|||
return status;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A wrapper function to call the report_arch_bitstream_distribution() in FPGA bitstream
|
||||
*******************************************************************/
|
||||
int report_bitstream_distribution(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
|
||||
CommandOptionId opt_file = cmd.option("file");
|
||||
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
||||
VTR_ASSERT(true == cmd_context.option_enable(cmd, opt_file));
|
||||
|
||||
std::string src_dir_path = find_path_dir_name(cmd_context.option_value(cmd, opt_file));
|
||||
|
||||
/* Create directories */
|
||||
create_directory(src_dir_path);
|
||||
|
||||
/* Default depth requirement, this is to limit the report size by default */
|
||||
int depth = 1;
|
||||
CommandOptionId opt_depth = cmd.option("depth");
|
||||
if (true == cmd_context.option_enable(cmd, opt_depth)) {
|
||||
depth = std::atoi(cmd_context.option_value(cmd, opt_depth).c_str());
|
||||
/* Error out if we have negative depth */
|
||||
if (0 > depth) {
|
||||
VTR_LOG_ERROR("Invalid depth '%d' which should be 0 or a positive number!\n",
|
||||
depth);
|
||||
return CMD_EXEC_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
status = report_architecture_bitstream_distribution(openfpga_ctx.bitstream_manager(),
|
||||
cmd_context.option_value(cmd, opt_file),
|
||||
depth);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -27,6 +27,9 @@ int write_fabric_bitstream(const OpenfpgaContext& openfpga_ctx,
|
|||
int write_io_mapping(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
int report_bitstream_distribution(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -72,6 +72,40 @@ ShellCommandId add_openfpga_build_arch_bitstream_command(openfpga::Shell<Openfpg
|
|||
return shell_cmd_id;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* - Add a command to Shell environment: report_bitstream_distribution
|
||||
* - Add associated options
|
||||
* - Add command dependency
|
||||
*******************************************************************/
|
||||
static
|
||||
ShellCommandId add_openfpga_report_bitstream_distribution_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("report_bitstream_distribution");
|
||||
|
||||
/* Add an option '--file' */
|
||||
CommandOptionId opt_file = shell_cmd.add_option("file", true, "file path to output the bitstream distribution");
|
||||
shell_cmd.set_option_short_name(opt_file, "f");
|
||||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--depth' */
|
||||
CommandOptionId opt_depth = shell_cmd.add_option("depth", false, "Specify the max. depth of blocks which will appear in report");
|
||||
shell_cmd.set_option_require_value(opt_depth, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command 'report_bitstream_distribution' to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "Report bitstream distribution");
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, report_bitstream_distribution);
|
||||
|
||||
/* Add command dependency to the Shell */
|
||||
shell.set_command_dependency(shell_cmd_id, dependent_cmds);
|
||||
|
||||
return shell_cmd_id;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* - Add a command to Shell environment: build_fabric_bitstream
|
||||
* - Add associated options
|
||||
|
@ -117,6 +151,9 @@ ShellCommandId add_openfpga_write_fabric_bitstream_command(openfpga::Shell<Openf
|
|||
CommandOptionId opt_file_format = shell_cmd.add_option("format", false, "file format of fabric bitstream [plain_text|xml]. Default: plain_text");
|
||||
shell_cmd.set_option_require_value(opt_file_format, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--fast_configuration' */
|
||||
shell_cmd.add_option("fast_configuration", false, "Reduce the size of bitstream to be downloaded");
|
||||
|
||||
/* Add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
|
@ -187,6 +224,14 @@ void add_openfpga_bitstream_commands(openfpga::Shell<OpenfpgaContext>& shell) {
|
|||
cmd_dependency_build_arch_bitstream.push_back(shell_cmd_repack_id);
|
||||
ShellCommandId shell_cmd_build_arch_bitstream_id = add_openfpga_build_arch_bitstream_command(shell, openfpga_bitstream_cmd_class, cmd_dependency_build_arch_bitstream);
|
||||
|
||||
/********************************
|
||||
* Command 'report_bitstream_distribution'
|
||||
*/
|
||||
/* The 'report_bitstream_distribution' command should NOT be executed before 'build_architecture_bitstream' */
|
||||
std::vector<ShellCommandId> cmd_dependency_report_bitstream_distribution;
|
||||
cmd_dependency_build_arch_bitstream.push_back(shell_cmd_build_arch_bitstream_id);
|
||||
add_openfpga_report_bitstream_distribution_command(shell, openfpga_bitstream_cmd_class, cmd_dependency_report_bitstream_distribution);
|
||||
|
||||
/********************************
|
||||
* Command 'build_fabric_bitstream'
|
||||
*/
|
||||
|
|
|
@ -62,23 +62,20 @@ int write_fabric_verilog(OpenfpgaContext& openfpga_ctx,
|
|||
}
|
||||
|
||||
/********************************************************************
|
||||
* A wrapper function to call the Verilog testbench generator of FPGA-Verilog
|
||||
* A wrapper function to call the full testbench generator of FPGA-Verilog
|
||||
*******************************************************************/
|
||||
int write_verilog_testbench(OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
int write_full_testbench(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
|
||||
CommandOptionId opt_output_dir = cmd.option("file");
|
||||
CommandOptionId opt_bitstream = cmd.option("bitstream");
|
||||
CommandOptionId opt_fabric_netlist = cmd.option("fabric_netlist_file_path");
|
||||
CommandOptionId opt_pcf = cmd.option("pin_constraints_file");
|
||||
CommandOptionId opt_reference_benchmark = cmd.option("reference_benchmark_file_path");
|
||||
CommandOptionId opt_print_top_testbench = cmd.option("print_top_testbench");
|
||||
CommandOptionId opt_fast_configuration = cmd.option("fast_configuration");
|
||||
CommandOptionId opt_print_formal_verification_top_netlist = cmd.option("print_formal_verification_top_netlist");
|
||||
CommandOptionId opt_print_preconfig_top_testbench = cmd.option("print_preconfig_top_testbench");
|
||||
CommandOptionId opt_print_simulation_ini = cmd.option("print_simulation_ini");
|
||||
CommandOptionId opt_explicit_port_mapping = cmd.option("explicit_port_mapping");
|
||||
CommandOptionId opt_default_net_type = cmd.option("default_net_type");
|
||||
CommandOptionId opt_include_signal_init = cmd.option("include_signal_init");
|
||||
CommandOptionId opt_support_icarus_simulator = cmd.option("support_icarus_simulator");
|
||||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
|
||||
/* This is an intermediate data structure which is designed to modularize the FPGA-Verilog
|
||||
|
@ -88,15 +85,14 @@ int write_verilog_testbench(OpenfpgaContext& openfpga_ctx,
|
|||
options.set_output_directory(cmd_context.option_value(cmd, opt_output_dir));
|
||||
options.set_fabric_netlist_file_path(cmd_context.option_value(cmd, opt_fabric_netlist));
|
||||
options.set_reference_benchmark_file_path(cmd_context.option_value(cmd, opt_reference_benchmark));
|
||||
options.set_print_formal_verification_top_netlist(cmd_context.option_enable(cmd, opt_print_formal_verification_top_netlist));
|
||||
options.set_print_preconfig_top_testbench(cmd_context.option_enable(cmd, opt_print_preconfig_top_testbench));
|
||||
options.set_fast_configuration(cmd_context.option_enable(cmd, opt_fast_configuration));
|
||||
options.set_print_top_testbench(cmd_context.option_enable(cmd, opt_print_top_testbench));
|
||||
options.set_print_simulation_ini(cmd_context.option_value(cmd, opt_print_simulation_ini));
|
||||
options.set_explicit_port_mapping(cmd_context.option_enable(cmd, opt_explicit_port_mapping));
|
||||
options.set_include_signal_init(cmd_context.option_enable(cmd, opt_include_signal_init));
|
||||
options.set_support_icarus_simulator(cmd_context.option_enable(cmd, opt_support_icarus_simulator));
|
||||
options.set_verbose_output(cmd_context.option_enable(cmd, opt_verbose));
|
||||
options.set_print_top_testbench(true);
|
||||
options.set_include_signal_init(cmd_context.option_enable(cmd, opt_include_signal_init));
|
||||
if (true == cmd_context.option_enable(cmd, opt_default_net_type)) {
|
||||
options.set_default_net_type(cmd_context.option_value(cmd, opt_default_net_type));
|
||||
}
|
||||
|
||||
/* If pin constraints are enabled by command options, read the file */
|
||||
PinConstraints pin_constraints;
|
||||
|
@ -104,19 +100,142 @@ int write_verilog_testbench(OpenfpgaContext& openfpga_ctx,
|
|||
pin_constraints = read_xml_pin_constraints(cmd_context.option_value(cmd, opt_pcf).c_str());
|
||||
}
|
||||
|
||||
return fpga_verilog_testbench(openfpga_ctx.module_graph(),
|
||||
openfpga_ctx.bitstream_manager(),
|
||||
openfpga_ctx.fabric_bitstream(),
|
||||
g_vpr_ctx.atom(),
|
||||
g_vpr_ctx.placement(),
|
||||
pin_constraints,
|
||||
openfpga_ctx.io_location_map(),
|
||||
openfpga_ctx.fabric_global_port_info(),
|
||||
openfpga_ctx.vpr_netlist_annotation(),
|
||||
openfpga_ctx.arch().circuit_lib,
|
||||
openfpga_ctx.simulation_setting(),
|
||||
openfpga_ctx.arch().config_protocol,
|
||||
options);
|
||||
return fpga_verilog_full_testbench(openfpga_ctx.module_graph(),
|
||||
openfpga_ctx.bitstream_manager(),
|
||||
openfpga_ctx.fabric_bitstream(),
|
||||
g_vpr_ctx.atom(),
|
||||
g_vpr_ctx.placement(),
|
||||
pin_constraints,
|
||||
cmd_context.option_value(cmd, opt_bitstream),
|
||||
openfpga_ctx.io_location_map(),
|
||||
openfpga_ctx.fabric_global_port_info(),
|
||||
openfpga_ctx.vpr_netlist_annotation(),
|
||||
openfpga_ctx.arch().circuit_lib,
|
||||
openfpga_ctx.simulation_setting(),
|
||||
openfpga_ctx.arch().config_protocol,
|
||||
options);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A wrapper function to call the preconfigured wrapper generator of FPGA-Verilog
|
||||
*******************************************************************/
|
||||
int write_preconfigured_fabric_wrapper(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
|
||||
CommandOptionId opt_output_dir = cmd.option("file");
|
||||
CommandOptionId opt_fabric_netlist = cmd.option("fabric_netlist_file_path");
|
||||
CommandOptionId opt_pcf = cmd.option("pin_constraints_file");
|
||||
CommandOptionId opt_explicit_port_mapping = cmd.option("explicit_port_mapping");
|
||||
CommandOptionId opt_default_net_type = cmd.option("default_net_type");
|
||||
CommandOptionId opt_support_icarus_simulator = cmd.option("support_icarus_simulator");
|
||||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
|
||||
/* This is an intermediate data structure which is designed to modularize the FPGA-Verilog
|
||||
* Keep it independent from any other outside data structures
|
||||
*/
|
||||
VerilogTestbenchOption options;
|
||||
options.set_output_directory(cmd_context.option_value(cmd, opt_output_dir));
|
||||
options.set_fabric_netlist_file_path(cmd_context.option_value(cmd, opt_fabric_netlist));
|
||||
options.set_explicit_port_mapping(cmd_context.option_enable(cmd, opt_explicit_port_mapping));
|
||||
options.set_verbose_output(cmd_context.option_enable(cmd, opt_verbose));
|
||||
options.set_support_icarus_simulator(cmd_context.option_enable(cmd, opt_support_icarus_simulator));
|
||||
options.set_print_formal_verification_top_netlist(true);
|
||||
if (true == cmd_context.option_enable(cmd, opt_default_net_type)) {
|
||||
options.set_default_net_type(cmd_context.option_value(cmd, opt_default_net_type));
|
||||
}
|
||||
|
||||
/* If pin constraints are enabled by command options, read the file */
|
||||
PinConstraints pin_constraints;
|
||||
if (true == cmd_context.option_enable(cmd, opt_pcf)) {
|
||||
pin_constraints = read_xml_pin_constraints(cmd_context.option_value(cmd, opt_pcf).c_str());
|
||||
}
|
||||
|
||||
return fpga_verilog_preconfigured_fabric_wrapper(openfpga_ctx.module_graph(),
|
||||
openfpga_ctx.bitstream_manager(),
|
||||
g_vpr_ctx.atom(),
|
||||
g_vpr_ctx.placement(),
|
||||
pin_constraints,
|
||||
openfpga_ctx.io_location_map(),
|
||||
openfpga_ctx.fabric_global_port_info(),
|
||||
openfpga_ctx.vpr_netlist_annotation(),
|
||||
openfpga_ctx.arch().circuit_lib,
|
||||
openfpga_ctx.arch().config_protocol,
|
||||
options);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A wrapper function to call the preconfigured testbench generator of FPGA-Verilog
|
||||
*******************************************************************/
|
||||
int write_preconfigured_testbench(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
|
||||
CommandOptionId opt_output_dir = cmd.option("file");
|
||||
CommandOptionId opt_pcf = cmd.option("pin_constraints_file");
|
||||
CommandOptionId opt_fabric_netlist = cmd.option("fabric_netlist_file_path");
|
||||
CommandOptionId opt_reference_benchmark = cmd.option("reference_benchmark_file_path");
|
||||
CommandOptionId opt_support_icarus_simulator = cmd.option("support_icarus_simulator");
|
||||
CommandOptionId opt_explicit_port_mapping = cmd.option("explicit_port_mapping");
|
||||
CommandOptionId opt_default_net_type = cmd.option("default_net_type");
|
||||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
|
||||
/* This is an intermediate data structure which is designed to modularize the FPGA-Verilog
|
||||
* Keep it independent from any other outside data structures
|
||||
*/
|
||||
VerilogTestbenchOption options;
|
||||
options.set_output_directory(cmd_context.option_value(cmd, opt_output_dir));
|
||||
options.set_fabric_netlist_file_path(cmd_context.option_value(cmd, opt_fabric_netlist));
|
||||
options.set_reference_benchmark_file_path(cmd_context.option_value(cmd, opt_reference_benchmark));
|
||||
options.set_support_icarus_simulator(cmd_context.option_enable(cmd, opt_support_icarus_simulator));
|
||||
options.set_explicit_port_mapping(cmd_context.option_enable(cmd, opt_explicit_port_mapping));
|
||||
options.set_verbose_output(cmd_context.option_enable(cmd, opt_verbose));
|
||||
options.set_print_preconfig_top_testbench(true);
|
||||
if (true == cmd_context.option_enable(cmd, opt_default_net_type)) {
|
||||
options.set_default_net_type(cmd_context.option_value(cmd, opt_default_net_type));
|
||||
}
|
||||
|
||||
/* If pin constraints are enabled by command options, read the file */
|
||||
PinConstraints pin_constraints;
|
||||
if (true == cmd_context.option_enable(cmd, opt_pcf)) {
|
||||
pin_constraints = read_xml_pin_constraints(cmd_context.option_value(cmd, opt_pcf).c_str());
|
||||
}
|
||||
|
||||
return fpga_verilog_preconfigured_testbench(openfpga_ctx.module_graph(),
|
||||
g_vpr_ctx.atom(),
|
||||
pin_constraints,
|
||||
openfpga_ctx.fabric_global_port_info(),
|
||||
openfpga_ctx.vpr_netlist_annotation(),
|
||||
openfpga_ctx.simulation_setting(),
|
||||
options);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A wrapper function to call the simulation task information generator of FPGA-Verilog
|
||||
*******************************************************************/
|
||||
int write_simulation_task_info(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context) {
|
||||
|
||||
CommandOptionId opt_file = cmd.option("file");
|
||||
CommandOptionId opt_hdl_dir = cmd.option("hdl_dir");
|
||||
CommandOptionId opt_reference_benchmark = cmd.option("reference_benchmark_file_path");
|
||||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
|
||||
/* This is an intermediate data structure which is designed to modularize the FPGA-Verilog
|
||||
* Keep it independent from any other outside data structures
|
||||
*/
|
||||
VerilogTestbenchOption options;
|
||||
options.set_output_directory(cmd_context.option_value(cmd, opt_hdl_dir));
|
||||
options.set_reference_benchmark_file_path(cmd_context.option_value(cmd, opt_reference_benchmark));
|
||||
options.set_verbose_output(cmd_context.option_enable(cmd, opt_verbose));
|
||||
options.set_print_simulation_ini(cmd_context.option_value(cmd, opt_file));
|
||||
|
||||
return fpga_verilog_simulation_task_info(openfpga_ctx.module_graph(),
|
||||
openfpga_ctx.bitstream_manager(),
|
||||
g_vpr_ctx.atom(),
|
||||
g_vpr_ctx.placement(),
|
||||
openfpga_ctx.io_location_map(),
|
||||
openfpga_ctx.simulation_setting(),
|
||||
openfpga_ctx.arch().config_protocol,
|
||||
options);
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -18,8 +18,17 @@ namespace openfpga {
|
|||
int write_fabric_verilog(OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
int write_verilog_testbench(OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
int write_full_testbench(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
int write_preconfigured_fabric_wrapper(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
int write_preconfigured_testbench(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
int write_simulation_task_info(const OpenfpgaContext& openfpga_ctx,
|
||||
const Command& cmd, const CommandContext& cmd_context);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -55,23 +55,132 @@ ShellCommandId add_openfpga_write_fabric_verilog_command(openfpga::Shell<Openfpg
|
|||
}
|
||||
|
||||
/********************************************************************
|
||||
* - Add a command to Shell environment: write Verilog testbench
|
||||
* - add a command to shell environment: write full testbench
|
||||
* - add associated options
|
||||
* - add command dependency
|
||||
*******************************************************************/
|
||||
static
|
||||
ShellCommandId add_openfpga_write_full_testbench_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("write_full_testbench");
|
||||
|
||||
/* add an option '--file' in short '-f'*/
|
||||
CommandOptionId output_opt = shell_cmd.add_option("file", true, "specify the output directory for hdl netlists");
|
||||
shell_cmd.set_option_short_name(output_opt, "f");
|
||||
shell_cmd.set_option_require_value(output_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--bitstream'*/
|
||||
CommandOptionId bitstream_opt = shell_cmd.add_option("bitstream", true, "specify the bitstream to be loaded in the testbench");
|
||||
shell_cmd.set_option_require_value(bitstream_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--fabric_netlist_file_path'*/
|
||||
CommandOptionId fabric_netlist_opt = shell_cmd.add_option("fabric_netlist_file_path", false, "specify the file path to the fabric hdl netlist");
|
||||
shell_cmd.set_option_require_value(fabric_netlist_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--pin_constraints_file in short '-pcf' */
|
||||
CommandOptionId pcf_opt = shell_cmd.add_option("pin_constraints_file", false, "specify the file path to the pin constraints");
|
||||
shell_cmd.set_option_short_name(pcf_opt, "pcf");
|
||||
shell_cmd.set_option_require_value(pcf_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--reference_benchmark_file_path'*/
|
||||
CommandOptionId ref_bm_opt = shell_cmd.add_option("reference_benchmark_file_path", true, "specify the file path to the reference verilog netlist");
|
||||
shell_cmd.set_option_require_value(ref_bm_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--fast_configuration' */
|
||||
shell_cmd.add_option("fast_configuration", false, "reduce the period of configuration by skip certain data points");
|
||||
|
||||
/* add an option '--explicit_port_mapping' */
|
||||
shell_cmd.add_option("explicit_port_mapping", false, "use explicit port mapping in verilog netlists");
|
||||
|
||||
/* Add an option '--default_net_type' */
|
||||
CommandOptionId default_net_type_opt = shell_cmd.add_option("default_net_type", false, "Set the default net type for Verilog netlists. Default value is 'none'");
|
||||
shell_cmd.set_option_require_value(default_net_type_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--include_signal_init' */
|
||||
shell_cmd.add_option("include_signal_init", false, "initialize all the signals in verilog testbenches");
|
||||
|
||||
/* add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "enable verbose output");
|
||||
|
||||
/* add command to the shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate full testbenches for an fpga fabric");
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, write_full_testbench);
|
||||
|
||||
/* add command dependency to the shell */
|
||||
shell.set_command_dependency(shell_cmd_id, dependent_cmds);
|
||||
|
||||
return shell_cmd_id;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* - add a command to shell environment: write preconfigured fabric wrapper
|
||||
* - add associated options
|
||||
* - add command dependency
|
||||
*******************************************************************/
|
||||
static
|
||||
ShellCommandId add_openfpga_write_preconfigured_fabric_wrapper_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("write_preconfigured_fabric_wrapper");
|
||||
|
||||
/* add an option '--file' in short '-f'*/
|
||||
CommandOptionId output_opt = shell_cmd.add_option("file", true, "specify the output directory for hdl netlists");
|
||||
shell_cmd.set_option_short_name(output_opt, "f");
|
||||
shell_cmd.set_option_require_value(output_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--fabric_netlist_file_path'*/
|
||||
CommandOptionId fabric_netlist_opt = shell_cmd.add_option("fabric_netlist_file_path", false, "specify the file path to the fabric hdl netlist");
|
||||
shell_cmd.set_option_require_value(fabric_netlist_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--pin_constraints_file in short '-pcf' */
|
||||
CommandOptionId pcf_opt = shell_cmd.add_option("pin_constraints_file", false, "specify the file path to the pin constraints");
|
||||
shell_cmd.set_option_short_name(pcf_opt, "pcf");
|
||||
shell_cmd.set_option_require_value(pcf_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* add an option '--explicit_port_mapping' */
|
||||
shell_cmd.add_option("explicit_port_mapping", false, "use explicit port mapping in verilog netlists");
|
||||
|
||||
/* Add an option '--default_net_type' */
|
||||
CommandOptionId default_net_type_opt = shell_cmd.add_option("default_net_type", false, "Set the default net type for Verilog netlists. Default value is 'none'");
|
||||
shell_cmd.set_option_require_value(default_net_type_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--support_icarus_simulator' */
|
||||
shell_cmd.add_option("support_icarus_simulator", false, "Fine-tune Verilog testbenches to support icarus simulator");
|
||||
|
||||
/* add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "enable verbose output");
|
||||
|
||||
/* add command to the shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate a wrapper for a pre-configured fpga fabric");
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, write_preconfigured_fabric_wrapper);
|
||||
|
||||
/* add command dependency to the shell */
|
||||
shell.set_command_dependency(shell_cmd_id, dependent_cmds);
|
||||
|
||||
return shell_cmd_id;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* - Add a command to Shell environment: write preconfigured testbench
|
||||
* - Add associated options
|
||||
* - Add command dependency
|
||||
*******************************************************************/
|
||||
static
|
||||
ShellCommandId add_openfpga_write_verilog_testbench_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("write_verilog_testbench");
|
||||
ShellCommandId add_openfpga_write_preconfigured_testbench_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("write_preconfigured_testbench");
|
||||
|
||||
/* Add an option '--file' in short '-f'*/
|
||||
CommandOptionId output_opt = shell_cmd.add_option("file", true, "Specify the output directory for Verilog netlists");
|
||||
CommandOptionId output_opt = shell_cmd.add_option("file", true, "Specify the output directory for HDL netlists");
|
||||
shell_cmd.set_option_short_name(output_opt, "f");
|
||||
shell_cmd.set_option_require_value(output_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--fabric_netlist_file_path'*/
|
||||
CommandOptionId fabric_netlist_opt = shell_cmd.add_option("fabric_netlist_file_path", false, "Specify the file path to the fabric Verilog netlist");
|
||||
/* add an option '--fabric_netlist_file_path'*/
|
||||
CommandOptionId fabric_netlist_opt = shell_cmd.add_option("fabric_netlist_file_path", false, "specify the file path to the fabric hdl netlist");
|
||||
shell_cmd.set_option_require_value(fabric_netlist_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--pin_constraints_file in short '-pcf' */
|
||||
|
@ -83,38 +192,61 @@ ShellCommandId add_openfpga_write_verilog_testbench_command(openfpga::Shell<Open
|
|||
CommandOptionId ref_bm_opt = shell_cmd.add_option("reference_benchmark_file_path", true, "Specify the file path to the reference Verilog netlist");
|
||||
shell_cmd.set_option_require_value(ref_bm_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--print_top_testbench' */
|
||||
shell_cmd.add_option("print_top_testbench", false, "Generate a full testbench for top-level fabric module with autocheck capability");
|
||||
|
||||
/* Add an option '--fast_configuration' */
|
||||
shell_cmd.add_option("fast_configuration", false, "Reduce the period of configuration by skip zero data points");
|
||||
|
||||
/* Add an option '--print_formal_verification_top_netlist' */
|
||||
shell_cmd.add_option("print_formal_verification_top_netlist", false, "Generate a top-level module which can be used in formal verification");
|
||||
|
||||
/* Add an option '--print_preconfig_top_testbench' */
|
||||
shell_cmd.add_option("print_preconfig_top_testbench", false, "Generate a pre-configured testbench for top-level fabric module with autocheck capability");
|
||||
|
||||
/* Add an option '--print_simulation_ini' */
|
||||
CommandOptionId sim_ini_opt = shell_cmd.add_option("print_simulation_ini", false, "Generate a .ini file as an exchangeable file to enable HDL simulations");
|
||||
shell_cmd.set_option_require_value(sim_ini_opt, openfpga::OPT_STRING);
|
||||
/* Add an option '--support_icarus_simulator' */
|
||||
shell_cmd.add_option("support_icarus_simulator", false, "Fine-tune Verilog testbenches to support icarus simulator");
|
||||
|
||||
/* Add an option '--explicit_port_mapping' */
|
||||
shell_cmd.add_option("explicit_port_mapping", false, "Use explicit port mapping in Verilog netlists");
|
||||
|
||||
/* Add an option '--include_signal_init' */
|
||||
shell_cmd.add_option("include_signal_init", false, "Initialize all the signals in Verilog testbenches");
|
||||
|
||||
/* Add an option '--support_icarus_simulator' */
|
||||
shell_cmd.add_option("support_icarus_simulator", false, "Fine-tune Verilog testbenches to support icarus simulator");
|
||||
/* Add an option '--default_net_type' */
|
||||
CommandOptionId default_net_type_opt = shell_cmd.add_option("default_net_type", false, "Set the default net type for Verilog netlists. Default value is 'none'");
|
||||
shell_cmd.set_option_require_value(default_net_type_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate Verilog testbenches for full FPGA fabric");
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate testbenches for a preconfigured FPGA fabric");
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, write_verilog_testbench);
|
||||
shell.set_command_execute_function(shell_cmd_id, write_preconfigured_testbench);
|
||||
|
||||
/* Add command dependency to the Shell */
|
||||
shell.set_command_dependency(shell_cmd_id, dependent_cmds);
|
||||
|
||||
return shell_cmd_id;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* - Add a command to Shell environment: write simulation task info
|
||||
* - Add associated options
|
||||
* - Add command dependency
|
||||
*******************************************************************/
|
||||
static
|
||||
ShellCommandId add_openfpga_write_simulation_task_info_command(openfpga::Shell<OpenfpgaContext>& shell,
|
||||
const ShellCommandClassId& cmd_class_id,
|
||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||
Command shell_cmd("write_simulation_task_info");
|
||||
|
||||
/* Add an option '--file' in short '-f'*/
|
||||
CommandOptionId output_opt = shell_cmd.add_option("file", true, "Specify the file path to output simulation-related information");
|
||||
shell_cmd.set_option_short_name(output_opt, "f");
|
||||
shell_cmd.set_option_require_value(output_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--hdl_dir'*/
|
||||
CommandOptionId hdl_dir_opt = shell_cmd.add_option("hdl_dir", true, "Specify the directory path where HDL netlists are created");
|
||||
shell_cmd.set_option_require_value(hdl_dir_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--reference_benchmark_file_path'*/
|
||||
CommandOptionId ref_bm_opt = shell_cmd.add_option("reference_benchmark_file_path", true, "Specify the file path to the reference Verilog netlist");
|
||||
shell_cmd.set_option_require_value(ref_bm_opt, openfpga::OPT_STRING);
|
||||
|
||||
/* Add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "Enable verbose output");
|
||||
|
||||
/* Add command to the Shell */
|
||||
ShellCommandId shell_cmd_id = shell.add_command(shell_cmd, "generate an interchangable simulation task configuration file");
|
||||
shell.set_command_class(shell_cmd_id, cmd_class_id);
|
||||
shell.set_command_execute_function(shell_cmd_id, write_simulation_task_info);
|
||||
|
||||
/* Add command dependency to the Shell */
|
||||
shell.set_command_dependency(shell_cmd_id, dependent_cmds);
|
||||
|
@ -140,14 +272,44 @@ void add_openfpga_verilog_commands(openfpga::Shell<OpenfpgaContext>& shell) {
|
|||
fabric_verilog_dependent_cmds);
|
||||
|
||||
/********************************
|
||||
* Command 'write_verilog_testbench'
|
||||
* Command 'write_full_testbench'
|
||||
*/
|
||||
/* The command 'write_verilog_testbench' should NOT be executed before 'build_fabric' */
|
||||
std::vector<ShellCommandId> verilog_testbench_dependent_cmds;
|
||||
verilog_testbench_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_openfpga_write_verilog_testbench_command(shell,
|
||||
openfpga_verilog_cmd_class,
|
||||
verilog_testbench_dependent_cmds);
|
||||
/* The command 'write_full_testbench' should NOT be executed before 'build_fabric' */
|
||||
std::vector<ShellCommandId> full_testbench_dependent_cmds;
|
||||
full_testbench_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_openfpga_write_full_testbench_command(shell,
|
||||
openfpga_verilog_cmd_class,
|
||||
full_testbench_dependent_cmds);
|
||||
|
||||
/********************************
|
||||
* Command 'write_preconfigured_fabric_wrapper'
|
||||
*/
|
||||
/* The command 'write_preconfigured_fabric_wrapper' should NOT be executed before 'build_fabric' */
|
||||
std::vector<ShellCommandId> preconfig_wrapper_dependent_cmds;
|
||||
preconfig_wrapper_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_openfpga_write_preconfigured_fabric_wrapper_command(shell,
|
||||
openfpga_verilog_cmd_class,
|
||||
preconfig_wrapper_dependent_cmds);
|
||||
|
||||
/********************************
|
||||
* Command 'write_preconfigured_testbench'
|
||||
*/
|
||||
/* The command 'write_preconfigured_testbench' should NOT be executed before 'build_fabric' */
|
||||
std::vector<ShellCommandId> preconfig_testbench_dependent_cmds;
|
||||
preconfig_testbench_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_openfpga_write_preconfigured_testbench_command(shell,
|
||||
openfpga_verilog_cmd_class,
|
||||
preconfig_testbench_dependent_cmds);
|
||||
|
||||
/********************************
|
||||
* Command 'write_simulation_task_info'
|
||||
*/
|
||||
/* The command 'write_simulation_task_info' should NOT be executed before 'build_fabric' */
|
||||
std::vector<ShellCommandId> sim_task_info_dependent_cmds;
|
||||
sim_task_info_dependent_cmds.push_back(build_fabric_cmd_id);
|
||||
add_openfpga_write_simulation_task_info_command(shell,
|
||||
openfpga_verilog_cmd_class,
|
||||
sim_task_info_dependent_cmds);
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -747,6 +747,7 @@ int build_top_module_global_net_for_given_grid_module(ModuleManager& module_mana
|
|||
/* Find the port of the grid module according to the tile annotation */
|
||||
int grid_pin_start_index = physical_tile->num_pins;
|
||||
t_physical_tile_port physical_tile_port;
|
||||
physical_tile_port.num_pins = 0;
|
||||
for (const t_physical_tile_port& tile_port : physical_tile->ports) {
|
||||
if (std::string(tile_port.name) == tile_port_to_connect.get_name()) {
|
||||
BasicPort ref_tile_port(tile_port.name, tile_port.num_pins);
|
||||
|
|
|
@ -37,7 +37,8 @@ IoMap build_fpga_io_mapping_info(const ModuleManager& module_manager,
|
|||
const IoLocationMap& io_location_map,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const std::string& io_input_port_name_postfix,
|
||||
const std::string& io_output_port_name_postfix) {
|
||||
const std::string& io_output_port_name_postfix,
|
||||
const std::vector<std::string>& output_port_prefix_to_remove) {
|
||||
IoMap io_map;
|
||||
|
||||
/* Only mappable i/o ports can be considered */
|
||||
|
@ -129,7 +130,18 @@ IoMap build_fpga_io_mapping_info(const ModuleManager& module_manager,
|
|||
benchmark_io_port.set_width(1);
|
||||
} else {
|
||||
VTR_ASSERT(AtomBlockType::OUTPAD == atom_ctx.nlist.block_type(atom_blk));
|
||||
benchmark_io_port.set_name(std::string(block_name + io_output_port_name_postfix));
|
||||
/* VPR may have added a prefix to the output ports, remove them here */
|
||||
std::string output_block_name = block_name;
|
||||
for (const std::string& prefix_to_remove : output_port_prefix_to_remove) {
|
||||
if (!prefix_to_remove.empty()) {
|
||||
if (0 == output_block_name.find(prefix_to_remove)) {
|
||||
output_block_name.erase(0, prefix_to_remove.length());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
benchmark_io_port.set_name(std::string(output_block_name + io_output_port_name_postfix));
|
||||
benchmark_io_port.set_width(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ IoMap build_fpga_io_mapping_info(const ModuleManager& module_manager,
|
|||
const IoLocationMap& io_location_map,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const std::string& io_input_port_name_postfix,
|
||||
const std::string& io_output_port_name_postfix);
|
||||
const std::string& io_output_port_name_postfix,
|
||||
const std::vector<std::string>& output_port_prefix_to_remove);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
/********************************************************************
|
||||
* This file includes functions that are used to create
|
||||
* an auto-check top-level testbench for a FPGA fabric
|
||||
*******************************************************************/
|
||||
#include <vector>
|
||||
|
||||
/* Headers from vtrutil library */
|
||||
#include "vtr_log.h"
|
||||
#include "vtr_assert.h"
|
||||
|
||||
#include "fabric_global_port_info_utils.h"
|
||||
#include "fast_configuration.h"
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
/********************************************************************
|
||||
* Identify if fast configuration is applicable base on the availability
|
||||
* of programming reset and programming set ports of the FPGA fabric
|
||||
*******************************************************************/
|
||||
bool is_fast_configuration_applicable(const FabricGlobalPortInfo& global_ports) {
|
||||
/* Preparation: find all the reset/set ports for programming usage */
|
||||
std::vector<FabricGlobalPortId> global_prog_reset_ports = find_fabric_global_programming_reset_ports(global_ports);
|
||||
std::vector<FabricGlobalPortId> global_prog_set_ports = find_fabric_global_programming_set_ports(global_ports);
|
||||
|
||||
/* Identify if we can apply fast configuration */
|
||||
if (global_prog_set_ports.empty() && global_prog_reset_ports.empty()) {
|
||||
VTR_LOG_WARN("None of global reset and set ports are defined for programming purpose. Fast configuration is not applicable\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* Decide if we should use reset or set signal to acheive fast configuration
|
||||
* - If only one type signal is specified, we use that type
|
||||
* For example, only reset signal is defined, we will use reset
|
||||
* - If both are defined, pick the one that will bring bigger reduction
|
||||
* i.e., larger number of configuration bits can be skipped
|
||||
*******************************************************************/
|
||||
bool find_bit_value_to_skip_for_fast_configuration(const e_config_protocol_type& config_protocol_type,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
/* Preparation: find all the reset/set ports for programming usage */
|
||||
std::vector<FabricGlobalPortId> global_prog_reset_ports = find_fabric_global_programming_reset_ports(global_ports);
|
||||
std::vector<FabricGlobalPortId> global_prog_set_ports = find_fabric_global_programming_set_ports(global_ports);
|
||||
|
||||
/* Early exit conditions */
|
||||
if (!global_prog_reset_ports.empty() && global_prog_set_ports.empty()) {
|
||||
return false;
|
||||
} else if (!global_prog_set_ports.empty() && global_prog_reset_ports.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* If both types of ports are not defined, the fast configuration is not applicable */
|
||||
VTR_ASSERT(!global_prog_set_ports.empty() && !global_prog_reset_ports.empty());
|
||||
bool bit_value_to_skip = false;
|
||||
|
||||
VTR_LOG("Both reset and set ports are defined for programming controls, selecting the best-fit one...\n");
|
||||
|
||||
size_t num_ones_to_skip = 0;
|
||||
size_t num_zeros_to_skip = 0;
|
||||
|
||||
/* Branch on the type of configuration protocol */
|
||||
switch (config_protocol_type) {
|
||||
case CONFIG_MEM_STANDALONE:
|
||||
break;
|
||||
case CONFIG_MEM_SCAN_CHAIN: {
|
||||
/* We can only skip the ones/zeros at the beginning of the bitstream */
|
||||
/* Count how many logic '1' bits we can skip */
|
||||
for (const FabricBitId& bit_id : fabric_bitstream.bits()) {
|
||||
if (false == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id))) {
|
||||
break;
|
||||
}
|
||||
VTR_ASSERT(true == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id)));
|
||||
num_ones_to_skip++;
|
||||
}
|
||||
/* Count how many logic '0' bits we can skip */
|
||||
for (const FabricBitId& bit_id : fabric_bitstream.bits()) {
|
||||
if (true == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id))) {
|
||||
break;
|
||||
}
|
||||
VTR_ASSERT(false == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id)));
|
||||
num_zeros_to_skip++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONFIG_MEM_MEMORY_BANK:
|
||||
case CONFIG_MEM_FRAME_BASED: {
|
||||
/* Count how many logic '1' and logic '0' bits we can skip */
|
||||
for (const FabricBitId& bit_id : fabric_bitstream.bits()) {
|
||||
if (false == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id))) {
|
||||
num_zeros_to_skip++;
|
||||
} else {
|
||||
VTR_ASSERT(true == bitstream_manager.bit_value(fabric_bitstream.config_bit(bit_id)));
|
||||
num_ones_to_skip++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||
"Invalid configuration protocol type!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
VTR_LOG("Using reset will skip %g% (%lu/%lu) of configuration bitstream.\n",
|
||||
100. * (float) num_zeros_to_skip / (float) fabric_bitstream.num_bits(),
|
||||
num_zeros_to_skip, fabric_bitstream.num_bits());
|
||||
|
||||
VTR_LOG("Using set will skip %g% (%lu/%lu) of configuration bitstream.\n",
|
||||
100. * (float) num_ones_to_skip / (float) fabric_bitstream.num_bits(),
|
||||
num_ones_to_skip, fabric_bitstream.num_bits());
|
||||
|
||||
/* By default, we prefer to skip zeros (when the numbers are the same */
|
||||
if (num_ones_to_skip > num_zeros_to_skip) {
|
||||
VTR_LOG("Will use set signal in fast configuration\n");
|
||||
bit_value_to_skip = true;
|
||||
} else {
|
||||
VTR_LOG("Will use reset signal in fast configuration\n");
|
||||
}
|
||||
|
||||
return bit_value_to_skip;
|
||||
}
|
||||
|
||||
} /* end namespace openfpga */
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef FAST_CONFIGURATION_H
|
||||
#define FAST_CONFIGURATION_H
|
||||
|
||||
/********************************************************************
|
||||
* Include header files that are required by function declaration
|
||||
*******************************************************************/
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "fabric_global_port_info.h"
|
||||
#include "config_protocol.h"
|
||||
#include "bitstream_manager.h"
|
||||
#include "fabric_bitstream.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
*******************************************************************/
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
bool is_fast_configuration_applicable(const FabricGlobalPortInfo& global_ports);
|
||||
|
||||
bool find_bit_value_to_skip_for_fast_configuration(const e_config_protocol_type& config_protocol_type,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
#endif
|
|
@ -13,9 +13,11 @@
|
|||
|
||||
/* Headers from openfpgautil library */
|
||||
#include "openfpga_digest.h"
|
||||
#include "openfpga_version.h"
|
||||
|
||||
#include "openfpga_naming.h"
|
||||
|
||||
#include "fast_configuration.h"
|
||||
#include "bitstream_manager_utils.h"
|
||||
#include "fabric_bitstream_utils.h"
|
||||
#include "write_text_fabric_bitstream.h"
|
||||
|
@ -24,64 +26,20 @@
|
|||
namespace openfpga {
|
||||
|
||||
/********************************************************************
|
||||
* Write a configuration bit into a plain text file
|
||||
* The format depends on the type of configuration protocol
|
||||
* - Vanilla (standalone): just put down pure 0|1 bitstream
|
||||
* - Configuration chain: just put down pure 0|1 bitstream
|
||||
* - Memory bank : <BL address> <WL address> <bit>
|
||||
* - Frame-based configuration protocol : <address> <bit>
|
||||
*
|
||||
* Return:
|
||||
* - 0 if succeed
|
||||
* - 1 if critical errors occured
|
||||
* This function write header information to a bitstream file
|
||||
*******************************************************************/
|
||||
static
|
||||
int write_fabric_config_bit_to_text_file(std::fstream& fp,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const FabricBitId& fabric_bit,
|
||||
const e_config_protocol_type& config_type) {
|
||||
if (false == valid_file_stream(fp)) {
|
||||
return 1;
|
||||
}
|
||||
void write_fabric_bitstream_text_file_head(std::fstream& fp) {
|
||||
valid_file_stream(fp);
|
||||
|
||||
auto end = std::chrono::system_clock::now();
|
||||
std::time_t end_time = std::chrono::system_clock::to_time_t(end);
|
||||
|
||||
switch (config_type) {
|
||||
case CONFIG_MEM_STANDALONE:
|
||||
case CONFIG_MEM_SCAN_CHAIN:
|
||||
fp << bitstream_manager.bit_value(fabric_bitstream.config_bit(fabric_bit));
|
||||
break;
|
||||
case CONFIG_MEM_MEMORY_BANK: {
|
||||
for (const char& addr_bit : fabric_bitstream.bit_bl_address(fabric_bit)) {
|
||||
fp << addr_bit;
|
||||
}
|
||||
write_space_to_file(fp, 1);
|
||||
for (const char& addr_bit : fabric_bitstream.bit_wl_address(fabric_bit)) {
|
||||
fp << addr_bit;
|
||||
}
|
||||
write_space_to_file(fp, 1);
|
||||
fp << bitstream_manager.bit_value(fabric_bitstream.config_bit(fabric_bit));
|
||||
fp << "\n";
|
||||
break;
|
||||
}
|
||||
case CONFIG_MEM_FRAME_BASED: {
|
||||
for (const char& addr_bit : fabric_bitstream.bit_address(fabric_bit)) {
|
||||
fp << addr_bit;
|
||||
}
|
||||
write_space_to_file(fp, 1);
|
||||
fp << bitstream_manager.bit_value(fabric_bitstream.config_bit(fabric_bit));
|
||||
fp << "\n";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||
"Invalid configuration protocol type!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
fp << "// Fabric bitstream" << std::endl;
|
||||
fp << "// Version: " << openfpga::VERSION << std::endl;
|
||||
fp << "// Date: " << std::ctime(&end_time);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* Write the flatten fabric bitstream to a plain text file
|
||||
*
|
||||
|
@ -92,20 +50,20 @@ int write_fabric_config_bit_to_text_file(std::fstream& fp,
|
|||
static
|
||||
int write_flatten_fabric_bitstream_to_text_file(std::fstream& fp,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const ConfigProtocol& config_protocol) {
|
||||
int status = 0;
|
||||
for (const FabricBitId& fabric_bit : fabric_bitstream.bits()) {
|
||||
status = write_fabric_config_bit_to_text_file(fp, bitstream_manager,
|
||||
fabric_bitstream,
|
||||
fabric_bit,
|
||||
config_protocol.type());
|
||||
if (1 == status) {
|
||||
return status;
|
||||
}
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
if (false == valid_file_stream(fp)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return status;
|
||||
/* Output bitstream size information */
|
||||
fp << "// Bitstream length: " << fabric_bitstream.num_bits() << std::endl;
|
||||
|
||||
/* Output bitstream data */
|
||||
for (const FabricBitId& fabric_bit : fabric_bitstream.bits()) {
|
||||
fp << bitstream_manager.bit_value(fabric_bitstream.config_bit(fabric_bit));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
|
@ -118,6 +76,8 @@ int write_flatten_fabric_bitstream_to_text_file(std::fstream& fp,
|
|||
*******************************************************************/
|
||||
static
|
||||
int write_config_chain_fabric_bitstream_to_text_file(std::fstream& fp,
|
||||
const bool& fast_configuration,
|
||||
const bool& bit_value_to_skip,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
int status = 0;
|
||||
|
@ -125,11 +85,28 @@ int write_config_chain_fabric_bitstream_to_text_file(std::fstream& fp,
|
|||
size_t regional_bitstream_max_size = find_fabric_regional_bitstream_max_size(fabric_bitstream);
|
||||
ConfigChainFabricBitstream regional_bitstreams = build_config_chain_fabric_bitstream_by_region(bitstream_manager, fabric_bitstream);
|
||||
|
||||
for (size_t ibit = 0; ibit < regional_bitstream_max_size; ++ibit) {
|
||||
/* For fast configuration, the bitstream size counts from the first bit '1' */
|
||||
size_t num_bits_to_skip = 0;
|
||||
if (true == fast_configuration) {
|
||||
num_bits_to_skip = find_configuration_chain_fabric_bitstream_size_to_be_skipped(fabric_bitstream, bitstream_manager, bit_value_to_skip);
|
||||
VTR_ASSERT(num_bits_to_skip < regional_bitstream_max_size);
|
||||
VTR_LOG("Fast configuration will skip %g% (%lu/%lu) of configuration bitstream.\n",
|
||||
100. * (float) num_bits_to_skip / (float) regional_bitstream_max_size,
|
||||
num_bits_to_skip, regional_bitstream_max_size);
|
||||
}
|
||||
|
||||
/* Output bitstream size information */
|
||||
fp << "// Bitstream length: " << regional_bitstream_max_size - num_bits_to_skip << std::endl;
|
||||
fp << "// Bitstream width (LSB -> MSB): " << fabric_bitstream.num_regions() << std::endl;
|
||||
|
||||
/* Output bitstream data */
|
||||
for (size_t ibit = num_bits_to_skip; ibit < regional_bitstream_max_size; ++ibit) {
|
||||
for (const auto& region_bitstream : regional_bitstreams) {
|
||||
fp << region_bitstream[ibit];
|
||||
}
|
||||
fp << std::endl;
|
||||
if (ibit < regional_bitstream_max_size - 1) {
|
||||
fp << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -145,20 +122,54 @@ int write_config_chain_fabric_bitstream_to_text_file(std::fstream& fp,
|
|||
*******************************************************************/
|
||||
static
|
||||
int write_memory_bank_fabric_bitstream_to_text_file(std::fstream& fp,
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
const bool& fast_configuration,
|
||||
const bool& bit_value_to_skip,
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
int status = 0;
|
||||
|
||||
MemoryBankFabricBitstream fabric_bits_by_addr = build_memory_bank_fabric_bitstream_by_address(fabric_bitstream);
|
||||
|
||||
/* The address sizes and data input sizes are the same across any element,
|
||||
* just get it from the 1st element to save runtime
|
||||
*/
|
||||
size_t bl_addr_size = fabric_bits_by_addr.begin()->first.first.size();
|
||||
size_t wl_addr_size = fabric_bits_by_addr.begin()->first.second.size();
|
||||
size_t din_size = fabric_bits_by_addr.begin()->second.size();
|
||||
|
||||
/* Identify and output bitstream size information */
|
||||
size_t num_bits_to_skip = 0;
|
||||
if (true == fast_configuration) {
|
||||
num_bits_to_skip = fabric_bits_by_addr.size() - find_memory_bank_fast_configuration_fabric_bitstream_size(fabric_bitstream, bit_value_to_skip);
|
||||
VTR_ASSERT(num_bits_to_skip < fabric_bits_by_addr.size());
|
||||
VTR_LOG("Fast configuration will skip %g% (%lu/%lu) of configuration bitstream.\n",
|
||||
100. * (float) num_bits_to_skip / (float) fabric_bits_by_addr.size(),
|
||||
num_bits_to_skip, fabric_bits_by_addr.size());
|
||||
}
|
||||
|
||||
/* Output information about how to intepret the bitstream */
|
||||
fp << "// Bitstream length: " << fabric_bits_by_addr.size() - num_bits_to_skip << std::endl;
|
||||
fp << "// Bitstream width (LSB -> MSB): ";
|
||||
fp << "<bl_address " << bl_addr_size << " bits>";
|
||||
fp << "<wl_address " << wl_addr_size << " bits>";
|
||||
fp << "<data input " << din_size << " bits>";
|
||||
fp << std::endl;
|
||||
|
||||
for (const auto& addr_din_pair : fabric_bits_by_addr) {
|
||||
/* When fast configuration is enabled,
|
||||
* the rule to skip any configuration bit should consider the whole data input values.
|
||||
* Only all the bits in the din port match the value to be skipped,
|
||||
* the programming cycle can be skipped!
|
||||
*/
|
||||
if (true == fast_configuration) {
|
||||
if (addr_din_pair.second == std::vector<bool>(addr_din_pair.second.size(), bit_value_to_skip)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Write BL address code */
|
||||
fp << addr_din_pair.first.first;
|
||||
fp << " ";
|
||||
|
||||
/* Write WL address code */
|
||||
fp << addr_din_pair.first.second;
|
||||
fp << " ";
|
||||
|
||||
/* Write data input */
|
||||
for (const bool& din_value : addr_din_pair.second) {
|
||||
fp << din_value;
|
||||
|
@ -179,15 +190,47 @@ int write_memory_bank_fabric_bitstream_to_text_file(std::fstream& fp,
|
|||
*******************************************************************/
|
||||
static
|
||||
int write_frame_based_fabric_bitstream_to_text_file(std::fstream& fp,
|
||||
const bool& fast_configuration,
|
||||
const bool& bit_value_to_skip,
|
||||
const FabricBitstream& fabric_bitstream) {
|
||||
int status = 0;
|
||||
|
||||
FrameFabricBitstream fabric_bits_by_addr = build_frame_based_fabric_bitstream_by_address(fabric_bitstream);
|
||||
|
||||
/* The address sizes and data input sizes are the same across any element,
|
||||
* just get it from the 1st element to save runtime
|
||||
*/
|
||||
size_t addr_size = fabric_bits_by_addr.begin()->first.size();
|
||||
size_t din_size = fabric_bits_by_addr.begin()->second.size();
|
||||
|
||||
/* Identify and output bitstream size information */
|
||||
size_t num_bits_to_skip = 0;
|
||||
if (true == fast_configuration) {
|
||||
num_bits_to_skip = fabric_bits_by_addr.size() - find_frame_based_fast_configuration_fabric_bitstream_size(fabric_bitstream, bit_value_to_skip);
|
||||
VTR_ASSERT(num_bits_to_skip < fabric_bits_by_addr.size());
|
||||
VTR_LOG("Fast configuration will skip %g% (%lu/%lu) of configuration bitstream.\n",
|
||||
100. * (float) num_bits_to_skip / (float) fabric_bits_by_addr.size(),
|
||||
num_bits_to_skip, fabric_bits_by_addr.size());
|
||||
}
|
||||
|
||||
/* Output information about how to intepret the bitstream */
|
||||
fp << "// Bitstream length: " << fabric_bits_by_addr.size() - num_bits_to_skip << std::endl;
|
||||
fp << "// Bitstream width (LSB -> MSB): <address " << addr_size << " bits><data input " << din_size << " bits>" << std::endl;
|
||||
|
||||
for (const auto& addr_din_pair : fabric_bits_by_addr) {
|
||||
/* When fast configuration is enabled,
|
||||
* the rule to skip any configuration bit should consider the whole data input values.
|
||||
* Only all the bits in the din port match the value to be skipped,
|
||||
* the programming cycle can be skipped!
|
||||
*/
|
||||
if (true == fast_configuration) {
|
||||
if (addr_din_pair.second == std::vector<bool>(addr_din_pair.second.size(), bit_value_to_skip)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Write address code */
|
||||
fp << addr_din_pair.first;
|
||||
fp << " ";
|
||||
|
||||
/* Write data input */
|
||||
for (const bool& din_value : addr_din_pair.second) {
|
||||
|
@ -214,7 +257,9 @@ int write_frame_based_fabric_bitstream_to_text_file(std::fstream& fp,
|
|||
int write_fabric_bitstream_to_text_file(const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const ConfigProtocol& config_protocol,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
const std::string& fname,
|
||||
const bool& fast_configuration,
|
||||
const bool& verbose) {
|
||||
/* Ensure that we have a valid file name */
|
||||
if (true == fname.empty()) {
|
||||
|
@ -230,26 +275,47 @@ int write_fabric_bitstream_to_text_file(const BitstreamManager& bitstream_manage
|
|||
|
||||
check_file_stream(fname.c_str(), fp);
|
||||
|
||||
bool apply_fast_configuration = is_fast_configuration_applicable(global_ports) && fast_configuration;
|
||||
if (fast_configuration && apply_fast_configuration != fast_configuration) {
|
||||
VTR_LOG_WARN("Disable fast configuration even it is enabled by user\n");
|
||||
}
|
||||
|
||||
bool bit_value_to_skip = false;
|
||||
if (apply_fast_configuration) {
|
||||
bit_value_to_skip = find_bit_value_to_skip_for_fast_configuration(config_protocol.type(),
|
||||
global_ports,
|
||||
bitstream_manager,
|
||||
fabric_bitstream);
|
||||
}
|
||||
|
||||
/* Write file head */
|
||||
write_fabric_bitstream_text_file_head(fp);
|
||||
|
||||
/* Output fabric bitstream to the file */
|
||||
int status = 0;
|
||||
switch (config_protocol.type()) {
|
||||
case CONFIG_MEM_STANDALONE:
|
||||
status = write_flatten_fabric_bitstream_to_text_file(fp,
|
||||
bitstream_manager,
|
||||
fabric_bitstream,
|
||||
config_protocol);
|
||||
fabric_bitstream);
|
||||
break;
|
||||
case CONFIG_MEM_SCAN_CHAIN:
|
||||
status = write_config_chain_fabric_bitstream_to_text_file(fp,
|
||||
apply_fast_configuration,
|
||||
bit_value_to_skip,
|
||||
bitstream_manager,
|
||||
fabric_bitstream);
|
||||
break;
|
||||
case CONFIG_MEM_MEMORY_BANK:
|
||||
status = write_memory_bank_fabric_bitstream_to_text_file(fp,
|
||||
apply_fast_configuration,
|
||||
bit_value_to_skip,
|
||||
fabric_bitstream);
|
||||
break;
|
||||
case CONFIG_MEM_FRAME_BASED:
|
||||
status = write_frame_based_fabric_bitstream_to_text_file(fp,
|
||||
apply_fast_configuration,
|
||||
bit_value_to_skip,
|
||||
fabric_bitstream);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "bitstream_manager.h"
|
||||
#include "fabric_bitstream.h"
|
||||
#include "config_protocol.h"
|
||||
#include "fabric_global_port_info.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
|
@ -20,7 +21,9 @@ namespace openfpga {
|
|||
int write_fabric_bitstream_to_text_file(const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const ConfigProtocol& config_protocol,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
const std::string& fname,
|
||||
const bool& fast_configuration,
|
||||
const bool& verbose);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
/* Headers from openfpgautil library */
|
||||
#include "openfpga_port.h"
|
||||
#include "openfpga_digest.h"
|
||||
#include "openfpga_scale.h"
|
||||
|
||||
#include "sdc_writer_naming.h"
|
||||
#include "sdc_writer_utils.h"
|
||||
|
@ -59,6 +60,7 @@ void print_pnr_sdc_clock_port(std::fstream& fp,
|
|||
*******************************************************************/
|
||||
static
|
||||
void print_pnr_sdc_global_clock_ports(std::fstream& fp,
|
||||
const float& time_unit,
|
||||
const ModuleManager& module_manager,
|
||||
const ModuleId& top_module,
|
||||
const FabricGlobalPortInfo& fabric_global_port_info,
|
||||
|
@ -103,7 +105,7 @@ void print_pnr_sdc_global_clock_ports(std::fstream& fp,
|
|||
|
||||
print_pnr_sdc_clock_port(fp,
|
||||
port_to_constrain,
|
||||
clock_period);
|
||||
clock_period / time_unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +120,7 @@ void print_pnr_sdc_global_clock_ports(std::fstream& fp,
|
|||
*******************************************************************/
|
||||
static
|
||||
void print_pnr_sdc_global_non_clock_ports(std::fstream& fp,
|
||||
const float& time_unit,
|
||||
const float& operating_critical_path_delay,
|
||||
const ModuleManager& module_manager,
|
||||
const ModuleId& top_module,
|
||||
|
@ -144,7 +147,7 @@ void print_pnr_sdc_global_non_clock_ports(std::fstream& fp,
|
|||
|
||||
print_pnr_sdc_clock_port(fp,
|
||||
port_to_constrain,
|
||||
clock_period);
|
||||
clock_period / time_unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,6 +164,7 @@ void print_pnr_sdc_global_non_clock_ports(std::fstream& fp,
|
|||
* In general, we do not recommend to do this
|
||||
*******************************************************************/
|
||||
void print_pnr_sdc_global_ports(const std::string& sdc_dir,
|
||||
const float& time_unit,
|
||||
const ModuleManager& module_manager,
|
||||
const ModuleId& top_module,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
|
@ -183,12 +187,15 @@ void print_pnr_sdc_global_ports(const std::string& sdc_dir,
|
|||
/* Generate the descriptions*/
|
||||
print_sdc_file_header(fp, std::string("Clock contraints for PnR"));
|
||||
|
||||
print_pnr_sdc_global_clock_ports(fp,
|
||||
/* Print time unit for the SDC file */
|
||||
print_sdc_timescale(fp, time_unit_to_string(time_unit));
|
||||
|
||||
print_pnr_sdc_global_clock_ports(fp, time_unit,
|
||||
module_manager, top_module,
|
||||
global_ports, sim_setting);
|
||||
|
||||
if (true == constrain_non_clock_port) {
|
||||
print_pnr_sdc_global_non_clock_ports(fp,
|
||||
print_pnr_sdc_global_non_clock_ports(fp, time_unit,
|
||||
1./sim_setting.default_operating_clock_frequency(),
|
||||
module_manager, top_module,
|
||||
global_ports);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
namespace openfpga {
|
||||
|
||||
void print_pnr_sdc_global_ports(const std::string& sdc_dir,
|
||||
const float& time_unit,
|
||||
const ModuleManager& module_manager,
|
||||
const ModuleId& top_module,
|
||||
const FabricGlobalPortInfo& global_ports,
|
||||
|
|
|
@ -336,6 +336,7 @@ void print_pnr_sdc(const PnrSdcOption& sdc_options,
|
|||
/* Constrain global ports */
|
||||
if (true == sdc_options.constrain_global_port()) {
|
||||
print_pnr_sdc_global_ports(sdc_options.sdc_dir(),
|
||||
sdc_options.time_unit(),
|
||||
module_manager, top_module, global_ports,
|
||||
sim_setting,
|
||||
sdc_options.constrain_non_clock_global_port());
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
#include "verilog_api.h"
|
||||
|
||||
/* begin namespace openfpga */
|
||||
namespace openfpga
|
||||
{
|
||||
namespace openfpga {
|
||||
|
||||
/********************************************************************
|
||||
* A top-level function of FPGA-Verilog which focuses on fabric Verilog generation
|
||||
|
@ -141,29 +140,26 @@ void fpga_fabric_verilog(ModuleManager &module_manager,
|
|||
}
|
||||
|
||||
/********************************************************************
|
||||
* A top-level function of FPGA-Verilog which focuses on fabric Verilog generation
|
||||
* A top-level function of FPGA-Verilog which focuses on full testbench generation
|
||||
* This function will generate
|
||||
* - A wrapper module, which encapsulate the FPGA module in a Verilog module which have the same port as the input benchmark
|
||||
* - Testbench, where a FPGA module is configured with a bitstream and then driven by input vectors
|
||||
* - Pre-configured testbench, which can skip the configuration phase and pre-configure the FPGA module.
|
||||
* This testbench is created for quick verification and formal verification purpose.
|
||||
* - Verilog netlist including preprocessing flags and all the Verilog netlists that have been generated
|
||||
********************************************************************/
|
||||
int fpga_verilog_testbench(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const FabricBitstream &fabric_bitstream,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const IoLocationMap &io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const CircuitLibrary &circuit_lib,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options) {
|
||||
int fpga_verilog_full_testbench(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const FabricBitstream &fabric_bitstream,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const std::string& bitstream_file,
|
||||
const IoLocationMap &io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const CircuitLibrary &circuit_lib,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options) {
|
||||
|
||||
vtr::ScopedStartFinishTimer timer("Write Verilog testbenches for FPGA fabric\n");
|
||||
vtr::ScopedStartFinishTimer timer("Write Verilog full testbenches for FPGA fabric\n");
|
||||
|
||||
std::string src_dir_path = format_dir_path(options.output_directory());
|
||||
|
||||
|
@ -178,71 +174,22 @@ int fpga_verilog_testbench(const ModuleManager &module_manager,
|
|||
print_verilog_simulation_preprocessing_flags(std::string(src_dir_path),
|
||||
options);
|
||||
|
||||
/* Generate wrapper module for FPGA fabric (mapped by the input benchmark and pre-configured testbench for verification */
|
||||
if (true == options.print_formal_verification_top_netlist()) {
|
||||
std::string formal_verification_top_netlist_file_path = src_dir_path + netlist_name + std::string(FORMAL_VERIFICATION_VERILOG_FILE_POSTFIX);
|
||||
status = print_verilog_preconfig_top_module(module_manager, bitstream_manager,
|
||||
config_protocol,
|
||||
circuit_lib, fabric_global_port_info,
|
||||
atom_ctx, place_ctx,
|
||||
pin_constraints,
|
||||
io_location_map,
|
||||
netlist_annotation,
|
||||
netlist_name,
|
||||
formal_verification_top_netlist_file_path,
|
||||
options.explicit_port_mapping());
|
||||
if (status == CMD_EXEC_FATAL_ERROR) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
if (true == options.print_preconfig_top_testbench()) {
|
||||
/* Generate top-level testbench using random vectors */
|
||||
std::string random_top_testbench_file_path = src_dir_path + netlist_name + std::string(RANDOM_TOP_TESTBENCH_VERILOG_FILE_POSTFIX);
|
||||
print_verilog_random_top_testbench(netlist_name,
|
||||
random_top_testbench_file_path,
|
||||
atom_ctx,
|
||||
netlist_annotation,
|
||||
module_manager,
|
||||
fabric_global_port_info,
|
||||
pin_constraints,
|
||||
simulation_setting,
|
||||
options.explicit_port_mapping());
|
||||
}
|
||||
|
||||
/* Generate full testbench for verification, including configuration phase and operating phase */
|
||||
if (true == options.print_top_testbench()) {
|
||||
std::string top_testbench_file_path = src_dir_path + netlist_name + std::string(AUTOCHECK_TOP_TESTBENCH_VERILOG_FILE_POSTFIX);
|
||||
print_verilog_top_testbench(module_manager,
|
||||
bitstream_manager, fabric_bitstream,
|
||||
circuit_lib,
|
||||
config_protocol,
|
||||
fabric_global_port_info,
|
||||
atom_ctx, place_ctx,
|
||||
pin_constraints,
|
||||
io_location_map,
|
||||
netlist_annotation,
|
||||
netlist_name,
|
||||
top_testbench_file_path,
|
||||
simulation_setting,
|
||||
options);
|
||||
}
|
||||
|
||||
/* Generate exchangeable files which contains simulation settings */
|
||||
if (true == options.print_simulation_ini()) {
|
||||
std::string simulation_ini_file_name = options.simulation_ini_path();
|
||||
VTR_ASSERT(true != options.simulation_ini_path().empty());
|
||||
print_verilog_simulation_info(simulation_ini_file_name,
|
||||
netlist_name,
|
||||
src_dir_path,
|
||||
atom_ctx, place_ctx, io_location_map,
|
||||
module_manager,
|
||||
config_protocol.type(),
|
||||
bitstream_manager.num_bits(),
|
||||
simulation_setting.num_clock_cycles(),
|
||||
simulation_setting.programming_clock_frequency(),
|
||||
simulation_setting.default_operating_clock_frequency());
|
||||
}
|
||||
std::string top_testbench_file_path = src_dir_path + netlist_name + std::string(AUTOCHECK_TOP_TESTBENCH_VERILOG_FILE_POSTFIX);
|
||||
print_verilog_full_testbench(module_manager,
|
||||
bitstream_manager, fabric_bitstream,
|
||||
circuit_lib,
|
||||
config_protocol,
|
||||
fabric_global_port_info,
|
||||
atom_ctx, place_ctx,
|
||||
pin_constraints,
|
||||
bitstream_file,
|
||||
io_location_map,
|
||||
netlist_annotation,
|
||||
netlist_name,
|
||||
top_testbench_file_path,
|
||||
simulation_setting,
|
||||
options);
|
||||
|
||||
/* Generate a Verilog file including all the netlists that have been generated */
|
||||
print_verilog_testbench_include_netlists(src_dir_path,
|
||||
|
@ -253,4 +200,141 @@ int fpga_verilog_testbench(const ModuleManager &module_manager,
|
|||
return status;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A top-level function of FPGA-Verilog which focuses on full testbench generation
|
||||
* This function will generate
|
||||
* - A wrapper module, which encapsulate the FPGA module in a Verilog module which have the same port as the input benchmark
|
||||
********************************************************************/
|
||||
int fpga_verilog_preconfigured_fabric_wrapper(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const IoLocationMap &io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const CircuitLibrary &circuit_lib,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options) {
|
||||
|
||||
vtr::ScopedStartFinishTimer timer("Write a wrapper module for a preconfigured FPGA fabric\n");
|
||||
|
||||
std::string src_dir_path = format_dir_path(options.output_directory());
|
||||
|
||||
std::string netlist_name = atom_ctx.nlist.netlist_name();
|
||||
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
||||
/* Create directories */
|
||||
create_directory(src_dir_path);
|
||||
|
||||
/* Generate wrapper module for FPGA fabric (mapped by the input benchmark and pre-configured testbench for verification */
|
||||
std::string formal_verification_top_netlist_file_path = src_dir_path + netlist_name + std::string(FORMAL_VERIFICATION_VERILOG_FILE_POSTFIX);
|
||||
status = print_verilog_preconfig_top_module(module_manager, bitstream_manager,
|
||||
config_protocol,
|
||||
circuit_lib, fabric_global_port_info,
|
||||
atom_ctx, place_ctx,
|
||||
pin_constraints,
|
||||
io_location_map,
|
||||
netlist_annotation,
|
||||
netlist_name,
|
||||
formal_verification_top_netlist_file_path,
|
||||
options);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A top-level function of FPGA-Verilog which focuses on fabric Verilog generation
|
||||
* This function will generate
|
||||
* - Pre-configured testbench, which can skip the configuration phase and pre-configure the FPGA module.
|
||||
* This testbench is created for quick verification and formal verification purpose.
|
||||
********************************************************************/
|
||||
int fpga_verilog_preconfigured_testbench(const ModuleManager &module_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const VerilogTestbenchOption &options) {
|
||||
|
||||
vtr::ScopedStartFinishTimer timer("Write Verilog testbenches for a preconfigured FPGA fabric\n");
|
||||
|
||||
std::string src_dir_path = format_dir_path(options.output_directory());
|
||||
|
||||
std::string netlist_name = atom_ctx.nlist.netlist_name();
|
||||
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
||||
/* Create directories */
|
||||
create_directory(src_dir_path);
|
||||
|
||||
/* Output preprocessing flags for HDL simulations */
|
||||
print_verilog_simulation_preprocessing_flags(std::string(src_dir_path),
|
||||
options);
|
||||
|
||||
/* Generate top-level testbench using random vectors */
|
||||
std::string random_top_testbench_file_path = src_dir_path + netlist_name + std::string(RANDOM_TOP_TESTBENCH_VERILOG_FILE_POSTFIX);
|
||||
print_verilog_random_top_testbench(netlist_name,
|
||||
random_top_testbench_file_path,
|
||||
atom_ctx,
|
||||
netlist_annotation,
|
||||
module_manager,
|
||||
fabric_global_port_info,
|
||||
pin_constraints,
|
||||
simulation_setting,
|
||||
options);
|
||||
|
||||
/* Generate a Verilog file including all the netlists that have been generated */
|
||||
print_verilog_testbench_include_netlists(src_dir_path,
|
||||
netlist_name,
|
||||
options.fabric_netlist_file_path(),
|
||||
options.reference_benchmark_file_path());
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* A top-level function of FPGA-Verilog which focuses on fabric Verilog generation
|
||||
* This function will generate
|
||||
* - An interchangable file containing simulation task configuration
|
||||
********************************************************************/
|
||||
int fpga_verilog_simulation_task_info(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const IoLocationMap &io_location_map,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options) {
|
||||
|
||||
vtr::ScopedStartFinishTimer timer("Write interchangeable simulation task configuration\n");
|
||||
|
||||
std::string src_dir_path = format_dir_path(options.output_directory());
|
||||
|
||||
std::string netlist_name = atom_ctx.nlist.netlist_name();
|
||||
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
||||
/* Create directories */
|
||||
create_directory(src_dir_path);
|
||||
|
||||
/* Generate exchangeable files which contains simulation settings */
|
||||
std::string simulation_ini_file_name = options.simulation_ini_path();
|
||||
VTR_ASSERT(true != options.simulation_ini_path().empty());
|
||||
print_verilog_simulation_info(simulation_ini_file_name,
|
||||
netlist_name,
|
||||
src_dir_path,
|
||||
atom_ctx, place_ctx, io_location_map,
|
||||
module_manager,
|
||||
config_protocol.type(),
|
||||
bitstream_manager.num_bits(),
|
||||
simulation_setting.num_clock_cycles(),
|
||||
simulation_setting.programming_clock_frequency(),
|
||||
simulation_setting.default_operating_clock_frequency());
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
|
|
@ -43,20 +43,49 @@ void fpga_fabric_verilog(ModuleManager& module_manager,
|
|||
const DeviceRRGSB& device_rr_gsb,
|
||||
const FabricVerilogOption& options);
|
||||
|
||||
int fpga_verilog_testbench(const ModuleManager& module_manager,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const AtomContext& atom_ctx,
|
||||
const PlacementContext& place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const IoLocationMap& io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const CircuitLibrary& circuit_lib,
|
||||
const SimulationSetting& simulation_parameters,
|
||||
const ConfigProtocol& config_protocol,
|
||||
const VerilogTestbenchOption& options);
|
||||
int fpga_verilog_full_testbench(const ModuleManager& module_manager,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const AtomContext& atom_ctx,
|
||||
const PlacementContext& place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const std::string& bitstream_file,
|
||||
const IoLocationMap& io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const CircuitLibrary& circuit_lib,
|
||||
const SimulationSetting& simulation_parameters,
|
||||
const ConfigProtocol& config_protocol,
|
||||
const VerilogTestbenchOption& options);
|
||||
|
||||
int fpga_verilog_preconfigured_fabric_wrapper(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const IoLocationMap &io_location_map,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const CircuitLibrary &circuit_lib,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options);
|
||||
|
||||
int fpga_verilog_preconfigured_testbench(const ModuleManager &module_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const FabricGlobalPortInfo &fabric_global_port_info,
|
||||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const VerilogTestbenchOption &options);
|
||||
|
||||
int fpga_verilog_simulation_task_info(const ModuleManager &module_manager,
|
||||
const BitstreamManager &bitstream_manager,
|
||||
const AtomContext &atom_ctx,
|
||||
const PlacementContext &place_ctx,
|
||||
const IoLocationMap &io_location_map,
|
||||
const SimulationSetting &simulation_setting,
|
||||
const ConfigProtocol &config_protocol,
|
||||
const VerilogTestbenchOption &options);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
/* Headers from openfpgautil library */
|
||||
#include "openfpga_port.h"
|
||||
#include "openfpga_digest.h"
|
||||
#include "openfpga_reserved_words.h"
|
||||
|
||||
#include "openfpga_atom_netlist_utils.h"
|
||||
#include "simulation_utils.h"
|
||||
|
@ -56,12 +57,13 @@ void print_verilog_top_random_testbench_ports(std::fstream& fp,
|
|||
const std::string& circuit_name,
|
||||
const std::vector<std::string>& clock_port_names,
|
||||
const AtomContext& atom_ctx,
|
||||
const VprNetlistAnnotation& netlist_annotation) {
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const e_verilog_default_net_type& default_net_type) {
|
||||
/* Validate the file stream */
|
||||
valid_file_stream(fp);
|
||||
|
||||
print_verilog_default_net_type_declaration(fp,
|
||||
VERILOG_DEFAULT_NET_TYPE_NONE);
|
||||
default_net_type);
|
||||
|
||||
/* Print the declaration for the module */
|
||||
fp << "module " << circuit_name << FORMAL_RANDOM_TOP_TESTBENCH_POSTFIX << ";" << std::endl;
|
||||
|
@ -278,7 +280,7 @@ void print_verilog_random_top_testbench(const std::string& circuit_name,
|
|||
const FabricGlobalPortInfo& global_ports,
|
||||
const PinConstraints& pin_constraints,
|
||||
const SimulationSetting& simulation_parameters,
|
||||
const bool& explicit_port_mapping) {
|
||||
const VerilogTestbenchOption &options) {
|
||||
std::string timer_message = std::string("Write configuration-skip testbench for FPGA top-level Verilog netlist implemented by '") + circuit_name.c_str() + std::string("'");
|
||||
|
||||
/* Start time count */
|
||||
|
@ -299,17 +301,17 @@ void print_verilog_random_top_testbench(const std::string& circuit_name,
|
|||
std::vector<std::string> clock_port_names = find_atom_netlist_clock_port_names(atom_ctx.nlist, netlist_annotation);
|
||||
|
||||
/* Start of testbench */
|
||||
print_verilog_top_random_testbench_ports(fp, circuit_name, clock_port_names, atom_ctx, netlist_annotation);
|
||||
print_verilog_top_random_testbench_ports(fp, circuit_name, clock_port_names, atom_ctx, netlist_annotation, options.default_net_type());
|
||||
|
||||
/* Call defined top-level module */
|
||||
print_verilog_random_testbench_fpga_instance(fp, circuit_name,
|
||||
atom_ctx, netlist_annotation,
|
||||
explicit_port_mapping);
|
||||
options.explicit_port_mapping());
|
||||
|
||||
/* Call defined benchmark */
|
||||
print_verilog_top_random_testbench_benchmark_instance(fp, circuit_name,
|
||||
atom_ctx, netlist_annotation,
|
||||
explicit_port_mapping);
|
||||
options.explicit_port_mapping());
|
||||
|
||||
/* Find clock port to be used */
|
||||
std::vector<BasicPort> clock_ports = generate_verilog_testbench_clock_port(clock_port_names, std::string(DEFAULT_CLOCK_NAME));
|
||||
|
@ -359,7 +361,6 @@ void print_verilog_random_top_testbench(const std::string& circuit_name,
|
|||
|
||||
/* Add Icarus requirement */
|
||||
print_verilog_timeout_and_vcd(fp,
|
||||
std::string(ICARUS_SIMULATOR_FLAG),
|
||||
std::string(circuit_name + std::string(FORMAL_RANDOM_TOP_TESTBENCH_POSTFIX)),
|
||||
std::string(circuit_name + std::string("_formal.vcd")),
|
||||
std::string(FORMAL_TB_SIM_START_PORT_NAME),
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "module_manager.h"
|
||||
#include "fabric_global_port_info.h"
|
||||
#include "simulation_setting.h"
|
||||
#include "verilog_testbench_options.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
|
@ -26,7 +27,7 @@ void print_verilog_random_top_testbench(const std::string& circuit_name,
|
|||
const FabricGlobalPortInfo& global_ports,
|
||||
const PinConstraints& pin_constraints,
|
||||
const SimulationSetting& simulation_parameters,
|
||||
const bool& explicit_port_mapping);
|
||||
const VerilogTestbenchOption &options);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -442,7 +442,7 @@ int print_verilog_preconfig_top_module(const ModuleManager &module_manager,
|
|||
const VprNetlistAnnotation &netlist_annotation,
|
||||
const std::string &circuit_name,
|
||||
const std::string &verilog_fname,
|
||||
const bool &explicit_port_mapping) {
|
||||
const VerilogTestbenchOption& options) {
|
||||
std::string timer_message = std::string("Write pre-configured FPGA top-level Verilog netlist for design '") + circuit_name + std::string("'");
|
||||
|
||||
int status = CMD_EXEC_SUCCESS;
|
||||
|
@ -462,7 +462,7 @@ int print_verilog_preconfig_top_module(const ModuleManager &module_manager,
|
|||
print_verilog_file_header(fp, title);
|
||||
|
||||
print_verilog_default_net_type_declaration(fp,
|
||||
VERILOG_DEFAULT_NET_TYPE_NONE);
|
||||
options.default_net_type());
|
||||
|
||||
/* Print module declaration and ports */
|
||||
print_verilog_preconfig_top_module_ports(fp, circuit_name, atom_ctx, netlist_annotation);
|
||||
|
@ -477,7 +477,7 @@ int print_verilog_preconfig_top_module(const ModuleManager &module_manager,
|
|||
/* Instanciate FPGA top-level module */
|
||||
print_verilog_testbench_fpga_instance(fp, module_manager, top_module,
|
||||
std::string(FORMAL_VERIFICATION_TOP_MODULE_UUT_NAME),
|
||||
explicit_port_mapping);
|
||||
options.explicit_port_mapping());
|
||||
|
||||
/* Find clock ports in benchmark */
|
||||
std::vector<std::string> benchmark_clock_port_names = find_atom_netlist_clock_port_names(atom_ctx.nlist, netlist_annotation);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "fabric_global_port_info.h"
|
||||
#include "config_protocol.h"
|
||||
#include "vpr_netlist_annotation.h"
|
||||
#include "verilog_testbench_options.h"
|
||||
|
||||
/********************************************************************
|
||||
* Function declaration
|
||||
|
@ -35,7 +36,7 @@ int print_verilog_preconfig_top_module(const ModuleManager& module_manager,
|
|||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const std::string& circuit_name,
|
||||
const std::string& verilog_fname,
|
||||
const bool& explicit_port_mapping);
|
||||
const VerilogTestbenchOption& options);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ VerilogTestbenchOption::VerilogTestbenchOption() {
|
|||
explicit_port_mapping_ = false;
|
||||
support_icarus_simulator_ = false;
|
||||
include_signal_init_ = false;
|
||||
default_net_type_ = VERILOG_DEFAULT_NET_TYPE_NONE;
|
||||
verbose_output_ = false;
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,10 @@ bool VerilogTestbenchOption::support_icarus_simulator() const {
|
|||
return support_icarus_simulator_;
|
||||
}
|
||||
|
||||
e_verilog_default_net_type VerilogTestbenchOption::default_net_type() const {
|
||||
return default_net_type_;
|
||||
}
|
||||
|
||||
bool VerilogTestbenchOption::verbose_output() const {
|
||||
return verbose_output_;
|
||||
}
|
||||
|
@ -141,6 +146,20 @@ void VerilogTestbenchOption::set_support_icarus_simulator(const bool& enabled) {
|
|||
support_icarus_simulator_ = enabled;
|
||||
}
|
||||
|
||||
void VerilogTestbenchOption::set_default_net_type(const std::string& default_net_type) {
|
||||
/* Decode from net type string */;
|
||||
if (default_net_type == std::string(VERILOG_DEFAULT_NET_TYPE_STRING[VERILOG_DEFAULT_NET_TYPE_NONE])) {
|
||||
default_net_type_ = VERILOG_DEFAULT_NET_TYPE_NONE;
|
||||
} else if (default_net_type == std::string(VERILOG_DEFAULT_NET_TYPE_STRING[VERILOG_DEFAULT_NET_TYPE_WIRE])) {
|
||||
default_net_type_ = VERILOG_DEFAULT_NET_TYPE_WIRE;
|
||||
} else {
|
||||
VTR_LOG_WARN("Invalid default net type: '%s'! Expect ['%s'|'%s']\n",
|
||||
default_net_type.c_str(),
|
||||
VERILOG_DEFAULT_NET_TYPE_STRING[VERILOG_DEFAULT_NET_TYPE_NONE],
|
||||
VERILOG_DEFAULT_NET_TYPE_STRING[VERILOG_DEFAULT_NET_TYPE_WIRE]);
|
||||
}
|
||||
}
|
||||
|
||||
void VerilogTestbenchOption::set_verbose_output(const bool& enabled) {
|
||||
verbose_output_ = enabled;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Include header files required by the data structure definition
|
||||
*******************************************************************/
|
||||
#include <string>
|
||||
#include "verilog_port_types.h"
|
||||
|
||||
/* Begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
@ -34,6 +35,7 @@ class VerilogTestbenchOption {
|
|||
bool explicit_port_mapping() const;
|
||||
bool include_signal_init() const;
|
||||
bool support_icarus_simulator() const;
|
||||
e_verilog_default_net_type default_net_type() const;
|
||||
bool verbose_output() const;
|
||||
public: /* Public validator */
|
||||
bool validate() const;
|
||||
|
@ -58,6 +60,7 @@ class VerilogTestbenchOption {
|
|||
void set_explicit_port_mapping(const bool& enabled);
|
||||
void set_include_signal_init(const bool& enabled);
|
||||
void set_support_icarus_simulator(const bool& enabled);
|
||||
void set_default_net_type(const std::string& default_net_type);
|
||||
void set_verbose_output(const bool& enabled);
|
||||
private: /* Internal Data */
|
||||
std::string output_directory_;
|
||||
|
@ -72,6 +75,7 @@ class VerilogTestbenchOption {
|
|||
bool explicit_port_mapping_;
|
||||
bool support_icarus_simulator_;
|
||||
bool include_signal_init_;
|
||||
e_verilog_default_net_type default_net_type_;
|
||||
bool verbose_output_;
|
||||
};
|
||||
|
||||
|
|
|
@ -300,7 +300,6 @@ void print_verilog_testbench_connect_fpga_ios(std::fstream& fp,
|
|||
* Note that: these codes are tuned for Icarus simulator!!!
|
||||
*******************************************************************/
|
||||
void print_verilog_timeout_and_vcd(std::fstream& fp,
|
||||
const std::string& icarus_preprocessing_flag,
|
||||
const std::string& module_name,
|
||||
const std::string& vcd_fname,
|
||||
const std::string& simulation_start_counter_name,
|
||||
|
@ -309,20 +308,14 @@ void print_verilog_timeout_and_vcd(std::fstream& fp,
|
|||
/* Validate the file stream */
|
||||
valid_file_stream(fp);
|
||||
|
||||
/* The following verilog codes are tuned for Icarus */
|
||||
print_verilog_preprocessing_flag(fp, icarus_preprocessing_flag);
|
||||
|
||||
print_verilog_comment(fp, std::string("----- Begin Icarus requirement -------"));
|
||||
print_verilog_comment(fp, std::string("----- Begin output waveform to VCD file-------"));
|
||||
|
||||
fp << "\tinitial begin" << std::endl;
|
||||
fp << "\t\t$dumpfile(\"" << vcd_fname << "\");" << std::endl;
|
||||
fp << "\t\t$dumpvars(1, " << module_name << ");" << std::endl;
|
||||
fp << "\tend" << std::endl;
|
||||
|
||||
/* Condition ends for the Icarus requirement */
|
||||
print_verilog_endif(fp);
|
||||
|
||||
print_verilog_comment(fp, std::string("----- END Icarus requirement -------"));
|
||||
print_verilog_comment(fp, std::string("----- END output waveform to VCD file -------"));
|
||||
|
||||
/* Add an empty line as splitter */
|
||||
fp << std::endl;
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
constexpr char* VPR_BENCHMARK_OUT_PORT_PREFIX = "out:";
|
||||
constexpr char* OPENFPGA_BENCHMARK_OUT_PORT_PREFIX = "out_";
|
||||
|
||||
void print_verilog_testbench_fpga_instance(std::fstream& fp,
|
||||
const ModuleManager& module_manager,
|
||||
const ModuleId& top_module,
|
||||
|
@ -55,7 +52,6 @@ void print_verilog_testbench_connect_fpga_ios(std::fstream& fp,
|
|||
const size_t& unused_io_value);
|
||||
|
||||
void print_verilog_timeout_and_vcd(std::fstream& fp,
|
||||
const std::string& icarus_preprocessing_flag,
|
||||
const std::string& module_name,
|
||||
const std::string& vcd_fname,
|
||||
const std::string& simulation_start_counter_name,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/* begin namespace openfpga */
|
||||
namespace openfpga {
|
||||
|
||||
void print_verilog_top_testbench(const ModuleManager& module_manager,
|
||||
int print_verilog_full_testbench(const ModuleManager& module_manager,
|
||||
const BitstreamManager& bitstream_manager,
|
||||
const FabricBitstream& fabric_bitstream,
|
||||
const CircuitLibrary& circuit_lib,
|
||||
|
@ -35,6 +35,7 @@ void print_verilog_top_testbench(const ModuleManager& module_manager,
|
|||
const AtomContext& atom_ctx,
|
||||
const PlacementContext& place_ctx,
|
||||
const PinConstraints& pin_constraints,
|
||||
const std::string& bitstream_file,
|
||||
const IoLocationMap& io_location_map,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const std::string& circuit_name,
|
||||
|
|
|
@ -724,14 +724,20 @@ std::string generate_verilog_constant_values(const std::vector<size_t>& const_va
|
|||
* Generate a verilog port with a deposite of constant values
|
||||
********************************************************************/
|
||||
std::string generate_verilog_port_constant_values(const BasicPort& output_port,
|
||||
const std::vector<size_t>& const_values) {
|
||||
const std::vector<size_t>& const_values,
|
||||
const bool& is_register) {
|
||||
std::string port_str;
|
||||
|
||||
/* Must check: the port width matches */
|
||||
VTR_ASSERT( const_values.size() == output_port.get_width() );
|
||||
|
||||
port_str = generate_verilog_port(VERILOG_PORT_CONKT, output_port);
|
||||
port_str += " = ";
|
||||
if (is_register) {
|
||||
port_str += " <= ";
|
||||
} else {
|
||||
VTR_ASSERT_SAFE(!is_register);
|
||||
port_str += " = ";
|
||||
}
|
||||
port_str += generate_verilog_constant_values(const_values);
|
||||
return port_str;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,8 @@ std::string generate_verilog_constant_values(const std::vector<size_t>& const_va
|
|||
const bool& short_constant = true);
|
||||
|
||||
std::string generate_verilog_port_constant_values(const BasicPort& output_port,
|
||||
const std::vector<size_t>& const_values);
|
||||
const std::vector<size_t>& const_values,
|
||||
const bool& is_register = false);
|
||||
|
||||
void print_verilog_wire_constant_values(std::fstream& fp,
|
||||
const BasicPort& output_port,
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/////////////////////////////////////////
|
||||
// Functionality: 4-input AND
|
||||
// Author: Xifan Tang
|
||||
////////////////////////////////////////
|
||||
`timescale 1ns / 1ps
|
||||
|
||||
module and4(
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d,
|
||||
e);
|
||||
|
||||
input wire a;
|
||||
input wire b;
|
||||
input wire c;
|
||||
input wire d;
|
||||
output wire e;
|
||||
|
||||
assign e = a & b & c & d;
|
||||
|
||||
endmodule
|
|
@ -0,0 +1,17 @@
|
|||
// ------------------------------
|
||||
// Design Name: Blinking
|
||||
// Functionality: 1-bit blinking
|
||||
// ------------------------------
|
||||
module blinking(
|
||||
clk,
|
||||
out
|
||||
);
|
||||
|
||||
input clk;
|
||||
output out;
|
||||
|
||||
always @(posedge clk) begin
|
||||
out = ~out;
|
||||
end
|
||||
|
||||
endmodule
|
|
@ -0,0 +1,25 @@
|
|||
///////////////////////////////////////////
|
||||
// Functionality: Counter with asynchronous reset
|
||||
// Author: Xifan Tang
|
||||
////////////////////////////////////////
|
||||
|
||||
module counter (
|
||||
clk,
|
||||
reset,
|
||||
result
|
||||
);
|
||||
|
||||
input clk;
|
||||
input reset;
|
||||
output [127:0] result;
|
||||
|
||||
reg [127:0] result;
|
||||
|
||||
always @(posedge clk or posedge reset)
|
||||
begin
|
||||
if (reset)
|
||||
result = 0;
|
||||
else
|
||||
result = result + 1;
|
||||
end
|
||||
endmodule
|
|
@ -0,0 +1,25 @@
|
|||
module counter_tb;
|
||||
|
||||
reg clk, reset;
|
||||
wire [127:0] result;
|
||||
|
||||
counter DUT(
|
||||
.clk(clk),
|
||||
.reset(reset),
|
||||
.result(result)
|
||||
);
|
||||
|
||||
initial begin
|
||||
#0 reset = 1'b1; clk = 1'b0;
|
||||
#100 reset = 1'b0;
|
||||
end
|
||||
|
||||
always begin
|
||||
#10 clk = ~clk;
|
||||
end
|
||||
|
||||
initial begin
|
||||
#5000 $stop;
|
||||
end
|
||||
|
||||
endmodule
|
|
@ -0,0 +1,25 @@
|
|||
///////////////////////////////////////////
|
||||
// Functionality: Counter with asynchronous reset
|
||||
// Author: Xifan Tang
|
||||
////////////////////////////////////////
|
||||
|
||||
module counter (
|
||||
clk,
|
||||
resetb,
|
||||
result
|
||||
);
|
||||
|
||||
input clk;
|
||||
input resetb;
|
||||
output [127:0] result;
|
||||
|
||||
reg [127:0] result;
|
||||
|
||||
always @(posedge clk or negedge resetb)
|
||||
begin
|
||||
if (~resetb)
|
||||
result = 0;
|
||||
else
|
||||
result = result + 1;
|
||||
end
|
||||
endmodule
|
|
@ -0,0 +1,25 @@
|
|||
module counter_tb;
|
||||
|
||||
reg clk, resetb;
|
||||
wire [127:0] result;
|
||||
|
||||
counter DUT(
|
||||
.clk(clk),
|
||||
.resetb(resetb),
|
||||
.result(result)
|
||||
);
|
||||
|
||||
initial begin
|
||||
#0 reset = 1'b0; clk = 1'b0;
|
||||
#100 reset = 1'b1;
|
||||
end
|
||||
|
||||
always begin
|
||||
#10 clk = ~clk;
|
||||
end
|
||||
|
||||
initial begin
|
||||
#5000 $stop;
|
||||
end
|
||||
|
||||
endmodule
|
|
@ -0,0 +1,22 @@
|
|||
//-------------------------------------------------------
|
||||
// Functionality: A 18-bit multiply-acculumate circuit
|
||||
// Author: Xifan Tang
|
||||
//-------------------------------------------------------
|
||||
|
||||
module mac_18(a, b, c, out);
|
||||
parameter DATA_WIDTH = 18; /* declare a parameter. default required */
|
||||
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||
output [DATA_WIDTH - 1 : 0] out;
|
||||
|
||||
assign out = a * b + c;
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//-------------------------------------------------------
|
||||
// Functionality: A 20-bit multiply-acculumate circuit
|
||||
// Author: Xifan Tang
|
||||
//-------------------------------------------------------
|
||||
|
||||
module mac_20(a, b, c, out);
|
||||
parameter DATA_WIDTH = 20; /* declare a parameter. default required */
|
||||
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||
output [DATA_WIDTH - 1 : 0] out;
|
||||
|
||||
assign out = a * b + c;
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//-------------------------------------------------------
|
||||
// Functionality: A 36-bit multiply-acculumate circuit
|
||||
// Author: Xifan Tang
|
||||
//-------------------------------------------------------
|
||||
|
||||
module mac_36(a, b, c, out);
|
||||
parameter DATA_WIDTH = 4; /* declare a parameter. default required */
|
||||
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||
output [DATA_WIDTH - 1 : 0] out;
|
||||
|
||||
assign out = a * b + c;
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//-------------------------------------------------------
|
||||
// Functionality:
|
||||
// - A 8-bit multiply-acculumate circuit
|
||||
// - A 9-bit multiply-acculumate circuit
|
||||
// Author: Xifan Tang
|
||||
//-------------------------------------------------------
|
||||
|
||||
module mac_8_9(a, b, c, out);
|
||||
parameter DATA_WIDTH = 18; /* declare a parameter. default required */
|
||||
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||
output [DATA_WIDTH - 1 : 0] out;
|
||||
|
||||
assign out[8:0] = a[8:0] * b[8:0] + c[8:0];
|
||||
assign out[17:9] = a[17:9] * b[17:9] + c[17:9];
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//-------------------------------------------------------
|
||||
// Functionality: A 9-bit multiply-acculumate circuit
|
||||
// Author: Xifan Tang
|
||||
//-------------------------------------------------------
|
||||
|
||||
module mac_9(a, b, c, out);
|
||||
parameter DATA_WIDTH = 9; /* declare a parameter. default required */
|
||||
input [DATA_WIDTH - 1 : 0] a, b, c;
|
||||
output [DATA_WIDTH - 1 : 0] out;
|
||||
|
||||
assign out = a * b + c;
|
||||
|
||||
endmodule
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -55,17 +55,8 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --support_icarus_simulator --explicit_port_mapping
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
write_pnr_sdc --file ./SDC
|
||||
|
||||
# Write SDC to disable timing for configure ports
|
||||
write_sdc_disable_timing_configure_ports --file ./SDC/disable_configure_ports.sdc
|
||||
|
||||
# Write the SDC to run timing analysis for a mapped FPGA fabric
|
||||
write_analysis_sdc --file ./SDC_analysis
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping --default_net_type ${OPENFPGA_VERILOG_DEFAULT_NET_TYPE}
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator --default_net_type ${OPENFPGA_VERILOG_DEFAULT_NET_TYPE}
|
||||
|
||||
# Finish and exit OpenFPGA
|
||||
exit
|
||||
|
|
|
@ -58,7 +58,8 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator #--explicit_port_mapping
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -55,7 +55,8 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,7 @@ write_fabric_verilog --file ./FABRIC_NETLIST --explicit_port_mapping --include_t
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --fabric_netlist_file_path ${OPENFPGA_FABRIC_NETLIST_FILE} --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --fabric_netlist_file_path ${OPENFPGA_FABRIC_NETLIST_FILE} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -55,7 +55,8 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE}
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE} --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE}
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,7 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping --fast_configuration
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --fast_configuration --bitstream fabric_bitstream.bit
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -46,7 +46,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -58,7 +58,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator #--explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -45,7 +45,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -57,7 +57,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator #--explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,7 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -46,7 +46,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -58,7 +58,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -46,7 +46,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -58,7 +58,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog testbench for FPGA fabric
|
||||
# - We suggest the use of same output directory as fabric Verilog netlists
|
||||
|
@ -51,7 +51,9 @@ write_fabric_bitstream --file fabric_bitstream --format xml
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping --fabric_netlist_file_path ${OPENFPGA_FABRIC_VERILOG_NETLIST}
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --fabric_netlist_file_path ${OPENFPGA_FABRIC_VERILOG_NETLIST} --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --fabric_netlist_file_path ${OPENFPGA_FABRIC_VERILOG_NETLIST} --support_icarus_simulator
|
||||
|
||||
# Write the SDC to run timing analysis for a mapped FPGA fabric
|
||||
write_analysis_sdc --file ./SDC_analysis
|
||||
|
|
|
@ -45,7 +45,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -57,7 +57,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator #--explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -49,7 +49,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -61,7 +61,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE} #--explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE} --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE}
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --pin_constraints_file ${OPENFPGA_PIN_CONSTRAINTS_FILE} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --include_timing --print_user_defined_template
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --bitstream fabric_bitstream.bit --default_net_type ${OPENFPGA_DEFAULT_NET_TYPE}
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --default_net_type ${OPENFPGA_DEFAULT_NET_TYPE}
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator --default_net_type ${OPENFPGA_DEFAULT_NET_TYPE}
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -42,6 +42,9 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
# Build fabric-dependent bitstream
|
||||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --print_user_defined_template --verbose
|
||||
|
@ -52,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -46,7 +46,7 @@ build_architecture_bitstream --verbose \
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -58,7 +58,7 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -37,7 +37,7 @@ repack #--verbose
|
|||
|
||||
# Build the bitstream
|
||||
# - Output the fabric-independent bitstream to a file
|
||||
build_architecture_bitstream --verbose --write_file fabric_indepenent_bitstream.xml
|
||||
build_architecture_bitstream --verbose
|
||||
|
||||
# Build fabric-dependent bitstream
|
||||
build_fabric_bitstream --verbose
|
||||
|
@ -46,9 +46,7 @@ build_fabric_bitstream --verbose
|
|||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
write_fabric_verilog --file ./SRC \
|
||||
--explicit_port_mapping \
|
||||
--include_timing \
|
||||
--include_signal_init
|
||||
# --support_icarus_simulator
|
||||
--include_timing
|
||||
|
||||
# Write the Verilog testbench for FPGA fabric
|
||||
# - We suggest the use of same output directory as fabric Verilog netlists
|
||||
|
@ -56,17 +54,8 @@ write_fabric_verilog --file ./SRC \
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ./${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./simulation_deck_info.ini
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
write_pnr_sdc --file ./SDC
|
||||
|
||||
# Write SDC to disable timing for configure ports
|
||||
write_sdc_disable_timing_configure_ports --file ./SDC/disable_configure_ports.sdc
|
||||
|
||||
# Write the SDC to run timing analysis for a mapped FPGA fabric
|
||||
write_analysis_sdc --file ./SDC_analysis
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --support_icarus_simulator
|
||||
|
||||
# Finish and exit OpenFPGA
|
||||
exit
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
# Run VPR for the 'and' design
|
||||
#--write_rr_graph example_rr_graph.xml
|
||||
vpr ${VPR_ARCH_FILE} ${VPR_TESTBENCH_BLIF} --clock_modeling route --absorb_buffer_luts off
|
||||
|
||||
# Read OpenFPGA architecture definition
|
||||
read_openfpga_arch -f ${OPENFPGA_ARCH_FILE}
|
||||
|
||||
# Read OpenFPGA simulation settings
|
||||
read_openfpga_simulation_setting -f ${OPENFPGA_SIM_SETTING_FILE}
|
||||
|
||||
# Annotate the OpenFPGA architecture to VPR data base
|
||||
# to debug use --verbose options
|
||||
link_openfpga_arch --activity_file ${ACTIVITY_FILE} --sort_gsb_chan_node_in_edges
|
||||
|
||||
# Check and correct any naming conflicts in the BLIF netlist
|
||||
check_netlist_naming_conflict --fix --report ./netlist_renaming.xml
|
||||
|
||||
# Apply fix-up to clustering nets based on routing results
|
||||
pb_pin_fixup --verbose
|
||||
|
||||
# Apply fix-up to Look-Up Table truth tables based on packing results
|
||||
lut_truth_table_fixup
|
||||
|
||||
# Build the module graph
|
||||
# - Enabled compression on routing architecture modules
|
||||
# - Enabled frame view creation to save runtime and memory
|
||||
# Note that this is turned on when bitstream generation
|
||||
# is the ONLY purpose of the flow!!!
|
||||
build_fabric --compress_routing --frame_view #--verbose
|
||||
|
||||
# Repack the netlist to physical pbs
|
||||
# This must be done before bitstream generator and testbench generation
|
||||
# Strongly recommend it is done after all the fix-up have been applied
|
||||
repack #--verbose
|
||||
|
||||
# Build the bitstream
|
||||
# - Output the fabric-independent bitstream to a file
|
||||
build_architecture_bitstream --verbose --write_file fabric_independent_bitstream.xml
|
||||
|
||||
# Build fabric-dependent bitstream
|
||||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.txt --format plain_text
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
|
||||
# Report bitstream distribution to a file
|
||||
report_bitstream_distribution ${OPENFPGA_REPORT_BITSTREAM_DISTRIBUTION_OPTIONS}
|
||||
|
||||
# Finish and exit OpenFPGA
|
||||
exit
|
||||
|
||||
# Note :
|
||||
# To run verification at the end of the flow maintain source in ./SRC directory
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -43,7 +43,7 @@ build_architecture_bitstream --verbose --write_file fabric_independent_bitstream
|
|||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.xml --format xml
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
|
@ -55,7 +55,9 @@ write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --pri
|
|||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_verilog_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --print_top_testbench --print_preconfig_top_testbench --print_simulation_ini ./SimulationDeck/simulation_deck.ini --include_signal_init --support_icarus_simulator --explicit_port_mapping
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --include_signal_init --bitstream fabric_bitstream.bit --default_net_type ${OPENFPGA_VERILOG_DEFAULT_NET_TYPE}
|
||||
write_preconfigured_fabric_wrapper --file ./SRC --support_icarus_simulator --explicit_port_mapping --default_net_type ${OPENFPGA_VERILOG_DEFAULT_NET_TYPE}
|
||||
write_preconfigured_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --explicit_port_mapping --support_icarus_simulator --default_net_type ${OPENFPGA_VERILOG_DEFAULT_NET_TYPE}
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
# Run VPR for the 'and' design
|
||||
#--write_rr_graph example_rr_graph.xml
|
||||
vpr ${VPR_ARCH_FILE} ${VPR_TESTBENCH_BLIF} --clock_modeling route ${OPENFPGA_VPR_DEVICE_LAYOUT}
|
||||
|
||||
# Read OpenFPGA architecture definition
|
||||
read_openfpga_arch -f ${OPENFPGA_ARCH_FILE}
|
||||
|
||||
# Read OpenFPGA simulation settings
|
||||
read_openfpga_simulation_setting -f ${OPENFPGA_SIM_SETTING_FILE}
|
||||
|
||||
# Annotate the OpenFPGA architecture to VPR data base
|
||||
# to debug use --verbose options
|
||||
link_openfpga_arch --activity_file ${ACTIVITY_FILE} --sort_gsb_chan_node_in_edges
|
||||
|
||||
# Check and correct any naming conflicts in the BLIF netlist
|
||||
check_netlist_naming_conflict --fix --report ./netlist_renaming.xml
|
||||
|
||||
# Apply fix-up to clustering nets based on routing results
|
||||
pb_pin_fixup --verbose
|
||||
|
||||
# Apply fix-up to Look-Up Table truth tables based on packing results
|
||||
lut_truth_table_fixup
|
||||
|
||||
# Build the module graph
|
||||
# - Enabled compression on routing architecture modules
|
||||
# - Enable pin duplication on grid modules
|
||||
build_fabric --compress_routing #--verbose
|
||||
|
||||
# Write the fabric hierarchy of module graph to a file
|
||||
# This is used by hierarchical PnR flows
|
||||
write_fabric_hierarchy --file ./fabric_hierarchy.txt
|
||||
|
||||
# Repack the netlist to physical pbs
|
||||
# This must be done before bitstream generator and testbench generation
|
||||
# Strongly recommend it is done after all the fix-up have been applied
|
||||
repack #--verbose
|
||||
|
||||
# Build the bitstream
|
||||
# - Output the fabric-independent bitstream to a file
|
||||
build_architecture_bitstream --verbose --write_file fabric_independent_bitstream.xml
|
||||
|
||||
# Build fabric-dependent bitstream
|
||||
build_fabric_bitstream --verbose
|
||||
|
||||
# Write fabric-dependent bitstream
|
||||
write_fabric_bitstream --file fabric_bitstream.bit --format plain_text ${OPENFPGA_FAST_CONFIGURATION}
|
||||
|
||||
# Write the Verilog netlist for FPGA fabric
|
||||
# - Enable the use of explicit port mapping in Verilog netlist
|
||||
write_fabric_verilog --file ./SRC --explicit_port_mapping --include_timing --print_user_defined_template --verbose
|
||||
|
||||
# Write the Verilog testbench for FPGA fabric
|
||||
# - We suggest the use of same output directory as fabric Verilog netlists
|
||||
# - Must specify the reference benchmark file if you want to output any testbenches
|
||||
# - Enable top-level testbench which is a full verification including programming circuit and core logic of FPGA
|
||||
# - Enable pre-configured top-level testbench which is a fast verification skipping programming phase
|
||||
# - Simulation ini file is optional and is needed only when you need to interface different HDL simulators using openfpga flow-run scripts
|
||||
write_full_testbench --file ./SRC --reference_benchmark_file_path ${REFERENCE_VERILOG_TESTBENCH} --include_signal_init --explicit_port_mapping --bitstream fabric_bitstream.bit ${OPENFPGA_FAST_CONFIGURATION}
|
||||
|
||||
# Write the SDC files for PnR backend
|
||||
# - Turn on every options here
|
||||
write_pnr_sdc --file ./SDC
|
||||
|
||||
# Write SDC to disable timing for configure ports
|
||||
write_sdc_disable_timing_configure_ports --file ./SDC/disable_configure_ports.sdc
|
||||
|
||||
# Write the SDC to run timing analysis for a mapped FPGA fabric
|
||||
write_analysis_sdc --file ./SDC_analysis
|
||||
|
||||
# Finish and exit OpenFPGA
|
||||
exit
|
||||
|
||||
# Note :
|
||||
# To run verification at the end of the flow maintain source in ./SRC directory
|
|
@ -28,3 +28,7 @@ run-task fpga_bitstream/overload_mux_default_path --debug --show_thread_logs
|
|||
|
||||
echo -e "Testing outputting I/O mapping result to file";
|
||||
run-task fpga_bitstream/write_io_mapping --debug --show_thread_logs
|
||||
|
||||
echo -e "Testing report bitstream distribution to file";
|
||||
run-task fpga_bitstream/report_bitstream_distribution/default_depth --debug --show_thread_logs
|
||||
run-task fpga_bitstream/report_bitstream_distribution/custom_depth --debug --show_thread_logs
|
||||
|
|
|
@ -136,9 +136,3 @@ run-task fpga_verilog/fully_connected_output_crossbar --debug --show_thread_logs
|
|||
echo -e "Testing through channels in tileable routing";
|
||||
run-task fpga_verilog/thru_channel/thru_narrow_tile --debug --show_thread_logs
|
||||
run-task fpga_verilog/thru_channel/thru_wide_tile --debug --show_thread_logs
|
||||
|
||||
# Verify MCNC big20 benchmark suite with ModelSim
|
||||
# Please make sure you have ModelSim installed in the environment
|
||||
# Otherwise, it will fail
|
||||
#run-task fpga_verilog/mcnc_big20 --debug --show_thread_logs --maxthreads 20
|
||||
#python3 openfpga_flow/scripts/run_modelsim.py mcnc_big20 --run_sim
|
||||
|
|