Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,26 +169,21 @@ board.
### On a Linux* System

1. Generate the `Makefile` by running `cmake`.
```
mkdir build
cd build
```
To compile for the default target (the Agilex® device family), run `cmake` using the command:
```
cmake ..
```

> **Note**: You can change the default target by using the command:
> ```
> cmake .. -DFPGA_DEVICE=<FPGA device family or FPGA part number>
> ```
>
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
> ```
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
```
mkdir build
cd build
cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
```
> **Note**: You **must** set `FPGA_DEVICE` to point to a BSP in order to build this sample. You can poll your system for available BSPs using the `aoc -list-boards` command. The board list that is printed out will be of the form
> ```
> $> aoc -list-boards
> Board list:
> <board-variant>
> Board Package: <path/to/board/package>/board-support-package
>
> <board-variant2>
> Board Package: <path/to/board/package>/board-support-package
> ```

2. Compile the design through the generated `Makefile`. The following build
targets are provided, matching the recommended development flow:
Expand All @@ -213,25 +208,21 @@ board.
### On a Windows* System

1. Generate the `Makefile` by running `cmake`.
```
mkdir build
cd build
```
To compile for the default target (the Agilex® device family), run `cmake` using the command:
```
cmake -G "NMake Makefiles" ..
```
> **Note**: You can change the default target by using the command:
> ```
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<FPGA device family or FPGA part number>
> ```
>
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
> ```
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
```
mkdir build
cd build
cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
```
> **Note**: You **must** set `FPGA_DEVICE` to point to a BSP in order to build this sample. You can poll your system for available BSPs using the `aoc -list-boards` command. The board list that is printed out will be of the form
> ```
> $> aoc -list-boards
> Board list:
> <board-variant>
> Board Package: <path/to/board/package>/board-support-package
>
> <board-variant2>
> Board Package: <path/to/board/package>/board-support-package
> ```

2. Compile the design through the generated `Makefile`. The following build
targets are provided, matching the recommended development flow:
Expand All @@ -253,10 +244,10 @@ board.
nmake fpga
```

> **Note**: If you encounter any issues with long paths when compiling under
Windows*, you may have to create your ‘build’ directory in a shorter path, for
example c:\samples\build. You can then run cmake from that directory, and
provide cmake with the full path to your sample directory.
>**Note**: If you encounter any issues with long paths when compiling under Windows*, you may have to create your 'build' directory in a shorter path, for example `C:\samples\build`. You can then run cmake from that directory, and provide cmake with the full path to your sample directory, for example
> ```
> C:\samples\build> cmake -G "NMake Makefiles" C:\long\path\to\code\sample\CMakeLists.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this part overkill, don't you think?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i always find an example helpful.

If I found it overkill i wouldn't have written it :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but here we are showing how to use cmake which is orthogonal to what the sample is trying to show.
We could also explain how to install cmake, etc.
I feel like we should expect people to know how to use the tools (e.g. we expect people to know how to open a terminal, navigate to the appropriate folder, etc.)
We give then the necessary info to run cmake in our particular context (the flags we use), but I don't view it as necessary to give them more general information such as how to run cmake from a different folder than the build directory that we just explained them above

> ```

## Examining the Reports
Locate the pair of `report.html` files in the `mem_channel_interleaving.prj`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ set(FPGA_TARGET_NO_INTERLEAVING ${TARGET_NAME}_no_interleaving.fpga)

# FPGA board selection
if(NOT DEFINED FPGA_DEVICE)
set(FPGA_DEVICE "Agilex7")
message(STATUS "FPGA_DEVICE was not specified.\
\nConfiguring the design to the default FPGA family: ${FPGA_DEVICE}\
\nPlease refer to the README for information on target selection.")
message(FATAL_ERROR "You must set FPGA_DEVICE to point to your BSP in order to build this sample.\ne.g. cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>")
else()
message(STATUS "Configuring the design with the following target: ${FPGA_DEVICE}")
endif()
Expand Down