Difference between revisions of "Main Page"
(→Getting started) |
|||
Line 2: | Line 2: | ||
== Getting started == | == Getting started == | ||
− | This section shows how to approach with nu+ project for simulating or implementing a kernel for nu+ architecture. Kernel means a complex application such as | + | This section shows how to approach with nu+ project for simulating or implementing a kernel for nu+ architecture. Kernel means a complex application such as matrix multiplication, transpose of a matrix or similar that is written in a high-level programming language, for example, C/C++. |
=== Required software === | === Required software === | ||
Line 11: | Line 11: | ||
=== Building process === | === Building process === | ||
− | + | The first step is to obtain the source code of nu+ architecture from the official repository by cloning a repository from [https://gitlab.com/vincenscotti/nuplus] | |
In Ubuntu Linux environment, this step is fulfilled by starting following command: | In Ubuntu Linux environment, this step is fulfilled by starting following command: | ||
Line 17: | Line 17: | ||
<code> $ git clone 'https://gitlab.com/vincenscotti/nuplus' </code> | <code> $ git clone 'https://gitlab.com/vincenscotti/nuplus' </code> | ||
− | In nu+ repository, toolchain consist | + | In the nu+ repository, toolchain consist of a sub-module of the repository so is needed to update. In Ubuntu Linux environment, just type the following command in a root folder of the repository: |
<code> $ git submodule update --init </code> | <code> $ git submodule update --init </code> | ||
− | Then, third step is to install a toolchain. This process is described [[http://www.naplespu.com/doc/index.php?title=Toolchain here]]. | + | Then, the third step is to install a toolchain. This process is described [[http://www.naplespu.com/doc/index.php?title=Toolchain here]]. |
− | At this point, in a root folder of repository, there are a few sub- | + | At this point, in a root folder of the repository, there are a few sub-folders. Two of these sub-folder are of particular interest for the purpose: |
* software, where are stored all kernels (in a sub-folder kernel); | * software, where are stored all kernels (in a sub-folder kernel); | ||
− | * tools, where are stored all scripts for | + | * tools, where are stored all scripts for simulating one or more kernel. |
=== Simulate a kernel === | === Simulate a kernel === | ||
− | For | + | For simulating a kernel there are three-way: |
* starting test.sh script | * starting test.sh script | ||
− | * starting setup_project.sh from a root folder of repository, if simulator software chosen is Vivado; | + | * starting setup_project.sh from a root folder of the repository, if simulator software chosen is Vivado; |
− | * starting simulate.sh from a root folder of repository, if simulator software chosen is ModelSim. | + | * starting simulate.sh from a root folder of the repository, if simulator software chosen is ModelSim. |
− | First of all, is needed to load Vivado or ModelSim function in the shell. This step is mandatory for all ways. In Ubuntu Linux environment, if simulator software chosen is Vivado, it can be possible by launching the following command: | + | First of all, is needed to load Vivado or ModelSim function in the shell. This step is mandatory for all ways. In Ubuntu Linux environment, if the simulator software chosen is Vivado, it can be possible by launching the following command: |
<code>$ source Vivado/folder/location/settingXX.sh</code> | <code>$ source Vivado/folder/location/settingXX.sh</code> | ||
− | where XX | + | where XX depends on the installed version of Vivado (32 o 64 bit). |
If simulator software chosen is ModelSim, is needed to add environment variable of ModelSim to PATH variable and load a license in the shell. In Ubuntu Linux environment, the commands to launch is: | If simulator software chosen is ModelSim, is needed to add environment variable of ModelSim to PATH variable and load a license in the shell. In Ubuntu Linux environment, the commands to launch is: | ||
Line 55: | Line 55: | ||
* -tn, --thread-numb=VALUE specify the thread number, default: 8 | * -tn, --thread-numb=VALUE specify the thread number, default: 8 | ||
− | This script allows | + | This script allows starting one or more kernel defined in an array of the script. The test.sh script provides to compile kernels and run them on nu+ and x86 architecture. Once the simulation is terminated, for each kernel, results of both execution are compared by a Python script for verifying the correctness of result of nu+ architecture. |
− | In folder tools there is a log file, called cosim.log, where are stored some information about simulation. | + | In folder tools, there is a log file, called cosim.log, where are stored some information about simulation. |
==== setup_project.sh script ==== | ==== setup_project.sh script ==== | ||
Line 64: | Line 64: | ||
<code>$ tools/vivado/setup_project.sh [option]</code> | <code>$ tools/vivado/setup_project.sh [option]</code> | ||
− | Options that can be | + | Options that can be used are: |
* -h, --help show this help | * -h, --help show this help | ||
* -k, --kernel=KERNEL_NAME specify the kernel to use | * -k, --kernel=KERNEL_NAME specify the kernel to use | ||
Line 72: | Line 72: | ||
* -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui | * -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui | ||
− | This script | + | This script allows starting a kernel specified in the command. The kernel will compile and run on nu+ architecture. Simulation is performed by Vivado. |
==== simulate.sh script ==== | ==== simulate.sh script ==== | ||
Line 79: | Line 79: | ||
<code>$ tools/modelsim/simulate.sh [option]</code> | <code>$ tools/modelsim/simulate.sh [option]</code> | ||
− | Options that can be | + | Options that can be used are: |
* -h, --help show this help | * -h, --help show this help | ||
* -k, --kernel=KERNEL_NAME specify the kernel to use | * -k, --kernel=KERNEL_NAME specify the kernel to use | ||
Line 87: | Line 87: | ||
* -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui | * -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui | ||
− | This script | + | This script allows starting a kernel specified in command. The kernel will compile and run on nu+ architecture. Simulation is performed by ModelSim. |
=== Implement a kernel === | === Implement a kernel === |
Revision as of 16:19, 18 April 2019
TODO: project overview here
Contents
Getting started
This section shows how to approach with nu+ project for simulating or implementing a kernel for nu+ architecture. Kernel means a complex application such as matrix multiplication, transpose of a matrix or similar that is written in a high-level programming language, for example, C/C++.
Required software
Simulation or implementation of any kernel relies on the following dependencies:
- Git
- Xilinx Vivado 2018.2 or lower or ModelSim (e.g. Questa Sim-64 vsim 10.6c_1)
- nu+ toolchain
Building process
The first step is to obtain the source code of nu+ architecture from the official repository by cloning a repository from [1]
In Ubuntu Linux environment, this step is fulfilled by starting following command:
$ git clone 'https://gitlab.com/vincenscotti/nuplus'
In the nu+ repository, toolchain consist of a sub-module of the repository so is needed to update. In Ubuntu Linux environment, just type the following command in a root folder of the repository:
$ git submodule update --init
Then, the third step is to install a toolchain. This process is described [here].
At this point, in a root folder of the repository, there are a few sub-folders. Two of these sub-folder are of particular interest for the purpose:
- software, where are stored all kernels (in a sub-folder kernel);
- tools, where are stored all scripts for simulating one or more kernel.
Simulate a kernel
For simulating a kernel there are three-way:
- starting test.sh script
- starting setup_project.sh from a root folder of the repository, if simulator software chosen is Vivado;
- starting simulate.sh from a root folder of the repository, if simulator software chosen is ModelSim.
First of all, is needed to load Vivado or ModelSim function in the shell. This step is mandatory for all ways. In Ubuntu Linux environment, if the simulator software chosen is Vivado, it can be possible by launching the following command:
$ source Vivado/folder/location/settingXX.sh
where XX depends on the installed version of Vivado (32 o 64 bit).
If simulator software chosen is ModelSim, is needed to add environment variable of ModelSim to PATH variable and load a license in the shell. In Ubuntu Linux environment, the commands to launch is:
$ export PATH=$PATH:ModelSim/folder/location/bin/
$ export LM_LICENSE_FILE=1717@vlsi2:$LM_LICENSE_FILE
test.sh script
For start test.sh script, type following command with some options in a nuplus/tools folder:
$ ./test.sh [option]
Options that can be use are:
- -h, --help show this help
- -t, --tool=vsim or vivado specify the tool to use, default: vsim
- -cn, --core-numb=VALUE specify the core number, default: 1
- -tn, --thread-numb=VALUE specify the thread number, default: 8
This script allows starting one or more kernel defined in an array of the script. The test.sh script provides to compile kernels and run them on nu+ and x86 architecture. Once the simulation is terminated, for each kernel, results of both execution are compared by a Python script for verifying the correctness of result of nu+ architecture.
In folder tools, there is a log file, called cosim.log, where are stored some information about simulation.
setup_project.sh script
For start setup_project.sh script, type following command with some options in a nuplus folder:
$ tools/vivado/setup_project.sh [option]
Options that can be used are:
- -h, --help show this help
- -k, --kernel=KERNEL_NAME specify the kernel to use
- -s, --single-core select the single core configuration, by default the manycore is selected
- -c, --core-mask=VALUE specify the core activation mask, default: 1
- -t, --thread-mask=VALUE specify the thread activation mask, default FF
- -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui
This script allows starting a kernel specified in the command. The kernel will compile and run on nu+ architecture. Simulation is performed by Vivado.
simulate.sh script
For start simulate.sh script, type following command with some options in a nuplus folder:
$ tools/modelsim/simulate.sh [option]
Options that can be used are:
- -h, --help show this help
- -k, --kernel=KERNEL_NAME specify the kernel to use
- -s, --single-core select the single core configuration, by default the manycore is selected
- -c, --core-mask=VALUE specify the core activation mask, default: 1
- -t, --thread-mask=VALUE specify the thread activation mask, default FF
- -m, --mode=gui or batch specify the tool mode, it can run in either gui or batch mode, default: gui
This script allows starting a kernel specified in command. The kernel will compile and run on nu+ architecture. Simulation is performed by ModelSim.
Implement a kernel
TODO: creazione, compilazione
TODO: clone repository, struttura cartelle
... then you can simulate or implement the system on a supported board...
Documentation
The nu+ Instruction Set Architecture
The nu+ Emulator TODO: da rimuovere?
TODO Writing nu+ applications: spiegazione workflow kernel, scrittura-compilazione-file generati (altrove sara' spiegata la simulazione e il loading su scheda)
Example of nu+ applications TODO spostare contenuti in una sezione "Examples" da includere nella pagina di sopra
Progetto di Tile Eterogenea TODO: spostare altrove
Contributing to nu+ TODO: spostare i contenuti marcati come tali nel wiki
Further information on MediaWiki
TODO: da rimuovere/salvare altrove
The nu+ project documentation will be based on MediaWiki. For information and guides on using MediaWiki, please see the links below:
- User's Guide (for information on using the wiki software)
- Configuration settings list
- MediaWiki FAQ
- MediaWiki release mailing list
- Localise MediaWiki for your language
- Learn how to combat spam on your wiki