Commit 6a9a7072 authored by Benoit Rat's avatar Benoit Rat

doc: improve etherbone explanation

parent df21cdb3
......@@ -1570,21 +1570,26 @@ Manage standalone node using etherbone
You can also use SPEC card in standalone mode as we have seen before
but... how can you configure spec card if you do not use drivers?
In wr-nic project, Etherbone core has been added to design and it allows
to you access directly to the memory map (wishbone registers) using
In wr-nic project, Etherbone core has been added to the design and it allows
a direct access to the memory map[^specmem] (wishbone registers) using
UDP/TCP packets.
Thus in order to connect you to the [SPEC+FMCDIO] in standlone you must
configure it with a valid IP. This can be automatically (complex) using bootp protocol,
In order to connect you to the [SPEC+FMCDIO] in standlone you must
first configure it with a valid IP. This can be done automatically (complex) using bootp protocol,
or manually (easy) through the WRC mini-USB UART.
[^specmem]: If you are still connected through the PCIe you can also use the tools
`spec-sw/tools/specmem` to directly read/write on the WB registers as you will
do with the etherbone tool.
### Set IP using BootP
This is the more complex way to do it because you need to create a BootP server
on your LAN, but then the IP of each standalone board can be automatically
asigned.
On Ubuntu the `dnsmasq` packet can be used as BootP deamon. The configuration
On Ubuntu the `dnsmasq` package can be used as BootP deamon. The configuration
file should be something similar as:
~~~~~~~{.sh}
......@@ -1609,18 +1614,18 @@ Then you should just write in the terminal:
wrc# ip set 10.10.10.10
~~~~~~~~~~~~
If you want this value to be kept the IP after a power cycle you must write it in the
init EEPROM script as explained [previously](#eeprom-boot-script)
If you want this IP to be kept after a power cycle you must write it in the
init EEPROM script as explained [previously](#eeprom-boot-script).
### Access to the wishbone device
At this step, you need to connect the standalone device with your PC. If you
do not have any SFP interface on your PC you can use an SFP-RJ45 adapter
to perform this step.
to connect to it.
You need to check that your interface is on the same LAN as the standalone
[SPEC+FMCDIO] board or set it manually if it is not the case:
[SPEC+FMCDIO] board or you should set it manually if it is not the case:
~~~~~~~{.sh}
>:$ sudo ifconfig eth1 10.10.10.1
......@@ -1631,21 +1636,23 @@ Finally you can try the etherbone library to connect to your standalone
your platform by doing `make && sudo make install` in the main folder or by going to
`etherbone/api` and perform a `make clean && make && sudo make install`.
To ease this procedure, we have added the `eb-mem.sh` tool in scripts
folder that access the etherbone library to connect with the device and perform
To ease the communication using etherbone, we have added the `eb-mem.sh` tool in the `scripts/`
folder that access through the etherbone library to the device and perform
read/write operations.
\clearpage
Below we display a quick example on how to use it.
~~~~~~{.sh}
## It shows you Device memory map
>:$ scripts/eb-mem.sh --scan --ip 10.10.10.10
## Read a memory address
>:$ scripts/eb-mem.sh --read --ip 10.10.10.10 --address 0x62000
## Read a memory address (DIO I/O mode register <=> 62000 + 300 + 3C)
>:$ scripts/eb-mem.sh --read --ip 10.10.10.10 --address 0x6233C
## Write a memory address
>:$ scripts/eb-mem.sh --write --ip 10.10.10.10 --address 0x62000 --value 0x01
## Write a memory address (DIO I/O mode register <=> 62000 + 300 + 3C)
## Force only ch2 (#3) into P mode (forbidden operation while using wr-dio-cmd)
>:$ scripts/eb-mem.sh --write --ip 10.10.10.10 --address 0x6233C --value 0x00A00
## Show help
>:$ scripts/eb-mem.sh --help
......
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