From 0854161a63cdce3920b513fd8269632036a6ab32 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Mon, 22 Jul 2019 09:42:31 -0600 Subject: [PATCH 1/4] Docker update --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d59a5ce6..0ed8749c0 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,11 @@ RUN apt-get -y install python3 python3-dev tcl tcl8.6-dev gawk libreadline-dev RUN apt-get -y install autoconf automake bison build-essential cmake ctags curl doxygen flex fontconfig g++-4.9 gcc-4.9 gdb git gtkwave gperf iverilog libffi-dev libcairo2-dev libevent-dev libfontconfig1-dev liblist-moreutils-perl libncurses5-dev libx11-dev libxft-dev libxml++2.6-dev perl texinfo time valgrind zip qt5-default -RUN echo "git clone https://github.com/LNIS-Projects/OpenFPGA.git" >> build.sh -RUN echo "cd OpenFPGA" >> build.sh -RUN echo "mkdir -p build && cd build" >> build.sh -RUN echo "cmake .. -DCMAKE_BUILD_TYPE=debug" >> build.sh -RUN echo "make" >> build.sh -RUN chmod +x build.sh +RUN git clone https://github.com/LNIS-Projects/OpenFPGA.git +RUN cd OpenFPGA +RUN mkdir -p build && cd build +RUN cmake .. -DCMAKE_BUILD_TYPE=debug +RUN make RUN ./build.sh -VOLUME /OpenFPGA + From 52b754f9c12dec69ad27354831e64c5dadb9590c Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Mon, 22 Jul 2019 10:14:03 -0600 Subject: [PATCH 2/4] Update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0ed8749c0..fa8c95d35 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN cmake .. -DCMAKE_BUILD_TYPE=debug RUN make RUN ./build.sh - +WORKDIR /OpenFPGA From 7d469d8b4f692eb3857d89307d75f94e3077121c Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Mon, 22 Jul 2019 13:06:46 -0600 Subject: [PATCH 3/4] Docker try 2 --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa8c95d35..084aba126 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,12 @@ RUN apt-get -y install python3 python3-dev tcl tcl8.6-dev gawk libreadline-dev RUN apt-get -y install autoconf automake bison build-essential cmake ctags curl doxygen flex fontconfig g++-4.9 gcc-4.9 gdb git gtkwave gperf iverilog libffi-dev libcairo2-dev libevent-dev libfontconfig1-dev liblist-moreutils-perl libncurses5-dev libx11-dev libxft-dev libxml++2.6-dev perl texinfo time valgrind zip qt5-default -RUN git clone https://github.com/LNIS-Projects/OpenFPGA.git -RUN cd OpenFPGA -RUN mkdir -p build && cd build -RUN cmake .. -DCMAKE_BUILD_TYPE=debug -RUN make +RUN echo "git clone https://github.com/LNIS-Projects/OpenFPGA.git" >> build.sh +RUN echo "cd OpenFPGA" >> build.sh +RUN echo "mkdir -p build && cd build" >> build.sh +RUN echo "cmake .. -DCMAKE_BUILD_TYPE=debug" >> build.sh +RUN echo "make" >> build.sh +RUN chmod +x build.sh RUN ./build.sh WORKDIR /OpenFPGA From 8a046394f8077d4f75730342fcd0ad7421eaf0c1 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 30 Jul 2019 16:47:41 -0600 Subject: [PATCH 4/4] add documentation for multi-mode configurable block support --- docs/source/arch_lang/index.rst | 2 - .../source/arch_lang/link_circuit_modules.rst | 112 ++++++++++++++---- docs/source/arch_lang/multimode_support.rst | 4 - docs/source/motivation.rst | 6 +- docs/source/z_reference.bib | 15 ++- 5 files changed, 108 insertions(+), 31 deletions(-) delete mode 100644 docs/source/arch_lang/multimode_support.rst diff --git a/docs/source/arch_lang/index.rst b/docs/source/arch_lang/index.rst index c5412a372..bafd8f6e2 100644 --- a/docs/source/arch_lang/index.rst +++ b/docs/source/arch_lang/index.rst @@ -19,6 +19,4 @@ Extended Architecture Description Language link_circuit_modules - .. multimode_support - diff --git a/docs/source/arch_lang/link_circuit_modules.rst b/docs/source/arch_lang/link_circuit_modules.rst index 29362fd9e..fc2a27256 100644 --- a/docs/source/arch_lang/link_circuit_modules.rst +++ b/docs/source/arch_lang/link_circuit_modules.rst @@ -1,6 +1,6 @@ Link circuit modules -------------------- -Each defined SPICE model should be linked to an FPGA module defined in the original part of architecture descriptions. It helps FPGA-SPICE creating the SPICE netlists for logic/routing blocks. Since the original part lacks such support, we create a few XML properties to link to Circuit models. +Each defined circuit model should be linked to an FPGA module defined in the original part of architecture descriptions. It helps FPGA-circuit creating the circuit netlists for logic/routing blocks. Since the original part lacks such support, we create a few XML properties to link to Circuit models. SRAM ==== @@ -30,7 +30,7 @@ To link the defined circuit model of SRAM into the FPGA architecture description Example of a memory organization using memory decoders -.. note:: Currently SPICE only supports standalone memory organization. +.. note:: Currently circuit only supports standalone memory organization. .. note:: Currently RRAM-based FPGA only supports memory-bank organization for Verilog Generator. @@ -45,7 +45,7 @@ Switch Boxes ============= Original VPR architecture description contains an XML node called switchlist under which all the multiplexers of switch blocks are described. -To link a defined SPICE model to a multiplexer in the switch blocks, a new XML property circuit_model_name should be added to the descriptions. +To link a defined circuit model to a multiplexer in the switch blocks, a new XML property circuit_model_name should be added to the descriptions. Here is an example: @@ -59,10 +59,10 @@ Here is an example: Connection Blocks -================ +================== -To link the defined SPICE model of the multiplexer to the Connection Blocks, a circuit_model_name should be added to the definition of Connection Blocks switches. However, the original architecture descriptions do not offer a switch description for connection boxes as they do for the switch blocks. -Therefore, FPGA-SPICE requires a new XML node called **cblock** under the root XML node architecture, where a switch for connection blocks can be defined. +To link the defined circuit model of the multiplexer to the Connection Blocks, a circuit_model_name should be added to the definition of Connection Blocks switches. However, the original architecture descriptions do not offer a switch description for connection boxes as they do for the switch blocks. +Therefore, FPGA-circuit requires a new XML node called **cblock** under the root XML node architecture, where a switch for connection blocks can be defined. Here is the example: @@ -87,30 +87,98 @@ Similar to the Switch Boxes and Connection Blocks, the channel wire segments in * circuit_model_name: should match a circuit model whose type is chan_wire defined under module_circuit_models. -Primitive Blocks inside Configurable Logic Blocks -================================================= +Primitive Blocks inside Multi-mode Configurable Logic Blocks +============================================================= -The architecture description employs a hierarchy of pb_types to depict the sub-modules and complex interconnections inside logic blocks. Each leaf node and interconnection in the pb_type hierarchy should be linked to a circuit model. +The architecture description employs a hierarchy of ``pb_types`` to depict the sub-modules and complex interconnections inside logic blocks. Each leaf node and interconnection in the pb_type hierarchy should be linked to a circuit model. +Each primitive block, i.e., the leaf ``pb_types``, should be linked to a valid circuit model, using the XML syntax ``circuit_model_name``. +The ``circuit_model_name`` should match the given name of a ``circuit_model`` defined by users. .. code-block:: xml - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -* **circuit_model_name:** should match a SPICE model defined under module_circuit_models. For the interconnection type direct, the type of the linked SPICE model should be wire. For mux, the type of linked SPICE model should be mux. For complete, the type of the linked SPICE model can be either mux or wire, depending on the case. +* **physical_mode_name:** tell the name of the mode that describes the physical implementation of the configurable block. This is critical in modeling actual circuit designs and architecture of an FPGA. Typically, only one physical_mode should be specified for each multi-mode ``pb_type``. -* **idle_mode_name:** tell the name of the mode that the pb_type is configured to be by default. This is critical in building SPICE netlists for unused logic blocks. +* **idle_mode_name:** tell the name of the mode that the ``pb_type`` is configured to be by default. This is critical in building circuit netlists for unused logic blocks. -* **physical_mode_name:** tell the name of the mode that describes the physical implementation of the block. This is critical in modeling actual circuit designs and architecture of an FPGA. +* **circuit_model_name:** should match a circuit model defined under ``module_circuit_models``. The ``circuit_model_name`` is mandatory for every leaf ``pb_type`` in a physical_mode ``pb_type``. For the interconnection type direct, the type of the linked circuit model should be wire. For multiplexers, the type of linked circuit model should be ``mux``. For complete, the type of the linked circuit model can be either ``mux`` or ``wire``, depending on the case. + +* **mode_bits** specifies the configuration bits for the ``circuit_model`` when operating at an operating mode. The length of ``mode_bits`` should match the ``port`` size defined in ``circuit_model``. The ``mode_bits`` should be derived from circuit designs while users are responsible for its correctness. FPGA-Bitstreamm will add the ``mode_bits`` during bitstream generation. + +* **physical_pb_type_name** creates the link on ``pb_type`` between operating and physical modes. This syntax is mandatory for every leaf ``pb_type`` in an operating mode ``pb_type``. It should be a valid name of leaf ``pb_type`` in physical mode. + +* **physical_pb_type_index_factor** aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be multipled by the given factor. + +* **physical_pb_type_index_offset** aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be shifted by the given factor. + +* **physical_mode_pin** creates the linke on ``port`` of ``pb_type`` between operating and physical modes. This syntax is mandatory for every leaf ``pb_type`` in an operating mode ``pb_type``. It should be a valid ``port`` name of leaf ``pb_type`` in physical mode and the port size should also match. + +* **physical_mode_pin_rotate_offset** aims to align the pin indices for ``port`` of ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_mode_pin_rotate_offset`` is larger than zero, the pin index of ``pb_type`` (whose index is large than 1) will be shifted by the given offset. + +.. note:: + It is highly recommended that only one physical mode is defined for a multi-mode configurable block. Try not to use nested physical mode definition. This will ease the debugging and lead to clean XML description. + +.. note:: + Be careful in using ``physical_pb_type_index_factor``, ``physical_pb_type_index_offset`` and ``physical_mode_pin_rotate_offset``! Try to avoid using them unless for highly complex configuration blocks with very deep hierarchy. diff --git a/docs/source/arch_lang/multimode_support.rst b/docs/source/arch_lang/multimode_support.rst deleted file mode 100644 index de12a8c1b..000000000 --- a/docs/source/arch_lang/multimode_support.rst +++ /dev/null @@ -1,4 +0,0 @@ -Modeling Physical Design of Multi-mode Configurable Logic Block Architectures -============================================================================= - -Under construction diff --git a/docs/source/motivation.rst b/docs/source/motivation.rst index 960079773..1ac7ec214 100644 --- a/docs/source/motivation.rst +++ b/docs/source/motivation.rst @@ -15,7 +15,7 @@ In this manual, we will introduce how to use FPGA-SPICE to conduct an accurate p In the appendix, we introduce the hierarchy of the generated SPICE netlists and testbenches, to help you customize the SPICE netlists. We also attach an example of an architecture XML file for your interest. -The technical details can be found in our ICCD’15 paper :cite:`XTang_ICCD_2015`. +The technical details can be found in our ICCD’15 paper :cite:`XTang_ICCD_2015` and TVLSI'19 paper :cite:`XTang_TVLSI_2019`. FPGA-Verilog ------------ @@ -24,7 +24,9 @@ On a second note, it is becoming more and more necessary to have fast access to This motivates us to generate the Verilog code of the architecture to enable a second level of research concerning the architectures to be explored. This Verilog code encompasses the whole design and is divided into multiple sub-directories for targetted analysis or a global one. This is left to the choice of the user. -In this manual, we present FPGA-Verilog. This extension enables the generation of a fully functional Verilog code enabling a deeper understanding of the architectures of the FPGAs. We introduce different options to this module to do the verification of the system. This will be presented in more depth in the FPGA-Bitstream section +In this manual, we present FPGA-Verilog. This extension enables the generation of a fully functional Verilog code enabling a deeper understanding of the architectures of the FPGAs. We introduce different options to this module to do the verification of the system. This will be presented in more depth in the FPGA-Bitstream section. + +The technical details can be found in our TVLSI'19 paper :cite:`XTang_TVLSI_2019`. FPGA-Bitstream -------------- diff --git a/docs/source/z_reference.bib b/docs/source/z_reference.bib index 6f7d2995c..4dd51edf4 100644 --- a/docs/source/z_reference.bib +++ b/docs/source/z_reference.bib @@ -38,7 +38,7 @@ month={Sept},} @article{XTang_TCAS1_2016, title={{A Study on the Programming Structures for RRAM-based FPGA Architectures}}, - author={Tang, Xifan and Kim, Gain and Gaillardon, Pierre-Emmanuel and De Micheli, Giovanni}, + author={X. Tang and Kim, Gain and Gaillardon, Pierre-Emmanuel and De Micheli, Giovanni}, journal={IEEE Transactions on Circuits and Systems I: Regular Papers}, volume={63}, number={4}, @@ -106,3 +106,16 @@ month={Sept},} address = {New York, NY, USA}, keywords = {CAD, FPGA, architecture}, } + +@ARTICLE{XTang_TVLSI_2019, + author={X. Tang and E. Giacomin and G. D. Micheli and P. Gaillardon}, + journal={{IEEE Transactions on Very Large Scale Integration (VLSI) Systems}}, + title={{FPGA-SPICE: A Simulation-Based Architecture Evaluation Framework for FPGAs}}, + year={2019}, + volume={27}, + number={3}, + pages={637-650}, + doi={10.1109/TVLSI.2018.2883923}, + ISSN={1063-8210}, + month={March}, +}