7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-03 05:16:33 +00:00

Update LiteX setup guide

This commit is contained in:
Nate Meyer 2024-10-14 05:36:31 +00:00 committed by GitHub
parent f890e65a51
commit 4746f10b16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,23 @@
The FPGA gateware for the Thunderscope is supported by the [ThunderScope Litex Repo](https://github.com/EEVengers/thunderscope_litex).
### Prebuilt Bitstreams
Prebuilt bitstreams are available from the [ThunderScope LiteX Repo Releases](https://github.com/EEVengers/thunderscope_litex/releases).
You can download the appropriate file for your FPGA variant there.
Use [openFPGALoader](https://github.com/trabucayre/openFPGALoader) to flash a new bitstream to your ThunderScope.
```shell
> openFPGALoader --fpga-part [FPGA_PART] -f -c digilent_hs2 thunderscope_aXXX.bit
```
where the `FPGA_PART` is one of:
- `xc7a200tfbg484`
- `xc7a100tfgg484`
- `xc7a50tcsg324`
### Build
1. Install Vivado, Python3, and LiteX.
@ -32,32 +49,28 @@ Available Variants:
### Linux
The Linux driver for the LiteX build is generated by the litex gateware project.
The Linux driver for the LiteX build is available from the [ts_litex_driver_linux Repo](https://github.com/EEVengers/ts_litex_driver_linux)
1. Build and install the LitePCIe Driver project using make.
```sh
$ cd software/kernel
$ cd kernel/
$ make
$ sudo ./init.sh
```
### Windows
The Windows driver for the LiteX build is available from the [LitePCIe Windows Driver Repo](https://github.com/NateMeyer/litepcie_driver_win)
The Windows driver for the LiteX build is available from the [ts_litex_driver_win Repo](https://github.com/EEVengers/ts_litex_driver_win)
1. Install the prerequisites as described in the driver project's README, including either the Windows WDK and KMDF or the EWDK command line tools.
2. After building the litex gateware, copy the csr and soc header files from the Linux driver to the Windows driver
```sh
> cp ./thunderscope_litex/software/kernel/csr.h ./litepcie_driver_win/litepciedrv/public_h/csr.h
> cp ./thunderscope_litex/software/kernel/soc.h ./litepcie_driver_win/litepciedrv/public_h/soc.h
```
3. Build the LitePCIe Driver project by opening the .vcxproj file in Visual Studio, Or launching the EWDK build environment.
2. Build the LitePCIe Driver project by opening the .vcxproj file in Visual Studio, Or launching the EWDK build environment.
```cmd
> C:\EWDK\LaunchBuildEnv.cmd
> msbuild litepciedrv.vcxproj /p:Configuration=Release /p:Platform=x64
> cd litepciedrv
> buildall.bat
```
The Driver file is found in the `litepciedrv/x64/Release/litepciedrv` folder.
@ -96,20 +109,33 @@ Libtslitex uses the CMake build environment.
Management of Data buffers and data triggering is provided by the TS.NET project.
1. Clone the [TS.NET Repo](https://github.com/macaba/TS.NET)
1. Clone the [TS.NET Repo](https://github.com/EEVengers/TS.NET)
2. Build the TS.NET.Engine project using the included build script.
```cmd
> cd build-scripts
> powershell -ExecutionPolicy Bypass -File "TS.NET.Engine (win-x64).ps1"
```
> Windows
> ```cmd
> > cd build-scripts
> > powershell -ExecutionPolicy Bypass -File "TS.NET.Engine (win-x64).ps1"
> ```
> Linux
> ```shell
> > cd build-scripts
> > ./TS.NET.Engine\ (linux-x64).bash
> ```
3. Copy the tslitex library file into the TS.NET.Engine build directory
```cmd
> cp libtslitex/build/Release/tslitex.dll TS.NET/builds/win-x64/TS.NET.Engine/0.1.0/tslitex.dll
```
> Windows
> ```cmd
> > cp libtslitex/build/Release/tslitex.dll TS.NET/builds/win-x64/TS.NET.Engine/0.1.0/tslitex.dll
> ```
> Linux
> ```shell
> > cp libtslitex/build/artifacts/libtslitex/libtslitex.so TS.NET/builds/linux-x64/TS.NET.Engine/0.1.0/libtslitex.so
> ```
4. Change the configured HardwareDriver in the thunderscope.yaml file to LiteX