From 61026dc623d59a8ea873597a96ebfd7d61237f8c Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 16 Jul 2019 16:58:11 -0400 Subject: [PATCH 01/23] Update building.md --- tutorials/building.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/building.md b/tutorials/building.md index bc7bc28a9..7525493a4 100644 --- a/tutorials/building.md +++ b/tutorials/building.md @@ -1,8 +1,8 @@ # How to build? -## Dependancies +## Dependencies -OpenFPGA requires all the dependancies listed below: +OpenFPGA requires all the following dependencies: - autoconf - automake - bash @@ -40,18 +40,18 @@ OpenFPGA requires all the dependancies listed below: ## Docker -If all these dependancies are not installed in your machine you can choose to use a Docker (docker tool need to be installed). To ease customer first experience a Dockerfile is provided in OpenFPGA folder. A container ready to use can be created with the following command: +If all these dependancies are not installed on your machine, you can choose to use a Docker (the Docker tool needs to be installed). To ease customer first experience, a Dockerfile is provided in the OpenFPGA folder. A container ready to use can be created with the following command: - docker run lnis/open_fpga:release
*Warning: This command is for quick testing. If you want to conserve your work you should certainly use other options as "-v".* -Or a container where you can build OpenFPGA yourself can be created with the following commands: +Otherwise, a container where you can build OpenFPGA yourself can be created with the following commands: - docker build . -t open_fpga - docker run -it --rm -v $PWD:/localfile/OpenFPGA -w="/localfile/OpenFPGA" open_fpga bash
[*docker download link*](https://www.docker.com/products/docker-desktop) ## Building -To build the tool you have to be in OpenFPGA folder and do: +To build the tool you have to go in OpenFPGA folder and do: - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=debug - make (*WARNING using docker you cannot use "make -j", errors will happen*) From 938f2ec68cac4b70b98b6fad357e388b6d579c54 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 16:30:00 -0600 Subject: [PATCH 02/23] Update Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bcaff4c35..ac3170257 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,7 @@ 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 mkdir -p build +RUN cd build +RUN cmake .. -DCMAKE_BUILD_TYPE=debug +RUN make From 1822e2059a6656ced79988fb2b2e7af004152f3f Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 19:32:06 -0600 Subject: [PATCH 03/23] Docker building test --- Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac3170257..f233dc2b1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +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 mkdir -p build -RUN cd build -RUN cmake .. -DCMAKE_BUILD_TYPE=debug -RUN make +RUN git clone https://github.com/LNIS-Projects/OpenFPGA.git + +RUN cd OpenFPGA + +RUN echo "mkdir -p build && build" >> build.sh +RUN echo "cmake .. -DCMAKE_BUILD_TYPE=debug" >> build.sh +RUN echo "make" >> build.sh +RUN chmod +x build.sh +ENTRYPOINT ["bin/sh", "/build.sh"] From 31e6ee3ee100f2acd58222f9fe53d84f5dc74252 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 19:47:53 -0600 Subject: [PATCH 04/23] Docker test 2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f233dc2b1..cc6cf46c2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN echo "mkdir -p build && build" >> build.sh RUN echo "cmake .. -DCMAKE_BUILD_TYPE=debug" >> build.sh RUN echo "make" >> build.sh RUN chmod +x build.sh -ENTRYPOINT ["bin/sh", "/build.sh"] +RUN build.sh From b31fb0ab83254a8120b8d2673fe8d2c93bb700fb Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 19:56:13 -0600 Subject: [PATCH 05/23] Docker test 2.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cc6cf46c2..accbeba28 100755 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN echo "mkdir -p build && 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 +RUN ./build.sh From ca2c840e1ec9b98d9e22189c68a408b15e73f998 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 20:04:04 -0600 Subject: [PATCH 06/23] Docker test 2.2 --- Dockerfile | 2 +- README.md | 1 - compilation/dependencies.md | 15 ----------- compilation/macos_compilation.md | 40 ------------------------------ compilation/red_hat_compilation.md | 40 ------------------------------ compilation/ubuntu_compilation.md | 37 --------------------------- 6 files changed, 1 insertion(+), 134 deletions(-) delete mode 100644 compilation/dependencies.md delete mode 100644 compilation/macos_compilation.md delete mode 100644 compilation/red_hat_compilation.md delete mode 100644 compilation/ubuntu_compilation.md diff --git a/Dockerfile b/Dockerfile index accbeba28..c157844ff 100755 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN git clone https://github.com/LNIS-Projects/OpenFPGA.git RUN cd OpenFPGA -RUN echo "mkdir -p build && build" >> 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 diff --git a/README.md b/README.md index 54247b5fd..f351a0f98 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ The OpenFPGA framework is the **first open-source FPGA IP generator** supporting ## Compilation -The different ways of compiling can be found in the [**./compilation**](https://github.com/LNIS-Projects/OpenFPGA/tree/master/compilation) folder.
Dependancies and help using docker can be found at [**./tutorials/building.md**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md). **Compilation steps:** diff --git a/compilation/dependencies.md b/compilation/dependencies.md deleted file mode 100644 index 914b18bc2..000000000 --- a/compilation/dependencies.md +++ /dev/null @@ -1,15 +0,0 @@ -Yosys -========= - -*Information taken from Yosys' GitHub* -You need a C++ compiler with C++11 support (up-to-date CLANG or GCC is recommended) and some standard tools such as GNU Flex, GNU Bison, and GNU Make. TCL, readline and libffi are optional (see ENABLE_* settings in Makefile). Xdot (graphviz) is used by the show command in yosys to display schematics. - -ABC -========= - -ABC depends on gcc-4.9. It is precisely this version which is required. If another gcc is used, the compilation will not be finished correctly. - -ACE2 -========= - -ACE2 only needs a compiler to work. Gcc is the one chosen in this case. No issue was ever reported with ACE2 so if you have one, raise an issue so that we can modify it here. diff --git a/compilation/macos_compilation.md b/compilation/macos_compilation.md deleted file mode 100644 index c5de47da7..000000000 --- a/compilation/macos_compilation.md +++ /dev/null @@ -1,40 +0,0 @@ -MacOS compilation -================== - -*This tutorial has been tested under MacOS High Sierra 10.13.4* - -Clone the [OpenFPGA git repository:](https://github.com/LNIS-Projects/OpenFPGA) - -`git clone --recurse-submodules https://github.com/LNIS-Projects/OpenFPGA.git ` - -[//todo]: # (There is a submodule in the repository so move to the OpenFPGA directory and clone that too:) - -[//]: # (`git submodule init`) - -[//todo]: # (`git submodule update`) - -Go to the `VPR` directory and build the tool: - -`cd ./OpenFPGA/vpr7_x2p/vpr/` - -Note: the graphical interface might not be usable since it requires the X11 library. In this case, open the Makefile and change the line 10 "ENABLE_GRAPHICS = true" to false. - -`make ` - -This will generate vpr and a libvpr.a file. - -Enhancements of VPR were made. -In order to see them just type: - -`./vpr` - -This will show the different options that can be used. Our modifications concern the options starting with fpga_spice and fpga_verilog. - -A script is already prepared in the folder to test FPGA-SPICE and FPGA-Verilog - -`source ./go_fpga_verilog.sh` - -This script uses the enhanced version of vpr with some new options such as --fpga_verilog_print_top_testbench which automatically generates a testbench for the full FPGA and --fpga_verilog_dir which allows us to choose the destination directory for the verilog output we generate. -For more informations on how the new commands work, please visit [OpenFPGA Options FPGA-SPICE](https://openfpga.readthedocs.io/en/latest/fpga_spice/command_line_usage.html). - -As a result, we get a new folder, /verilog_test, which contains the verilog code. The name_top.v contains the full FPGA we just created. Three other folders are created, *lb*, *routing* and *sub_modules*. *lb* contains the different CLBs used in the architecture. *routing* contains the different connection blocks, the switch boxes and the wires. *sub_modules* contains the different modules needed in the architecture. diff --git a/compilation/red_hat_compilation.md b/compilation/red_hat_compilation.md deleted file mode 100644 index 2fc0c14fd..000000000 --- a/compilation/red_hat_compilation.md +++ /dev/null @@ -1,40 +0,0 @@ -Red Hat compilation -================== - -*This tutorial has been tested under Red Hat 7.5* - -Clone the [OpenFPGA git repository:](https://github.com/LNIS-Projects/OpenFPGA) - -`git clone --recurse-submodules https://github.com/LNIS-Projects/OpenFPGA.git ` - -[//todo]: # (There is a submodule in the repository so move to the OpenFPGA directory and clone that too:) - -[//]: # (`git submodule init`) - -[//todo]: # (`git submodule update`) - -Go to the `VPR` directory and build the tool: - -`cd ./OpenFPGA/vpr7_x2p/vpr/` - -Note: the graphical interface might not be usable since it requires the X11 library. In this case, open the Makefile and change the line 10 "ENABLE_GRAPHICS = true" to false. - -`make ` - -This will generate vpr and a libvpr.a file. - -Enhancements of VPR were made. -In order to see them just type: - -`./vpr` - -This will show the different options that can be used. Our modifications concern the options starting with fpga_spice and fpga_verilog. - -A script is already prepared in the folder to test FPGA-SPICE and FPGA-Verilog - -`source ./go_fpga_verilog.sh` - -This script uses the enhanced version of vpr with some new options such as --fpga_verilog_print_top_testbench which automatically generates a testbench for the full FPGA and --fpga_verilog_dir which allows us to choose the destination directory for the verilog output we generate. -For more informations on how the new commands work, please visit [OpenFPGA Options FPGA-SPICE](https://openfpga.readthedocs.io/en/latest/fpga_spice/command_line_usage.html). - -As a result, we get a new folder, /verilog_test, which contains the verilog code. The name_top.v contains the full FPGA we just created. Three other folders are created, *lb*, *routing* and *sub_modules*. *lb* contains the different CLBs used in the architecture. *routing* contains the different connection blocks, the switch boxes and the wires. *sub_modules* contains the different modules needed in the architecture. diff --git a/compilation/ubuntu_compilation.md b/compilation/ubuntu_compilation.md deleted file mode 100644 index 63bb79ca3..000000000 --- a/compilation/ubuntu_compilation.md +++ /dev/null @@ -1,37 +0,0 @@ -Ubuntu compilation -================== - -*This tutorial has been tested under Ubuntu 18.04* - -Clone the [OpenFPGA git repository:](https://github.com/LNIS-Projects/OpenFPGA) - -`git clone --recurse-submodules https://github.com/LNIS-Projects/OpenFPGA.git ` - -[//todo]: # (There is a submodule in the repository so move to the OpenFPGA directory and clone that too:) - -[//]: # (`git submodule init`) - -[//todo]: # (`git submodule update`) - -Go to the `VPR` directory and build the tool: - -`cd ./OpenFPGA/vpr7_x2p/vpr/` -`make ` - -This will generate vpr and a libvpr.a file. - -Enhancements of VPR were made. -In order to see them just type: - -`./vpr` - -This will show the different options that can be used. Our modifications concern the options starting with fpga_spice and fpga_verilog. - -A script is already prepared in the folder to test FPGA-SPICE and FPGA-Verilog - -`source ./go_fpga_verilog.sh` - -This script uses the enhanced version of vpr with some new options such as --fpga_verilog_print_top_testbench which automatically generates a testbench for the full FPGA and --fpga_verilog_dir which allows us to choose the destination directory for the verilog output we generate. -For more informations on how the new commands work, please visit [OpenFPGA Options FPGA-SPICE](https://openfpga.readthedocs.io/en/latest/fpga_spice/command_line_usage.html). - -As a result, we get a new folder, /verilog_test, which contains the verilog code. The name_top.v contains the full FPGA we just created. Three other folders are created, *lb*, *routing* and *sub_modules*. *lb* contains the different CLBs used in the architecture. *routing* contains the different connection blocks, the switch boxes and the wires. *sub_modules* contains the different modules needed in the architecture. From 5b8eaab93f11547e589728c6bc530373688a26a6 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Tue, 16 Jul 2019 20:13:46 -0600 Subject: [PATCH 07/23] Docker test 2.3 --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c157844ff..e924d37ba 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,8 @@ 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 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 From f10bce826aec6343845d32da1e069866879f830e Mon Sep 17 00:00:00 2001 From: egiacomin Date: Wed, 17 Jul 2019 12:07:40 -0600 Subject: [PATCH 08/23] Update README.md --- README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8d8b479fc..0e0d91c0d 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,30 @@ # Getting Started with OpenFPGA - [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) ## Introduction - The OpenFPGA framework is the **first open-source FPGA IP generator** supporting highly-customizable homogeneous FPGA architectures. OpenFPGA provides a full set of EDA support for customized FPGAs, including Verilog-to-bitstream generation and self-testing verification testbenches/scripts. OpenFPGA opens the door to democratizing FPGA technology and EDA techniques, with agile prototyping approaches and constantly evolving EDA tools for chip designers and researchers.
## Compilation - Dependencies and help using docker can be found at [**./tutorials/building.md**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md). -**Compilation steps:** -1. git clone https://github.com/LNIS-Projects/OpenFPGA.git && cd OpenFPGA # *Clone the repository and go into it* -2. mkdir build && cd build # *Create a folder named build in OpenPFGA repository* -3. cmake .. -DCMAKE_BUILD_TYPE=debug # *Create Makefile in this folder using cmake* +**Compilation Steps:** +1. git clone https://github.com/LNIS-Projects/OpenFPGA.git && cd OpenFPGA # *Clone the repository and go inside it* +2. mkdir build && cd build # *Create a folder named build in the OpenPFGA repository* +3. cmake .. -DCMAKE_BUILD_TYPE=debug # *Create a Makefile in this folder using cmake* 4. make # *Compile the tool and its dependencies* *We currently implemented OpenFPGA for:*
*1. Ubuntu 16.04*
*2. Red Hat 7.5*
*3. MacOS Mojave 10.13.4*

-*Please note that those were the versions we tested the software for. It might work with earlier versions and other distributions.* +*Please note that those were the versions for which the tool was tested. It might work with earlier versions and other distributions.* ## Documentation OpenFPGA's [full documentation](https://openfpga.readthedocs.io/en/master/) includes tutorials, descriptions of the design flow, and tool options. -## Tutorial - -You can find in the folder [**./tutorials**](https://github.com/LNIS-Projects/OpenFPGA/tree/master/tutorials). This will help you get in touch with the software and test different configurations to see how OpenFPGA reacts to them. - -Through this tutorial users can learn how to use the flow and set the dependancies.
-The [tutorial index](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/tutorial_index.md) will guide you through trainings and explain folder oraganization as well as referencing tips and used keywords. +## Tutorials +You can find some tutorials in the [**./tutorials**](https://github.com/LNIS-Projects/OpenFPGA/tree/master/tutorials) folder. This will help you get more familiar with the tool and use OpenFPGA under different configurations. +Through those tutorials, users can learn how to use the flow and install the different dependencies.
+The [tutorial index](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/tutorial_index.md) will guide you through training and explain the folder oraganization as well as introducing some tips and commonly used keywords. From 95b56f31d7e8a0a7263b07f632f58a44fda8c3ce Mon Sep 17 00:00:00 2001 From: egiacomin Date: Wed, 17 Jul 2019 12:11:38 -0600 Subject: [PATCH 09/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e0d91c0d..6d2f25e13 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Dependencies and help using docker can be found at [**./tutorials/building.md**] *We currently implemented OpenFPGA for:*
*1. Ubuntu 16.04*
*2. Red Hat 7.5*
-*3. MacOS Mojave 10.13.4*

+*3. MacOS Mojave 10.14.4*

*Please note that those were the versions for which the tool was tested. It might work with earlier versions and other distributions.* ## Documentation From 1da04b9c3a960805fe134e2726fe5a9bdcf31699 Mon Sep 17 00:00:00 2001 From: egiacomin Date: Wed, 17 Jul 2019 12:19:57 -0600 Subject: [PATCH 10/23] Update tutorial_index.md --- tutorials/tutorial_index.md | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/tutorials/tutorial_index.md b/tutorials/tutorial_index.md index 8198fb6da..bbf95ff86 100644 --- a/tutorials/tutorial_index.md +++ b/tutorials/tutorial_index.md @@ -1,26 +1,20 @@ -# Tutorial introduction - -OpenFPGA an IP Verilog Generator allowing reliable and fast testing of homogeneous architectures.
-Its main goal is to easily and efficiently generated a complete customizable FPGA. It uses a semi-custom design technic.

-These tutorials are organized as follow: -* [Building the tool and his dependancies](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md) +# Tutorial Introduction +OpenFPGA is an IP Verilog Generator allowing reliable and fast testing of homogeneous FPGA architectures.
+Its main goal is to easily and efficiently generated a complete customizable FPGA and uses a semi-custom design flow.

+In order to help you get in touch with the software, we provide few tutorials which are organized as follow: +* [Building the tool and his dependencies](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md) * [Launching the flow and understand how it works](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/fpga_flow/how2use.md) * Architecture modification -## Folder organization - +## Folder Organization OpenFPGA repository is organized as follow: * **abc**: open source synthesys tool * **ace2**: abc extension generating .act files +* **ace2**: abc extension generating activity files (.act) * **vpr7_x2p**: sources of modified vpr * **yosys**: opensource synthesys tool * **fpga_flow**: scripts and dependencies to run the complete flow -## Tips and informations - -Some keywords will be used during this tutorial: +## Tips and Information +Some keywords will be used during in the tutorials: * OPENFPGAPATHKEYWORD: refers to OpenFPGA folder full path - - - - From 59478187619caaffd78b2c9f8b20e13711d30074 Mon Sep 17 00:00:00 2001 From: AurelienUoU Date: Wed, 17 Jul 2019 12:23:06 -0600 Subject: [PATCH 11/23] Typo correction --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index e6b29cd3b..d5f2c1981 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ The OpenFPGA framework is the **first open-source FPGA IP generator** supporting ## Compilation -<<<<<<< HEAD Dependancies and help using docker can be found at [**./tutorials/building.md**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md). -======= -Dependencies and help using docker can be found at [**./tutorials/building.md**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/building.md). ->>>>>>> dev **Compilation steps:** 1. git clone https://github.com/LNIS-Projects/OpenFPGA.git && cd OpenFPGA # *Clone the repository and go into it* From 922e40131fbf41638fe370da45ce751c69d92bc1 Mon Sep 17 00:00:00 2001 From: egiacomin Date: Wed, 17 Jul 2019 12:33:15 -0600 Subject: [PATCH 12/23] Update how2use.md --- tutorials/fpga_flow/how2use.md | 58 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/tutorials/fpga_flow/how2use.md b/tutorials/fpga_flow/how2use.md index 0bbe343a0..905adb5d1 100644 --- a/tutorials/fpga_flow/how2use.md +++ b/tutorials/fpga_flow/how2use.md @@ -1,36 +1,31 @@ -# FPGA flow - -This tutorial will help the user to understand how to use OpenFPGA flow.
-During this tutorial we consider the user start in the OpenFPGA folder and we'll use tips and informations provided in [tutorial index](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/tutorial_index.md#tips-and-informations). Details on how the folder is organized are available [here](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/fpga_flow/folder_organization.md). +# FPGA Flow +This tutorial will help the user to understand how to use the OpenFPGA flow.
+During this tutorial, we consider that the user starts in the OpenFPGA folder and we will use tips and information provided in [tutorial index](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/tutorial_index.md#tips-and-informations). Details on how the folder is organized are available [here](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/fpga_flow/folder_organization.md). ## Running fpga_flow.pl - A script example can be found at OPENFPGAPATHKEYWORD/fpga_flow/tuto_fpga_flow.sh. ### Experiment - cd fpga_flow
./tuto_fpga_flow.sh
### Explanation +The *fpga_flow.pl* script takes an architecture description file (.xml), generates its netlists and generates a bitstream to implement a benchmark on the FPGA fabric and verifis its correct implementation.
+When you open the perl script, you can see that 2 scripts are called. The first one is **rewrite_path_in_file.pl** which allows us to make this tutorial generic by generating full path to the dependencies.
+The second one is **fpga_flow.pl**. This script launches the OpenFPGA flow and can be used with many different [options](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/fpga_flow/options.md).
+There are 3 important things to observe here: +- All the FPGA-Verilog options have been activated +- fpga_flow.pl calls a configuration file through the "config_file" variable +- fpga_flow.pl calls a list of benchmark to be implemented and tested through the "bench_txt" variable -By running this script we took an architecture description file, generated its netlist, generated a bitstream to implement a benchmark on it and verified this implementation.
-When you open this file you can see that 2 scripts are called. The first one is **rewrite_path_in_file.pl** which allow us to make this tutorial generic by generating full path to dependancies.
-The second one is **fpga_flow.pl**. This script launch OpenFPGA flow and can be used with a lot of [options](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/fpga_flow/options.md).
-There is 3 important things to see: -- All FPGA-Verilog options have been activated -- fpga_flow.pl calls a configuration file through "config_file" variable -- fpga_flow.pl calls a list of benchmark to implement and test through "bench_txt" variable - -### Configuration file - -In this file paths have to be full path. Relative path could lead to errors.
+### Configuration File +In this file, paths have to be defined as **absolute** paths as relative paths could lead to errors.
The file is organized in 3 parts: -* **dir_path**: provides all the tools and repository path -* **flow_conf**: provides information on how the flow run -* **csv_tags**: *to complete* +* **dir_path**: provides all the tool and repository paths +* **flow_conf**: provides information on how the flow runs +* **csv_tags**: *to be completed* -While empty the file is as follow: +When empty, the file is as follow: [dir_path]
script_base = OPENFPGAPATHKEYWORD/fpga_flow/scripts
@@ -64,33 +59,30 @@ vpr_power_tags = PB Types|Routing|Switch Box|Connection Box|Primitives|Interc St *This example file can be found at OPENFPGAPATHKEYWORD/fpga_flow/configs/tutorial/tuto.conf* -### Benchmark list - +### Benchmark List The benchmark folder contains 3 sub-folders: * **Blif**: contains .blif and .act of benchmarks * **List**: contains all benchmark list files * **Verilog**: contains Verilog designs -Blif and Verilog folders are organized by folders with the name of projects. **Folder, top module and top module file must share the same name.**
-The benchmark list file can contain as many benchmarks as available in the same folder targetted by "benchmark_dir" variable from the configuration file. It's written as:
+Blif and Verilog folders are organized by folders using the name of the projects. **The folder, top module and top module file must share the same name.**
+The benchmark list file can contain as many benchmarks as available in the same folder targetted by the "benchmark_dir" variable from the configuration file. It's written as:
top_module/*.v,; where is the number of channel/wire between each block. *This example file can be found at OPENFPGAPATHKEYWORD/fpga_flow/benchmarks/List/tuto_benchmark.txt* -## Modifying flow -Once dependancies are understood, we can modify the flow by changing the architecture and the route channel width. +## Modifying the Flow +Once the dependencies are understood, the flow can be modified by changing the architecture file and the route channel width. ### Experiment - * cd OPENFPGAPATHKEYWORD/fpga_flow/configs/tutorial -* replace the architectures "k6_N10_sram_chain_HC_template.xml" and "k6_N10_sram_chain_HC.xml" respectively with "k8_N10_sram_chain_FC_template.xml" and "k8_N10_sram_chain_FC.xml" in tuto.conf +* replace the architecture "k6_N10_sram_chain_HC_template.xml" and "k6_N10_sram_chain_HC.xml" respectively with "k8_N10_sram_chain_FC_template.xml" and "k8_N10_sram_chain_FC.xml" in tuto.conf * cd OPENFPGAPATHKEYWORD/fpga_flow/benchmarks/List * replace "200" with "300" in tuto_benchmark.txt * cd OPENFPGAPATHKEYWORD/fpga_flow -* replace the architectures "k6_N10_sram_chain_HC_template.xml" and "k6_N10_sram_chain_HC.xml" respectively with "k8_N10_sram_chain_FC_template.xml" and "k8_N10_sram_chain_FC.xml" in tuto_fpga_flow.sh +* replace the architecture "k6_N10_sram_chain_HC_template.xml" and "k6_N10_sram_chain_HC.xml" respectively with "k8_N10_sram_chain_FC_template.xml" and "k8_N10_sram_chain_FC.xml" in tuto_fpga_flow.sh * ./tuto_fpga_flow.sh -### Explanation - -With this last experiment we replace the [**K6 architecture**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/images/architectures_schematics/frac_lut6.pdf) with a [**K8 architecture**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/images/architectures_schematics/frac_lut8.pdf), which means a 8-inputs fracturable LUT (implemented by LUT6 and LUT4 with 2 shared inputs). This architecture provides more modes for the CLB and the crossbar changed from a half-connected to a fully connected, implying bigger multiplexor between the CLB and LUT inputs. These requirement in term of interconnection will lead to the increase in routing channel width. Indeed, if the routing channel is to low, it could be impossible to route a benchmark or the FPGA output can be delayed. +### Explanations +With this last experiment, the [**K6 architecture**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/images/architectures_schematics/frac_lut6.pdf) was replaced by a [**K8 architecture**](https://github.com/LNIS-Projects/OpenFPGA/blob/master/tutorials/images/architectures_schematics/frac_lut8.pdf), which means that an 8-input fracturable LUT (implemented by LUT6 and LUT4 with 2 shared inputs) is used. This architecture provides more modes for the CLB and the crossbar which is changed from a half-connected to a fully connected, implying bigger multiplexors between the CLB and LUT inputs. These requirements in term of interconnection will lead an increase in the routing channel width. Indeed, if the routing channel is too low, it could be impossible to route a benchmark or the FPGA output could be delayed. From e7b40f06b0266cca5e9f08897d0ea6a5ecae5eb1 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 15:21:07 -0400 Subject: [PATCH 13/23] Add documentation for fracturable LUTs --- .../arch_lang/circuit_model_examples.rst | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/docs/source/arch_lang/circuit_model_examples.rst b/docs/source/arch_lang/circuit_model_examples.rst index 4063d2b4e..dd86441e1 100644 --- a/docs/source/arch_lang/circuit_model_examples.rst +++ b/docs/source/arch_lang/circuit_model_examples.rst @@ -215,6 +215,24 @@ SRAMs .. note:: The support SRAM modules should have a BL and a WL when the memory-bank-style configuration circuit is declared. Note that the WL should be the write/read enable signal, while BL is the data input. +Logic gates +----- + +.. code-block:: xml + + + + + + + + + +.. note:: The circuit model in the type of gate aims to support direct mapping to standard cells or customized cells provided by technology vendors or users. + +.. note:: The logic functionality of a gate can be defined through the XML keyword topology. Currently, OpenFPGA supports AND, OR and MUX2 gates. As for standard cells, the size of each port is limited to 1. Currently, only 2-input and single-output logic gates are supported. + +.. note:: It may happen that the port sequence in generated Verilog netlists has conflicts with the port sequence in standard and customized cells. To avoid this, users can set the XML keyword dump_explicit_port_map to be true, which enables explicit port mapping are dumped. Users can specify the pin/port name in the standard cell library using the XML keyword lib_name. Multiplexers ------------ @@ -319,14 +337,16 @@ Look-Up Tables .. code-block:: xml - - + + + + - - - + + + .. note:: The SPICE netlists of LUT can be auto-generated or customized. @@ -335,7 +355,13 @@ Look-Up Tables Additional design parameters for LUTs: -* **lut_input_buffer:** Specify the buffer for the inputs of a LUT (gates of the internal multiplexer). +* **lut_input_buffer:** Define transistor-level description for the buffer for the inputs of a LUT (gates of the internal multiplexer). Use keyword circuit_model_name to specify the circuit_model that containing details of the circuit. + +* **lut_input_inverter:** Define transistor-level description for the inverter for the inputs of a LUT (gates of the internal multiplexer). Use keyword circuit_model_name to specify the circuit_model that containing details of the circuit. + + +* **lut_intermediate_buffer:** Define transistor-level description for the buffer locating at intermediate stages of internal multiplexer of a LUT. Use keyword circuit_model_name to specify the circuit_model that containing details of the circuit. To customize the location, users can define an integer array in the XML keyword location_map. For example, "-1-1-" indicates buffer inseration to every two stages of the LUT multiplexer tree, considering a 6-input LUT. + Instructions of defining design parameters: @@ -343,7 +369,9 @@ Instructions of defining design parameters: * **pass_gate_logic:** Specify the pass-gates of the internal multiplexer, the same as the multiplexers. -* **port:** three types of ports (input, output and sram) should be defined. If the user provides an customized SPICE netlist, the bandwidth of ports should be defined to the same as the SPICE netlist. +* **port:** three types of ports (input, output and sram) should be defined. If the user provides an customized SPICE netlist, the bandwidth of ports should be defined to the same as the SPICE netlist. To support customizable LUTs, each type of port contain special keywords. For input ports, the keyword tri_state_map aims to customize which inputs are fixed to constant values when the LUT is in fracturable modes. For example, tri_state_map="----11" indicates that the last two inputs will be fixed to be logic '1' when a 6-input LUT is in fracturable modes. The circuit_model_name of input port is used to specify which logic gates will be used to tri-state the inputs in fracturable LUT modes. It is required to use an AND gate to force logic '0' or an OR gate to force logic '1' for the input ports. For output ports, the keyword lut_frac_level is used to specify the level in LUT multiplexer tree where the output port are wired to. For example, lut_frac_level="4" in a fracturable LUT6 means that the output are potentially wired to the 4th stage of a LUT multiplexer and it is an output of a LUT4. The keyword lut_output_mask describes which fracturable outputs are used. For instance, in a 6-LUT, there are potentially four LUT4 outputs can be wired out. lut_output_mask="0,2" indicates that only the first and the thrid LUT4 outputs will be used in fracturable mode. Note that the size of the output port should be consistent to the length of lut_output_mask. + +* **SRAM port for mode selection:** To enable switch between different operating modes, the SRAM bits of a fracturable LUT consists of two parts: configuration memory and mode selecting. The SRAM port for mode selection is specified through the XML keyword mode_select. Note that the size of such SRAM port should be consistent to the number of 1s or 0s in the tri_state_map. **LUT example** From 5bec11bd6ebc30b6c9ef13348a39f0c0b64b3705 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 17:46:25 -0400 Subject: [PATCH 14/23] try to add logo --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6d2f25e13..b7ca50c2c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Getting Started with OpenFPGA +![OpenFPGA](./docs/source/figures/OpenFPGA_logo.png) [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From 6af0d277a2d0a7817784712cbc6801269ef6a961 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 17:48:01 -0400 Subject: [PATCH 15/23] hot fix on fpga logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7ca50c2c..321b0d05d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Getting Started with OpenFPGA -![OpenFPGA](./docs/source/figures/OpenFPGA_logo.png) +![OpenFPGA](https://github.com/LNIS-Projects/OpenFPGA/blob/dev/docs/source/figures/OpenFPGA_logo.png) [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From 17308621bdbc1a8cfc7ee2e6da61f0e85a99b1bc Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 17:53:36 -0400 Subject: [PATCH 16/23] resize logo on README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7ca50c2c..2b2e50559 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Getting Started with OpenFPGA -![OpenFPGA](./docs/source/figures/OpenFPGA_logo.png) +![OpenFPGA](./docs/source/figures/OpenFPGA_logo.png =100x) [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From b850610cea485b453c0d3f7943fe3fca18c4e7b3 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 17:55:10 -0400 Subject: [PATCH 17/23] resize logo to fit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b2e50559..d8d3957d7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Getting Started with OpenFPGA -![OpenFPGA](./docs/source/figures/OpenFPGA_logo.png =100x) + [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From b104de02635624abe7c4b05159bdf82ba5da46fe Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 17:56:06 -0400 Subject: [PATCH 18/23] resize logo again --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8d3957d7..94c50fb95 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ + # Getting Started with OpenFPGA - [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From f3ed949c4b8663e7146bf7cf3229edec87292472 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 18:36:49 -0400 Subject: [PATCH 19/23] retry placing images --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 94c50fb95..6d9e0a856 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ + # Getting Started with OpenFPGA [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From 37abd8af40408a8bd01dc27e6382bccfccf4c947 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 18:40:26 -0400 Subject: [PATCH 20/23] try to place inline logo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d9e0a856..3a9e39fff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ - + -# Getting Started with OpenFPGA +# ![Getting Started with OpenFPGA](./docs/source/figures/OpenFPGA_logo.png) [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From a80199057d4b929fe39b493980c8959e8b692ee6 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 18:43:17 -0400 Subject: [PATCH 21/23] logo placement --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a9e39fff..4be51ab3a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ - - -# ![Getting Started with OpenFPGA](./docs/source/figures/OpenFPGA_logo.png) +# Getting Started with OpenFPGA [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From 8226f42d3d86b538f7743d16577113d8f1cb54eb Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 18:46:14 -0400 Subject: [PATCH 22/23] use hfill to place image inline --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4be51ab3a..d4c6a99d4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Getting Started with OpenFPGA +# Getting Started with OpenFPGA [][hfill] [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) From 173440ffc3e9984d0eb758107b978e1f98cfc3e7 Mon Sep 17 00:00:00 2001 From: Xifan Tang Date: Wed, 17 Jul 2019 18:46:54 -0400 Subject: [PATCH 23/23] retry --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4c6a99d4..f8b1888ea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Getting Started with OpenFPGA [][hfill] +# Getting Started with OpenFPGA [![Build Status](https://travis-ci.org/LNIS-Projects/OpenFPGA.svg?branch=master)](https://travis-ci.org/LNIS-Projects/OpenFPGA) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master)