Skip to content

Commit 0418d25

Browse files
authored
Merge pull request #2464 from whitepau/simplify-niosv-sim
Simplify niosv sim
2 parents a97a783 + 1c187fa commit 0418d25

File tree

4 files changed

+32
-20
lines changed

4 files changed

+32
-20
lines changed

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/niosv/.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,18 @@ pd_system_tb
1111
# ignore generated RTL for Platform Designer system
1212
/ip/*/*/
1313
!/ip/*/
14-
!/ip/*/*.ip
14+
!/ip/*/*.ip
15+
16+
# ignore Questa outputs
17+
transcript
18+
simulation_files/libraries
19+
simulation_files/*.ver
20+
simulation_files/*.ini
21+
simulation_files/transcript
22+
simulation_files/*.wlf
23+
simulation_files/*.vstf
24+
simulation_files/*.dat
25+
simulation_files/*.hex
26+
simulation_files/*.mif
27+
simulation_files/*.f
28+
simulation_files/*.log

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/niosv/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ You can manually follow the steps below, or run the `build_and_sim_testsystem.tc
263263
264264
1. Navigate to the `/simulation_files` directory
265265
266-
2. Run the simulation script:
266+
2. Run the simulation script (this happens automatically if you use `build_and_sim_testsystem.tcl`):
267267
268268
```bash
269269
vsim -c -do test_nios_commandline.tcl
@@ -281,11 +281,20 @@ You can manually follow the steps below, or run the `build_and_sim_testsystem.tc
281281
# Software will now exit.
282282
```
283283
284-
>**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:
284+
4. View the simulation waveform:
285+
286+
```bash
287+
vsim -view simulation_files/vsim.wlf -do simulation_files/wave.do
288+
```
289+
290+
291+
>**Note**: If you encounter any issues with long paths when compiling under Windows*, you may have to copy this code sample (that is, the contents of the `niosv` direcotry) to a directory with a shorter path, for example `C:\niosv`. You can then run the `build_and_sim_testsystem.tcl` script from that directory, for example:
285292
>
286-
> ```
287-
> C:\samples\build> cmake -G "NMake Makefiles" C:\long\path\to\code\sample\CMakeLists.txt
288-
> ```
293+
> ```
294+
> :: Shared 'include' directory contains "exception_handler.hpp".
295+
> SET "INCLUDE=C:\long\path\to\code\sample\..\..\include;%INCLUDE%"
296+
> C:\niosv> quartus_sh.exe -t build_and_sim_testsystem.tcl
297+
> ```
289298
## License
290299
291300
Code samples are licensed under the MIT license. See [License.txt](/License.txt) for details.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/niosv/simulation_files/.gitignore

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
add wave -group "Nios V" -radix hexadecimal -position insertpoint sim:/pd_system_tb/pd_system_inst/nios/*
2-
add wave -group "Code & Data RAM" -radix hexadecimal -position insertpoint sim:/pd_system_tb/pd_system_inst/code_data_ram/*
3-
add wave -group "Accelerator" -radix hexadecimal -position insertpoint sim:/pd_system_tb/pd_system_inst/simple_dma_accelerator/*
1+
add wave -group "Nios V" -radix hexadecimal -position insertpoint /pd_system_tb/pd_system_inst/nios/*
2+
add wave -group "Code & Data RAM" -radix hexadecimal -position insertpoint /pd_system_tb/pd_system_inst/code_data_ram/*
3+
add wave -group "Accelerator" -radix hexadecimal -position insertpoint /pd_system_tb/pd_system_inst/simple_dma_accelerator/*
44
55
config wave -signalnamewidth 1

0 commit comments

Comments
 (0)