Commit f7209b9d authored by Benoit Rat's avatar Benoit Rat

doc: update for new pandoc ouput & correct some errors

parent 2f99a64a
......@@ -151,7 +151,7 @@ The first step is to install all the tools that you will need:
You can also run this command:
~~~~{.bash}
~~~~{.sh}
sudo apt-get install git build-essential linux-source minicom texinfo emacs texlive
~~~~~~~~~
......@@ -159,50 +159,33 @@ Install the project
-------------------
The first step is to install the driver to communicate with the card using
the PCIe port. To do so you need to install the spec-sw project. You can do so with two different way:
the PCIe port. To do so you need to get the latest release[^commitgit] of [wr-starting-kit] project which
includes the [spec-sw] project.
~~~~{.sh}
## Create the "root" directory
>:$ mkdir -p ~/wr/
>:$ cd ~/wr/
* Download and extract a pre-compiled [spec-sw] project from our package:
~~~~{.bash}
mkdir -p ~/wr/
cd ~/wr/
wget www.sevensols.com/files/7S121105_spec-sw-v2.1-6-g9da246a.tar.gz -O spec-sw.tar.gz
tar -xzf spec-sw.tar.gz
rm spec-sw.tar.gz
cd spec-sw
~~~~~~~~~~~~
<!-- TODO: change these -->
* Or get the latest release : **spec-sw-2.2**[^commitgit]
## Clone the repository
>:$ git clone git://ohwr.org/white-rabbit/wr-starting-kit.git
>:$ cd wr-starting-kit
## Checkout the stable release
>:$ git checkout -b wr-starting-kit-v1.0 wr-starting-kit-v1.0
~~~~{.bash}
# Create the "root" directory
mkdir -p ~/wr/
cd ~/wr/
# Clone the repository
git clone git://ohwr.org/fmc-projects/spec/spec-sw.git
cd spec-sw
# Checkout the stable release
git checkout -b wr-nic-v1.0 wr-nic-v1.0
## Obtain the spec-sw project using submodules
>:$ git submodule init
>:$ git submodule update
~~~~~~~~~~~~
[^commitgit]: You should only use our package or proper release (tagged commit).
The **master** branch might have the latest source but only offer support for tagged release. The other branches are normally used for development and are not stable.
> ***Notes:*** The next commands provided by this tutorial will be executed within the
current directory (*spec-sw* is the root directory).
The **master** branch might have the latest source but support is only offered for tagged release. The other branches are normally used for development and are not stable.
Structure of the WR-NIC
-----------------------
Structure of the spec-sw project
---------------------------------
Most of the information on how the project is structured can be find in the [spec-sw.pdf] in the `/doc` folder,
however we are going to briefly resume it:
......@@ -232,69 +215,74 @@ of the carrier being used (e.g. SPEC, SVEC, ...)
[^fmc-bus]: More information about the fmc-bus can be found within [fmc-bus.pdf] in the `doc/` folder.
[^lm32inc]: In future version, the program file for the LM32 will be included into the gateware.
Compile & install
------------------------
A Makefile in the [spec-sw] project has been written to compile and install easily the drivers and the tools used below.
~~~~{.sh}
## Go to spec-sw project
>:$ cd spec-sw
## In the root folder (spec-sw), run
>:$ make
## then, install the driver in your system so that they load automatically
>:$ sudo make install
~~~~~~~~~~~
If everything works well you should see the driver in
~~~~{.sh}
>:$ ls -l /lib/modules/$(uname -r)/extra
~~~~~~~~~~~
> ***Notes:*** In some distribution such as Ubuntu 12.04, you might need to force the creation of dependancy
to load the modules using modprobe.
~~~~{.sh}
>:$ sudo depmod -a
~~~~~~~~~~~
Download, install & load the gateware
--------------------------------------
You need to install the gateware[^version] to `/lib/firmware/fmc`
If you have used our package you will already have the proper binary
in the *gateware* folder.
Otherwise you need to download it
### Manual installation
~~~~{.bash}
#Create the gateware folder
$ mkdir gateware
$ cd gateware
~~~~{.sh}
## Create the gateware folder
>:$ mkdir firmware
>:$ cd firware
#Download all the files (from OHWR website).
$ wget -nv http://www.ohwr.org/attachments/download/1761/wr-nic-v1.0.tar.gz
-O gateware/spec-init.bin
$ wget -nv http://www.ohwr.org/attachments/download/1757/wr_nic_dio.bin-2012-12-14
-O gateware/wr_nic_dio.bin
## Download all the firware files (from OHWR website).
>:$ wget -nv http://www.ohwr.org/attachments/download/1815/wr-starting-kit-v1.0_gw.tar.gz -O- | tar -xvz
~~~~~~~~~~~
<!-- TODO: Put the source and tag of the binaries -->
Once you have the file you need to install them to your system in order to make them load automatically
~~~~{.bash}
# Install the HDL binaries in /lib/firmware/fmc (require sudo)
$ sudo cp -v gateware/*.bin /lib/firmware/fmc
~~~~{.sh}
## Install the HDL binaries in /lib/firmware/fmc (require sudo)
>:$ sudo cp -v firmware/*.bin /lib/firmware/fmc
~~~~~~~~~~~~~
[^version]: The HDL binaries (gateware) came from other project, you can find in
the [Developers Section](#quick-start-guide-for-developers) where to obtain them and
how to compile them.
### Automatic installation
You can also use the script `wr-ssk-get` in `wr-starting-kit/scripts` folder
to ease the installation. `sudo` is required
~~~~{.sh}
## Fetch and install the firmware
>:$ scripts/wr-ssk-get --all
~~~~~~~~~~~~~~
Compile & install
------------------------
A Makefile has been wrote to compile and install easily the drivers and the tools used below.
~~~~{.bash}
# In the root folder (spec-sw), run
make
#then, install the driver in your system so that they load automatically
sudo make
~~~~~~~~~~~
If everything works well you should see the driver in
~~~~{.bash}
$ ls -l /lib/modules/$(uname -r)/extra
~~~~~~~~~~~
> ***Notes:*** In some distribution such as Ubuntu 12.04, you might need to force the creation of dependancy
to load the modules using modprobe.
[^version]: The HDL binaries (gateware) came from other project, you can find in
the [Developers Section](#quick-start-guide-for-developers) where to obtain them and
how to compile them.
~~~~{.bash}
$ sudo depmod -a
~~~~~~~~~~~
Loading the driver
......@@ -302,32 +290,29 @@ Loading the driver
To enable the wr-nic you should execute the modprobe[^errmodprobe] command to load everything
~~~~{.bash}
$ sudo modprobe wr-nic
~~~~{.sh}
>:$ sudo modprobe wr-nic
~~~~~~~~
[^errmodprobe]: We have found a problem in some distribution with `modprobe` command.
You should use `insmod` instead and look at the [Know bugs sections](#known-bugs).
You shoudl expect to obtain one (or two) new interface(s):
You should expect to obtain one (or two) new interface(s):
~~~~{.bash}
$ ifconfig -a | grep wr
~~~~{.sh}
>:$ ifconfig -a | grep wr
wr0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
~~~~~~~~~~~~
Setting Master & Slave using White Rabbit Core
=============================================
A "*SPEC+FMC DIO*" board is considered as a slave node, however in a standard
White Rabbit network the synchronization is done using a master such as the White Rabbit switch.
In order to enable the synchronization capabilities we need to setup one board in master mode
In order to enable the synchronization capabilities we need to set up one board in master mode
(faking to be the switch) and the other one in slave mode (default mode). This is done through the
shell of White Rabbit Core that give this functionality among others.
......@@ -342,9 +327,9 @@ To configure the SPEC board in master/slave mode you need to access to the White
To access to the physical, you first need to connect the mini-USB of the SPEC to your PC. Then, you need to run
a terminal emulator[^sudomc] (such as minicom) on the device created while plug-in the USB cable.
~~~~~{.bash}
$ sudo minicom --device=/dev/ttyUSB0 -b 115200
$ sudo minicom --device=/dev/ttyUSB1 -b 115200
~~~~~{.sh}
>:$ sudo minicom --device=/dev/ttyUSB0 -b 115200
>:$ sudo minicom --device=/dev/ttyUSB1 -b 115200
~~~~~~~~~~
> ***Notes:*** ttyUSB0 might not correspond to your first board, and ttyUSB1 to the second one.
......@@ -357,18 +342,18 @@ You first need to know which is the bus_id of your board
> ***Notes:*** The VUART is currently not working for this package, but the information is given for the next version. See [Know bugs sections](#known-bugs)
~~~~~{}
$ lspci | grep CERN
~~~~~{.sh}
>:$ lspci | grep CERN
02:00.0 Non-VGA unclassified device: CERN/ECP/EDU Device 018d (rev 03)
03:00.0 Non-VGA unclassified device: CERN/ECP/EDU Device 018d (rev 03)
~~~~~~~~~~
This mean that your first board (wr0) is at **02**:00.0 and the second one (wr1) is at **03**:00.0
Thus, for each board you can open a terminal and run the following command[^bugvuart] :
Thus, for each board you can open a terminal and run the following command:
~~~~~{.bash}
$ sudo tools/spec-vuart -b 02 #For the first SPEC board
$ sudo tools/spec-vuart -b 03 #For the second SPEC board
~~~~~{.sh}
>:$ sudo tools/spec-vuart -b 02 #For the first SPEC board
>:$ sudo tools/spec-vuart -b 03 #For the second SPEC board
~~~~~~~~~~
......@@ -404,17 +389,17 @@ Thus know we can perform the following operation:
* Check the if you have the correct SFP and its corresponding value[^sfpdetectbug]
~~~~~{.bash}
~~~~~{.sh}
wrc1# sfp detect
AXGE-3454-0531 #purple
wrc1# sfp match
SFP matched, dTx=46407, dRx=167843, alpha=-73622176
~~~~~~~
~~~~~{.bash}
~~~~~{.sh}
wrc2# sfp detect
AXGE-1254-0531 #blue
wrc# sfp match
wrc1# sfp match
SFP matched, dTx=46407, dRx=167843, alpha=73622176
~~~~~~~
......@@ -424,7 +409,7 @@ and check the [wrpc.pdf] that explain how to add SFPs parameters.
* Setup one board in master (the one with the purple SFP)
~~~~~{.bash}
~~~~~{.sh}
wrc1# mode master
SPLL_Init: running as Free-running Master, 1 ref channels, 2 out channels
Locking PLL...
......@@ -432,7 +417,7 @@ Locking PLL...
* And let the other one in slave mode (this should not be necessecary but you might have set it before in master mode)
~~~~~{.bash}
~~~~~{.sh}
wrc2# mode slave
slave
~~~~~~~
......@@ -442,8 +427,10 @@ slave
You should run the PTP daemon on both card
wrc1# ptp start
wrc2# ptp start
~~~~~{.sh}
wrc1# ptp start
wrc2# ptp start
~~~~~~~
And you should obtain the following message on the slave board:
......@@ -458,9 +445,11 @@ And you should obtain the following message on the slave board:
Finally you can run the WRC shell in `gui` mode to obtain more information
wrc2# gui
~~~~~{.sh}
wrc2# gui
~~~~~~~~~~
~~~~~{}
~~~~~{.sh}
WR PTP Core Sync Monitor v 1.0
Esc = exit
......@@ -494,7 +483,7 @@ Update counter: 117
You can see that the slave node is locked, calibrated and that the phase tracking is enabled.
> ***Notes: *** We also recommand you to setup an init script if you do not want to repeat these operations at each
> ***Notes: *** We also recommand you to set up an init script if you do not want to repeat these operations at each
reboot. You can look at the [wrpc.pdf] for more information or use the `init show` command to check the
one you have running.
......@@ -505,18 +494,17 @@ Bring up the network interface
-------------------------------
Once the drivers are loaded and the PTP has started you might need to bring the new network interfaces up.
In order to to this you should just execute:
In order to do this you should just execute:
~~~~{.bash}
$ sudo ifconfig wr0
$ sudo ifconfig wr1
~~~~{.sh}
>:$ sudo ifconfig wr0
>:$ sudo ifconfig wr1
~~~~~~~~~~~~
And then check if they are mount by doing
~~~~{.bash}
$ sudo ifconfig | grep wr
And then check if they are mounted by doing
~~~~{.sh}
>:$ sudo ifconfig | grep wr
wr0 Link encap:Ethernet HWaddr 08:00:30:0d:e8:6b
wr1 Link encap:Ethernet HWaddr 08:00:30:0d:e4:cd
~~~~~~~~~~~~
......@@ -535,7 +523,7 @@ oscilloscope by using the LEMO-BNC adapter provided in your package.
It is also recommended to follow the order of the tutorial as the concept you need to understand
are explained in the same order as the experiments.
> **Notes:** Before each experiment you should be sure to setup that your boards are in *master/slave* mode and that the PTP deamon are running on both.
> **Notes:** Before each experiment you should be sure to set up that your boards are in *master/slave* mode and that the PTP deamon are running on both.
Playing with the DIO channels
......@@ -569,9 +557,9 @@ The available modes are:
For example you can set it up like this
~~~~~{.bash}
# Configure channel 0 as input with termination, 1 as input, 4 as fixed low
$ sudo wr-dio-cmd wr0 mode Ii--0
~~~~~{.sh}
## Configure channel 0 as input with termination, 1 as input, 4 as fixed low
>:$ sudo wr-dio-cmd wr0 mode Ii--0
~~~~~~~~~~~~~~~~
> ***Notes:*** please note that the `pulse` command activate the DIO mode (without changing the termination)
......@@ -589,17 +577,17 @@ You should plug the LEMO cable in the connector #5 (channel 4), and connect the
Finally you need to trigger pulse in your oscilloscope. Then you can try the following commands:
~~~~~{.bash}
# Pulse channel 4 for 0.1 seconds now
$ sudo wr-dio-cmd wr0 pulse 4 .1 now
~~~~~{.sh}
## Pulse channel 4 for 0.1 seconds now
>:$ sudo wr-dio-cmd wr0 pulse 4 .1 now
#Pulse for 10 microseconds in the middle of the next second
$ sudo wr-dio-cmd wr0 pulse 4 .00001 +1.5
## Pulse for 10 microseconds in the middle of the next second
>:$ sudo wr-dio-cmd wr0 pulse 4 .00001 +1.5
# Pulse for 1ms at 17:00 today
# Set the datetime of the next event (60 seconds from now)
# NOTE: this only work if the date is correctly set in the master SPEC,
$ sudo wr-dio-cmd wr0 pulse 4 .001 $(date +%s --date 17:00)
## Pulse for 1ms at 17:00 today
## Set the datetime of the next event (60 seconds from now)
## NOTE: this only work if the date is correctly set in the master SPEC,
>:$ sudo wr-dio-cmd wr0 pulse 4 .001 $(date +%s --date 17:00)
~~~~~~~~
......@@ -608,8 +596,8 @@ $ sudo wr-dio-cmd wr0 pulse 4 .001 $(date +%s --date 17:00)
Once you have generated the pulse you can retrieve its timestamp by executing:
~~~~~{.bash}
$ sudo wr-dio-cmd wr0 stamp 4
~~~~~{.sh}
>:$ sudo wr-dio-cmd wr0 stamp 4
ch 4, 378.788588536
ch 4, 381.268701864
ch 4, 387.284885816
......@@ -632,26 +620,26 @@ The configuration is done as in the figure below:
![Time-stamping configuration](ssk_playdio.png)
~~~~~{.bash}
# Configure channel 2 of both boards (wr0 & wr1) as input with termination
$ sudo wr-dio-cmd wr0 mode 2 I
$ sudo wr-dio-cmd wr1 mode 2 I
~~~~~{.sh}
## Configure channel 2 of both boards (wr0 & wr1) as input with termination
>:$ sudo wr-dio-cmd wr0 mode 2 I
>:$ sudo wr-dio-cmd wr1 mode 2 I
# Then flush the previous timestamp
$ sudo wr-dio-cmd wr0 stamp &> /dev/null
$ sudo wr-dio-cmd wr1 stamp &> /dev/null
## Then flush the previous timestamp
>:$ sudo wr-dio-cmd wr0 stamp &> /dev/null
>:$ sudo wr-dio-cmd wr1 stamp &> /dev/null
# Schedule the pulse to the next common event on two outputs
$ sudo wr-dio-cmd wr0 pulse 0 .00001 +2
$ sudo wr-dio-cmd wr0 pulse 4 .00001 +2
## Schedule the pulse to the next common event on two outputs
>:$ sudo wr-dio-cmd wr0 pulse 0 .00001 +2
>:$ sudo wr-dio-cmd wr0 pulse 4 .00001 +2
#Then (after 60s), you should run stamp on the wr0
$ sudo wr-dio-cmd wr0 stamp
## Then (after 60s), you should run stamp on the wr0
>:$ sudo wr-dio-cmd wr0 stamp
ch 0, 2267.500000000
ch 2, 2267.500000008
ch 4, 2270.500000000
$ sudo wr-dio-cmd wr1 stamp
>:$ sudo wr-dio-cmd wr1 stamp
ch 2, 2270.500000008
~~~~~~~~~~~~~~~~~
......@@ -686,12 +674,12 @@ Once the synchronization is enabled, you just need to run the PPS from the comma
This program just fires a 1ms-long *pps* pulse on one of the output
channels.
~~~~~~{.bash}
# run pps on channel 2 of the default SPEC card
$ sudo tools/wr-dio-pps wr0 4
~~~~~~{.sh}
## run pps on channel 2 of the default SPEC card
>:$ sudo tools/wr-dio-pps wr0 4
# run pps on channel 0 of the "second" card
$ sudo tools/wr-dio-pps wr1 0
## run pps on channel 0 of the "second" card
>:$ sudo tools/wr-dio-pps wr1 0
~~~~~~~~~~
......@@ -707,9 +695,10 @@ add a 50-ohm resistor termination if the oscilloscope let you do it.
To stop the PPS you need to set the channel in output mode (low/high)
sudo tools/wr-dio-cmd wr0 mode 4 0
sudo tools/wr-dio-cmd wr1 mode 0 0
~~~~~{.sh}
sudo tools/wr-dio-cmd wr0 mode 4 0
sudo tools/wr-dio-cmd wr1 mode 0 0
~~~~~~~~
> ***Notes:*** In some cases, it
may happen that the leading edges differ by almost exactly 8ns; this
......@@ -771,13 +760,13 @@ The `stamp-frame` example supports two modes of operations. In
it waits for the forward frames and replies to them; in normal mode it
sends the forward frame and reports data as soon as it gets a reply.
~~~~~{.bash}
#On a terminal run
$ sudo tools/stamp-frame wr0 listen
~~~~~{.sh}
## On a terminal run
>:$ sudo tools/stamp-frame wr0 listen
tools/stamp-frame: Using interface wr0, with all timestamp options active
#On another terminal (maybe on another host) run
$ sudo tools/stamp-frame wr1
## On another terminal (maybe on another host) run
>:$ sudo tools/stamp-frame wr1
tools/stamp-frame: Using interface wr1, with all timestamp options active
timestamp T1: 1891.948736656
timestamp T2: 1892.038390176
......@@ -805,7 +794,7 @@ few seconds; the
*round trip time* is correct nonetheless, because it is a difference of
differences:
~~~~~{.bash}
~~~~~{.sh}
timestamp T1: 13.225249168
timestamp T2: 9.130237600
timestamp T3: 9.140438816
......@@ -909,12 +898,12 @@ The generated waveform should be a 0-5V pulse at ~100Hz (5ms at 5V then 5ms at 0
You should setup the channel 0 as input and check if the 100Hz signal is correctly timestamped:
~~~~~~{.bash}
# Set channel 0 of master board as Input.
$ sudo wr-dio-cmd wr0 mode 0 I
~~~~~~{.sh}
## Set channel 0 of master board as Input.
>:$ sudo wr-dio-cmd wr0 mode 0 I
# Retrieved the time stamped value
$ sudo wr-dio-cmd wr0 stamp
## Retrieved the time stamped value
>:$ sudo wr-dio-cmd wr0 stamp
ch 0, 3573.281851462
ch 0, 3573.291851460
ch 0, 3573.301851460
......@@ -935,9 +924,9 @@ Once you know that your input is correct, you need to capture each
event on channel 0 and replicate them with a delay of 1ms
on both the local (channel 3) and the remote card (channel 1)
~~~~~~{.bash}
# Creating the ruler to forward from input 0 to local3 and remote1
$ sudo wr-dio-ruler wr0 IN0 L3+0.001 R1+0.001
~~~~~~{.sh}
## Creating the ruler to forward from input 0 to local3 and remote1
>:$ sudo wr-dio-ruler wr0 IN0 L3+0.001 R1+0.001
wr-dio-ruler: configured for local channel 3, delay 0.001000000
wr-dio-ruler: configured for remote channel 1, delay 0.001000000
~~~~~~~~~~~~~
......@@ -946,17 +935,17 @@ wr-dio-ruler: configured for remote channel 1, delay 0.001000000
To check if the experiment works well you can compare the timestamp of the two outputs
~~~~~~~~{.bash}
# Checking the timestamp on local ouput
$ sudo wr-dio-cmd wr0 stamp 3
~~~~~~~~{.sh}
## Checking the timestamp on local ouput
>:$ sudo wr-dio-cmd wr0 stamp 3
ch 3, 5340.004864960
ch 3, 5340.014864960
ch 3, 5340.024864968
ch 3, 5340.034864964
...
# Checking the timestamp on remote ouput
$ sudo wr-dio-cmd wr1 stamp 1
## Checking the timestamp on remote ouput
>:$ sudo wr-dio-cmd wr1 stamp 1
ch 1, 5340.004864962
ch 1, 5340.014864960
ch 1, 5340.024864968
......@@ -990,30 +979,30 @@ The input events on `spusa` are replicated to one local channel and two remote c
with a delay of 1ms. The input events in this case are from a *pulse-per-second* signal from
channel 0.
~~~~~{.bash}
~~~~~{.sh}
spusa.root# wr-dio-pps wr0 0
>spusa:# wr-dio-pps wr0 0
tornado.root# wr-dio-agent wr0 &
>tornado:# wr-dio-agent wr0 &
spusa.root# wr-dio-ruler wr0 IN4 L3+.001 R4+.001 R2+.001
>spusa:# wr-dio-ruler wr0 IN4 L3+.001 R4+.001 R2+.001
wr-dio-ruler: configured for local channel 3, delay 0.001000000
wr-dio-ruler: configured for remote channel 4, delay 0.001000000
wr-dio-ruler: configured for remote channel 2, delay 0.001000000
[... wait a few seconds ...]
spusa.root# wr-dio-cmd wr0 stamp 3
>spusa:# wr-dio-cmd wr0 stamp 3
ch 3, 385.001000000
ch 3, 386.001000000
ch 3, 387.001000000
ch 3, 388.001000000
tornado.root# wr-dio-cmd wr0 stamp 2
>tornado:# wr-dio-cmd wr0 stamp 2
ch 2, 385.001000000
ch 2, 386.001000000
ch 2, 387.001000000
ch 2, 388.001000000
tornado.root# wr-dio-cmd wr0 stamp 4
>tornado:# wr-dio-cmd wr0 stamp 4
ch 4, 385.001000000
ch 4, 386.001000000
ch 4, 387.001000000
......@@ -1081,7 +1070,7 @@ The gateware is a wishbone PCIe bridge connected to a WB I2C module.
To synthetize it just follow the next steps:
~~~~~~{.bash}
~~~~~~{.sh}
## Checkout the code
svn checkout http://svn.ohwr.org/spec/trunk/hdl/golden@53 spec-golden
......@@ -1109,35 +1098,35 @@ You can download it from [wr-nic-v1.0.tar.gz](http://www.ohwr.org/projects/wr-ni
You first need to install the **lm32** compiler as suggested in [wrpc.pdf], then you need to compile using the specific configuration as bellow:
~~~~~~{.bash}
#Set up CROSS_COMPILE variable for this terminal
~~~~~~{.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 git://ohwr.org/hdl-core-lib/wr-cores/wrpc-sw.git
$ cd wrpc-sw
## Clone the repository
git clone git://ohwr.org/hdl-core-lib/wr-cores/wrpc-sw.git
cd wrpc-sw
#Checkout the stable release
$ git checkout -b wr-nic-v1.0 wr-nic-v1.0
## Checkout the stable release
git checkout -b wr-nic-v1.0 wr-nic-v1.0
~~~~~~~~~~
And finally configure & compile it
~~~~~~{.bash}
# Configuring the project for SPEC
$ make wrnic_defconfig
~~~~~~{.sh}
## Configuring the project for SPEC
make wrnic_defconfig
# Compile
$ make
## Compile
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.
~~~~~{.bash}
# Override the default embeded wrpc-sw
~~~~~{.sh}
## Override the default embeded wrpc-sw
cp wrc.ram <wr_root_folder>/wr-nic/syn/spec
~~~~~~~~~~~
......@@ -1149,12 +1138,12 @@ This step show us how to prepare the WR-NIC bitstream (SPEC+FMC DIO) with
the wrpc-sw (`wrc.ram` file) embeded inside.
~~~~~~{.bash}
~~~~~~{.sh}
## Checkout the code
git clone git://ohwr.org/white-rabbit/wr-nic.git
cd wr-nic
#Checkout the stable release
## Checkout the stable release
git checkout -b wr-nic-v1.0 wr-nic-v1.0
## Go to the main directory
......@@ -1187,7 +1176,7 @@ connecting them to the appropriate LEMO connectors of DIO FMC board:
Then in the wrc console just execute the following commands:
~~~~~~{.bash}
~~~~~~{.sh}
wrc# mode grandmaster
wrc# ptp start
~~~~~~~~~~~~~
......@@ -1203,7 +1192,7 @@ Known Bugs
The following command: `sudo tools/spec-vuart -b <dev_id>` does not show anything?
Virtual UART is not enable on the current release but will be available on the next one.
Virtual UART is not enabled on the current release but will be available on the next one.
Until the next release you should stick with the Physical UART: micro USB cable and minicom.
......@@ -1212,14 +1201,14 @@ Until the next release you should stick with the Physical UART: micro USB cable
When you try to match your SFPs and you obtain an error such as **Could not match to DB** you
need to add your own SFP parameters.
~~~~~{.bash}
# List your actual sfp database
~~~~~{.sh}
## List your actual sfp database
wrc# sfp show
# Erase the actual database if it was corrupted
## Erase the actual database if it was corrupted
wrc# sfp erase
# Add the parameters for the SFP provided in the starting kit
## Add the parameters for the SFP provided in the starting kit
wrc# sfp add AXGE-1254-0531 46407 167843 73622176
wrc# sfp add AXGE-3454-0531 46407 167843 -73622176
~~~~~~~~~~~
......@@ -1231,16 +1220,19 @@ and how to calibrate them.
If you get and error like the following:
$ sudo modprobe wr-nic
FATAL: Module wr_nic not found.
~~~~~~~{.sh}
>:$ sudo modprobe wr-nic
FATAL: Module wr_nic not found.
~~~~~~~~~
Be sure that you have run the `sudo depmod -a` command.
Otherwise you can still load the kernel modules with insmod using the following order:
$ sudo insmod kernel/fmc.ko
$ sudo insmod kernel/spec.ko
$ sudo insmod kernel/wr-nic.ko
~~~~~~~{.sh}
>:$ sudo insmod kernel/fmc.ko
>:$ sudo insmod kernel/spec.ko
>:$ sudo insmod kernel/wr-nic.ko
~~~~~~~~~~~~~
### The system hangs-up
......@@ -1271,7 +1263,7 @@ to bring them up. This is explained in the [Bring up the network interface](#bri
You have run
~~~~~{.bash}
~~~~~{.sh}
wrc# calibration force
Enabling ptracker channel: 0
LNK:
......@@ -1283,7 +1275,7 @@ And the calibration is doing an infinite loop.
Calibration is only available for slave and you need to be connected to a **working PTP master** master (SPEC in master mode or the switch) to be completed.
To configure your SPEC as a working PTP master, just execute in the wrpc shell of the other board:
~~~~~{.bash}
~~~~~{.sh}
wrc# sfp match
wrc# mode master
wrc# ptp start
......@@ -1305,7 +1297,7 @@ and use the *fmc-write-eeprom* module from the [spec-sw] project to flash the ee
insmod kernel/fmc-write-eeprom.ko file=/tmp/zero64k.bin busid=<busid_SPEC-DIO>
> ***Notes:*** By doing this you will loose all the SFP informations and therefore you will
> ***Notes:*** By doing this you will lose all the SFP informations and therefore you will
need to recalibrate "correctly" your boards.
......@@ -1337,6 +1329,7 @@ References
<!-- List of links -->
[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/
[spec-golden]: http://www.ohwr.org/projects/spec/repository/show/trunk/hdl/golden
......
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