Commit 50f368ab authored by Benoit Rat's avatar Benoit Rat Committed by Manuel Castilla

Merged in ben-191031-mergerepos (pull request #9)

Ben 191031 mergerepos
Approved-by: 's avatarManuel Castilla <manuel.castilla@sevensols.com>
parents 15db357c c6567110
coht-vic @ b4431e73
Subproject commit 44bb1e7bafdcb82eaf3ce0c89157ba359b08d18c
Subproject commit b4431e739bbc5a4ed1701ab7f4a372fbb4f33cf8
......@@ -903,7 +903,6 @@ However with the next experiment you will find out that the synchronization is b
Synchronization of PPS
----------------------------------------------------------------------------------------
<!--TODO: spec-sw.pdf does not exist -->
This corresponds to the experiment from [spec-sw.pdf:6.8][spec-sw.pdf] document.
Here we want to synchronize the PPS of the master and slave boards using WR protocol on a fiber.
......@@ -1107,8 +1106,6 @@ The *ruler* waits for timestamps to appear on a specific input channel;
when a positive-going edge occurs the *ruler* notifies it or replicates the edge on one or more outputs.
Each output can be local or remote, and can use a different delay from the input pulse.
<!--TODO: spec-sw.pdf does not exist -->
For further details (deeper studies) the user is recommended to read the [spec-sw.pdf:6.8][spec-sw.pdf] document
and to also take a look at the source code of `wr-dio-agent` and `wr-dio-ruler`
......@@ -1321,13 +1318,12 @@ captured by the oscilloscope.
> **Notes**: Please check that you are using the values that correspond
to your gateware release. When this document was generated we refer as
wr-nic-v2.0 (starting kit). You can also check using the `ver` command
if the corresponding embedded LM32 corresponds to your gateware version
(i.e, wrpc-v2.1-for-wrnic lm32 is embedded in wr-nic-v2.0).
wr-starting-kit-v3.0 (starting kit). You can also check using the `ver` command
if the corresponding embedded LM32 corresponds to your gateware version.
~~~~~{.sh}
wrc# ver
WR Core build: wrpc-v2.1-for-wrnic
WR Core build: wr-starting-kit-v3.0
...
## List your actual sfp database
......@@ -1347,11 +1343,6 @@ WR equipments (i.e, [WRS]) as explained in the wiki page.
You might also check the [wrpc.pdf] for extended explanations on how to run
yourself the calibration procedure.
> **Notes**: Please check that the master board has a valid t42p written
in its EEPROM. This value must be obtained by first connecting this
board in slave mode to a working WR master. For more information read the
[wrpc-v2.1.pdf] page 7.
SPEC+DIO as grandmaster
------------------------
......@@ -1431,19 +1422,37 @@ Run in standalone
You can also run GM in a full standalone mode in order to transmit WR clock without the need of a PC.
<!--TODO: The package does not exist -->
First you need to flash the SPEC with the latest `wr_nic_dio.bit` bitstream you can find in the package:
[wr-starting-kit-v3.0_bin.tar.gz]
First you need to flash the SPEC with the latest bitstream you can find the package:
<http://www.sevensols.com/dl/wr-nic/bin/latest_stable.tar.gz>
And you also need to download a pre-formatted sdbfs partition: [sdbfs-standalone-160812.bin]
In the case when you want to run on the the SPEC a reference bitstream provided with a stable
WRPC release, you can simply program your Flash with \textit{spec\_top.mcs}
provided with the release binaries using for example Xilinx ISE Impact tool.
Then you need to create a `mcs` image that contains both the SDBFS partition and FPGA bitstream.
This can be done by following the layout below:
To do so you need to generate a MSC file as follows:
Create PROM Files > SPI Flash > Single FPGA > 32M > MCS
| Address | Binary file |
|------------|---------------------------------|
| `0x000000` | `wr_nic_dio.bit` |
| `0x170000` | `sdbfs-standalone-160812.bin` |
And then, when asking for SPI/BPI, just add the `.msc` file and select
the corresponding SPI flash memory: `M25P32`.
use the following layout:
For example, to generate the `*.mcs` file for `M25P32` Flash on SPEC, the
following `promgen` (ISE Tool) parameters should be used:
~~~~~{.sh}
promgen -w -spi -p mcs -c FF -s 32768 -u 0 <your_bitstream>.bit -bd sdbfs-standalone-160812.bin start 0x170000 -o output.mcs
~~~~~~~~~~
To do so you need to generate a MSC file as follows:
Then:
Finally:
* The setup of the cable is exactly the same as above, and you do not need to set up the mode because it is
correctly configured for GM by default at power up.
......@@ -1465,6 +1474,7 @@ wrc# init add ptp start
Please refer to *Writing EEPROM and calibration* Section of the [wrpc.pdf] document.
\clearpage
Quick Start Guide For Developers
=================================
......@@ -1483,14 +1493,21 @@ to look at the [spec-getting-started.pdf] guide.
The starting kit is based on various project:
[spec-sw]
: The project that contains the software (application + driver) which you have already compiled above.
[spec-golden]
: A simple gateware in order to access to the EEPROM of the [FMC] (WB-I2C)
[wr-nic]
: gateware (FPGA HDL) that includes the NIC & DIO capabilities.
[wrpc-sw]
: LM32 software in the white rabbit PTP core for the synchronization.
* [spec-sw], The project that contains the PCIe driver and tools to access to the SPEC FPGA
* [spec-golden], A simple gateware in order to access to the EEPROM of the [FMC] (WB-I2C)
* [wr-nic], gateware (FPGA HDL) that includes the NIC capabilities and its corresponding kernel drivers
* [fmc-dio-5chttla], gateware (FPGA HDL) that includes the DIO capabilities (with NIC) and its corresponding kernel drivers
* [wrpc-sw], LM32 software in the white rabbit PTP core for the synchronization
* [coht-vic], Kernel driver to handles interruption from FPGA such as the one from SPEC
In the following figure you can understand better how the different subproject are connected and contains
![Structure of repositoryie](img/repos_structure.png)
If you want to get more information you can take a look at `doc/starting-kit_repos-v1.3.pdf` to get a
detailed view on how the subproject are structured.
Tools
......@@ -1508,35 +1525,6 @@ You must have installed the following tools:
* Texinfo
Golden SPEC gateware
---------------------
> *Dep*: hdlmake, Xilinx ISE 14
This is a really simple gateware that allows the PC to read the FMC-EEPROM in
order to know what type of gateware it should load.
The gateware is a wishbone PCIe bridge connected to a WB I2C module.
To synthetize it, the user needs to follow the next steps:
~~~~~~{.sh}
## Checkout the code
svn checkout http://svn.ohwr.org/spec/trunk/hdl/golden@53 spec-golden
## Go to the main directory
cd spec-golden/syn/
## Synthetize using hdlmake
hdlmake --fetch
hdlmake
make
~~~~~~~~~~~
You will therefore obtain your golden firmware called as `spec-init.bin`
WRPC-SW (LM32 firmware)
-----------------------
......@@ -1551,26 +1539,14 @@ how to compile new firmware for other configurations.
You first need to install the **lm32** compiler as suggested in
[wrpc.pdf], and then you need to compile it using the specific configuration as bellow:
<!--TODO: update checkout and configure -->
~~~~~~{.sh}
## Set up CROSS_COMPILE variable for this terminal
export CROSS_COMPILE="<your_path_to_lm32>/lm32/bin/lm32-elf-";
## Clone the repository
git clone https://ohwr.org/project/wrpc-sw.git
## Move to wrpc-sw inside wr-starting-kit
cd wrpc-sw
## Checkout the stable release
git checkout -b wrpc-v2.1-for-wrnic wrpc-v2.1-for-wrnic
~~~~~~~~~~
And finally configure and compile it
~~~~~~{.sh}
## Configuring the project for SPEC
## Configuring the project for SPEC as NIC card
make wrnic_defconfig
## Compile
......@@ -1579,37 +1555,17 @@ make
You should obtain various files named wrc.bin, wrc.elf, wrc.vhd, wrc.ram
You can therefore use them to override the one in [wr-nic](#wr-nic-hdl-gateware) project.
~~~~~{.sh}
## Override the default embeded wrpc-sw
cp wrc.ram <wr_root_folder>/wr-nic/syn/spec
~~~~~~~~~~~
WR-NIC (HDL-gateware)
WR-SPEC-DIO-NIC (HDL-gateware)
----------------------
> *Dep*: hdlmake, Xilinx ISE 14
This step shows us how to prepare the WR-NIC bitstream ([SPEC+FMCDIO]) with
This step shows us how to prepare the WR-SPEC-DIO-NIC bitstream ([SPEC+FMCDIO]) with
the wrpc-sw (`wrc.ram` file) embedded inside.
<!--TODO: update checkout -->
~~~~~~{.bash}
## Checkout the code
git https://ohwr.org/project/wr-nic.git
cd wr-nic
git checkout -b wr-nic-v2.0 wr-nic-v2.0
## Create and update the submodules
git submodule init
git submodule update
## Go to the main directory
cd syn/specdio/
## From the wr-starting-kit repo
cd fmc-dio/hdl/syn/dio-nic
## Synthetize using hdlmake
hdlmake --make-ise --ise-proj
......@@ -1653,20 +1609,6 @@ Please check if you see them using `ifconfig -a`, if you see them by using the `
to bring them up. This is explained in the [Check the network interface](#Check-the-network-interface) section.
### The starting kit is based on Ubuntu. How can I use it with Scientific Linux?
The commands to execute in order to update the kernel using scientific linux (you need at least the 4.15.9 to compile the starting kit) are:
~~~~~{.bash}
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
sudo yum --enablerepo=elrepo-kernel --skip-broken install kernel-lt kernel-lt-devel kernel-lt-headers
~~~~~~~~~~
You can have more information on how to do this by browsing the (http://elrepo.org/tiki/tiki-index.php "ELRepo Project")
After this you should reboot your PC with the new kernel source and start from [Compile & Install the project](#Compile-&-Install-the-project)
### I can't detect any level on my inputs.
You should first try to desactivate the termination resistance that can
......@@ -1739,25 +1681,10 @@ Please help us to solve this error by sending us a log with the following inform
* The serial log starting from the login (dmesg)
[WR]:https://www.ohwr.org/project/white-rabbit/wikis/home
[WRS]: https://sevensols.com/index.php/products/white-rabbit-switch/
[WRSSK]: http://www.sevensols.com/en/products/wr-starting-kit.html
[SPEC+FMCDIO]: http://sevensols.com/index.php/kit-spec/
[SPEC]: http://sevensols.com/index.php/products/spec/
[FMC]: http://www.ohwr.org/projects/fmc-projects
[FMC-DIO]: http://sevensols.com/index.php/fmc-dio/
[FMCDIO]: http://sevensols.com/index.php/fmc-dio/
[FMC fine-delay]: https://sevensols.com/index.php/fmc-del/
[OHWR]: http://www.ohwr.org/projects/white-rabbit
[fmc-dio-5chttla]: https://ohwr.org/project/fmc-dio-5chttla/
References
============
<!--TODO: spec-sw.pdf link does not exist -->
* [spec-sw.pdf] main documentation of the spec-sw
* [wrpc.pdf] White Rabbit Core documentation
* SFPs information <http://www.ohwr.org/projects/white-rabbit/wiki/SFP>
......@@ -1765,20 +1692,35 @@ References
* [spec-2-spec] SPEC-2-SPEC demo
* [wr_external_reference.pdf] How to use the grandmaster mode in the switch.
* [spec-getting-started.pdf] A tutorial to get ready to work with the (SPEC), including hardware deployment instructions, full required toolchain setup and a collection of step-by-step demonstrative tutorials.
* [spec-sw] Sub-project with that contains the PCIe driver and tools to access to the SPEC FPGA
* [wr-nic] Sub-project with gateware (FPGA HDL) that includes the NIC capabilities and its corresponding kernel drivers
* [fmc-dio-5chttla] Sub-project with gateware (FPGA HDL) that includes the DIO capabilities (with NIC) and its corresponding kernel drivers
* [wrpc-sw] Sub-project with the LM32 software in the white rabbit PTP core for the synchronization
<!-- List of links -->
<!-- List of links -->
[WR]:https://www.ohwr.org/project/white-rabbit/wikis/home
[WRS]: https://sevensols.com/index.php/products/white-rabbit-switch/
[WRSSK]: http://www.sevensols.com/en/products/wr-starting-kit.html
[SPEC+FMCDIO]: http://sevensols.com/index.php/kit-spec/
[SPEC]: http://sevensols.com/index.php/products/spec/
[FMC]: http://www.ohwr.org/projects/fmc-projects
[FMC-DIO]: http://sevensols.com/index.php/fmc-dio/
[FMCDIO]: http://sevensols.com/index.php/fmc-dio/
[FMC fine-delay]: https://sevensols.com/index.php/fmc-del/
[OHWR]: http://www.ohwr.org/projects/white-rabbit
[Seven Solutions]: http://www.sevensols.com
[wr-switch-guide.pdf]: https://sevensols.com/index.php/products/white-rabbit-switch/
[wr-nic]: http://www.ohwr.org/projects/wr-nic/
[wr-starting-kit]: http://www.ohwr.org/projects/wr-starting-kit/
[spec-sw]: http://www.ohwr.org/projects/spec-sw/
[wrpc-sw]: http://www.ohwr.org/projects/wrpc-sw/
[fmc-dio-5chttla]: https://ohwr.org/project/fmc-dio-5chttla/
[coht-vic]: https://ohwr.org/project/coht-vic/
<!--TODO: spec-golden link does not exist -->
[spec-golden]: http://www.ohwr.org/projects/spec/repository/show/trunk/hdl/golden
[spec-2-spec]: http://www.ohwr.org/projects/wr-cores/wiki/spec-to-spec
[spec-getting-started.pdf]:http://www.ohwr.org/projects/spec-getting-started/wiki
[wr-nic.pdf]: http://www.sevensols.com/dl/wr-nic/doc/latest_stable.pdf
......@@ -1787,4 +1729,7 @@ References
[wr_external_reference.pdf]: http://www.ohwr.org/attachments/1647/wr_external_reference.pdf
[wrpc.pdf]: http://www.ohwr.org/attachments/2559/wrpc-v2.1.pdf
[wrpc-v2.1.pdf]: http://www.ohwr.org/attachments/2559/wrpc-v2.1.pdf
[Seven Solutions]: http://www.sevensols.com
[wr-starting-kit-v3.0_bin.tar.gz]: <https://ohwr.org/project/wr-starting-kit/wikis/uploads/b63d12f90cd0dbb89b78587603fdcfe6/wr-starting-kit-v3.0_bin.tar.gz>
[spec-golden]: https://www.ohwr.org/project/spec-sw/uploads/636e7eaa2e1c3a884e2f9f694fdfd1b9/spec-init.bin-2015-09-18
[sdbfs-standalone-160812.bin]: <https://www.ohwr.org/project/wr-cores/uploads/9dad995e74a3d49b472b8654833be01a/sdbfs-standalone-160812.bin>
\ No newline at end of file
Subproject commit cf911ce26c101943edd5b0c6db360dc563147051
Subproject commit eea7bfc82e4cb3554d4343d93dfa75773d7b2fc2
From 670756fc4c7e62442b43b745239a8a5d7cc03e8e Mon Sep 17 00:00:00 2001
From: Miguel Jimenez Lopez <miguel.jimenez@sevensols.com>
Date: Thu, 12 Sep 2019 09:46:27 +0200
Subject: [PATCH 4/4] Makefile: Add an installation rule.
---
drivers/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/Makefile b/drivers/Makefile
index fbda688..8982385 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -9,6 +9,8 @@ VERSION = $(shell git describe --always --dirty --long --tags)
all: modules
modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) DRV_VERSION="$(VERSION)"
+install modules_install:
+ $(MAKE) -C $(LINUX) M=$(shell /bin/pwd) DRV_VERSION="$(VERSION)" modules_install
clean:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) clean
--
2.17.1
......@@ -294,7 +294,7 @@ exit 0
# setup script dir
scriptdir=$(cd $(dirname $0); pwd)
DOWNLOADDIR=${scriptdir}/../firmware
PKGURL="https://drive.google.com/uc?export=download&id=1ihH73-YVrRDhWcYa9-4kkqepvl3xrRGk 39843e9cb12182dfe741fb3b26ac6ea5"
PKGURL="https://ohwr.org/project/wr-starting-kit/wikis/uploads/b63d12f90cd0dbb89b78587603fdcfe6/wr-starting-kit-v3.0_bin.tar.gz"
while [ $# -gt 0 ]; do # Until you run out of parameters . . .
case "$1" in
......
Subproject commit a301a69e45ca608b6d20c3843d95343bb326decf
Subproject commit e76f5ca3bcda171318757b603abca131712d086e
Subproject commit c26a9ff989db7d0ac0a6a4872bd0fcb81fdb29a1
Subproject commit 2ff6c419ea4a23cb9ffc043f6c03d831e81f9f2f
Subproject commit 75f5007e599c7490169a9ebf95e94617d1866f63
Subproject commit 3c9b25b8c9afff89f425f4974a361e1a0c8bed8d
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment