|
# How to Build / Use the Demo
|
|
# How to Build / Use the Demo
|
|
|
|
|
|
## Synthesize the HDL
|
|
### Synthesize the HDL
|
|
|
|
|
|
- Demo source is found in pexaria2a-wishbone-demo.tar.xz on this page.
|
|
- Demo source is found in pexaria2a-wishbone-demo.tar.xz on this page.
|
|
- Read-only source is located at
|
|
- Read-only source is located at
|
... | @@ -13,7 +13,7 @@ |
... | @@ -13,7 +13,7 @@ |
|
- There should be no critical warnings
|
|
- There should be no critical warnings
|
|
- The 558 warnings are normal... sadly.
|
|
- The 558 warnings are normal... sadly.
|
|
|
|
|
|
## Install the Pexaria2a card
|
|
### Install the Pexaria2a card
|
|
|
|
|
|
- You can power it from any PCIe v1.1+ 4-lane slot
|
|
- You can power it from any PCIe v1.1+ 4-lane slot
|
|
- You can power it from the external power input
|
|
- You can power it from the external power input
|
... | @@ -22,7 +22,7 @@ |
... | @@ -22,7 +22,7 @@ |
|
device. A hard reset will depower the device and lose the
|
|
device. A hard reset will depower the device and lose the
|
|
programming.
|
|
programming.
|
|
|
|
|
|
## Program the device
|
|
### Program the device
|
|
|
|
|
|
- Open quartus
|
|
- Open quartus
|
|
- Tools, Programmer
|
|
- Tools, Programmer
|
... | @@ -37,7 +37,7 @@ |
... | @@ -37,7 +37,7 @@ |
|
- Select the Program/Configure checkbox
|
|
- Select the Program/Configure checkbox
|
|
- Start
|
|
- Start
|
|
|
|
|
|
## Confirm access to the LM32 over JTAG
|
|
### Confirm access to the LM32 over JTAG
|
|
|
|
|
|
- Close the programmer (and Signal Tap)
|
|
- Close the programmer (and Signal Tap)
|
|
- Edit the lm32-ctl script, line 4, to set the path to quartus\_stp on
|
|
- Edit the lm32-ctl script, line 4, to set the path to quartus\_stp on
|
... | @@ -47,7 +47,7 @@ |
... | @@ -47,7 +47,7 @@ |
|
to the LEDs:
|
|
to the LEDs:
|
|
- write 0x100400 0x55
|
|
- write 0x100400 0x55
|
|
|
|
|
|
## Install the lm32 compiler toolchain
|
|
### Install the lm32 compiler toolchain
|
|
|
|
|
|
- The toolchain is compiled for 32-bit linux, so if you run 64-bit
|
|
- The toolchain is compiled for 32-bit linux, so if you run 64-bit
|
|
linux install the 32-bit compatibility libraries (called ia32-libs
|
|
linux install the 32-bit compatibility libraries (called ia32-libs
|
... | @@ -61,7 +61,7 @@ |
... | @@ -61,7 +61,7 @@ |
|
export PATH=/my-path-to/lm32/bin:$PATH
|
|
export PATH=/my-path-to/lm32/bin:$PATH
|
|
exec "/my-path-to/lm32/bin/\`basename $0\`" "$@"
|
|
exec "/my-path-to/lm32/bin/\`basename $0\`" "$@"
|
|
|
|
|
|
## Compile the blink-demo firmware
|
|
### Compile the blink-demo firmware
|
|
|
|
|
|
- Extract it from the archive
|
|
- Extract it from the archive
|
|
- Enter the folder in a linux console
|
|
- Enter the folder in a linux console
|
... | @@ -69,14 +69,14 @@ |
... | @@ -69,14 +69,14 @@ |
|
- You should now have a 'blink.elf' file suitable for the LM32 over
|
|
- You should now have a 'blink.elf' file suitable for the LM32 over
|
|
JTAG
|
|
JTAG
|
|
|
|
|
|
## Load the blink demo
|
|
### Load the blink demo
|
|
|
|
|
|
- Enter the blink-demo folder
|
|
- Enter the blink-demo folder
|
|
- Execute lm32-ctl
|
|
- Execute lm32-ctl
|
|
- load blink.elf
|
|
- load blink.elf
|
|
- You should now see the LEDs cycling
|
|
- You should now see the LEDs cycling
|
|
|
|
|
|
## Configure the PCIe linux driver
|
|
### Configure the PCIe linux driver
|
|
|
|
|
|
- Install linux, including kernel sources/headers for your system
|
|
- Install linux, including kernel sources/headers for your system
|
|
- Decompress the driver, pcie\_wb-0.1.tar.xz, on this page.
|
|
- Decompress the driver, pcie\_wb-0.1.tar.xz, on this page.
|
... | @@ -91,7 +91,7 @@ |
... | @@ -91,7 +91,7 @@ |
|
"pcie\_wb", and a kernel message (dmesg) like "pcie\_wb
|
|
"pcie\_wb", and a kernel message (dmesg) like "pcie\_wb
|
|
0000:01:00.0: irq 43 for MSI/MSI-X"
|
|
0000:01:00.0: irq 43 for MSI/MSI-X"
|
|
|
|
|
|
## Compile the Etherbone library
|
|
### Compile the Etherbone library
|
|
|
|
|
|
- Decompress the library, etherbone-api.tar.xz, on this page.
|
|
- Decompress the library, etherbone-api.tar.xz, on this page.
|
|
- The driver is also available from git at
|
|
- The driver is also available from git at
|
... | @@ -104,7 +104,7 @@ |
... | @@ -104,7 +104,7 @@ |
|
should see three devices
|
|
should see three devices
|
|
- Play with the LEDs "eb-write dev/pcie\_wb0 0x100400/4 0xff"
|
|
- Play with the LEDs "eb-write dev/pcie\_wb0 0x100400/4 0xff"
|
|
|
|
|
|
## Program the LM32 over the PCIe bus
|
|
### Program the LM32 over the PCIe bus
|
|
|
|
|
|
- Raise the LM32 reset line (to stop it running / clear I-cache):
|
|
- Raise the LM32 reset line (to stop it running / clear I-cache):
|
|
"eb-write dev/pcie\_wb0 0x100404/4 0x1"
|
|
"eb-write dev/pcie\_wb0 0x100404/4 0x1"
|
... | | ... | |