SAIFIINDUSTRIES commited on
Commit
e3c2ab6
·
verified ·
1 Parent(s): 6b98160

Add Batch 4 with 10 repos

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +6 -0
  2. HDLForBeginners_Examples/30092022_testbench_start_finish/30092022_testbench_start_finish.tcl +1426 -0
  3. HDLForBeginners_Examples/30092022_testbench_start_finish/README.md +29 -0
  4. HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/sim/data_fifo.v +522 -0
  5. HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/simulation/fifo_generator_vlog_beh.v +0 -0
  6. HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/synth/data_fifo.vhd +857 -0
  7. HDLForBeginners_Examples/30092022_testbench_start_finish/ip/xfft_0/sim/xfft_0.vhd +241 -0
  8. HDLForBeginners_Examples/30092022_testbench_start_finish/ip/xfft_0/synth/xfft_0.vhd +248 -0
  9. HDLForBeginners_Examples/30092022_testbench_start_finish/py/cic_comp_filter.py +17 -0
  10. HDLForBeginners_Examples/30092022_testbench_start_finish/py/gen_stimulus.py +33 -0
  11. HDLForBeginners_Examples/30092022_testbench_start_finish/py/receive_fft.py +46 -0
  12. HDLForBeginners_Examples/30092022_testbench_start_finish/py/testbench.py +30 -0
  13. HDLForBeginners_Examples/30092022_testbench_start_finish/src/crc_gen.sv +103 -0
  14. HDLForBeginners_Examples/30092022_testbench_start_finish/src/dc_removal.sv +85 -0
  15. HDLForBeginners_Examples/30092022_testbench_start_finish/src/endian_switch.sv +48 -0
  16. HDLForBeginners_Examples/30092022_testbench_start_finish/src/eth_header_gen.sv +47 -0
  17. HDLForBeginners_Examples/30092022_testbench_start_finish/src/eth_rst_gen.sv +89 -0
  18. HDLForBeginners_Examples/30092022_testbench_start_finish/src/ethernet_header_pkg.sv +22 -0
  19. HDLForBeginners_Examples/30092022_testbench_start_finish/src/ethernet_top.sv +250 -0
  20. HDLForBeginners_Examples/30092022_testbench_start_finish/src/packet_gen.sv +471 -0
  21. HDLForBeginners_Examples/30092022_testbench_start_finish/src/parzen.sv +262 -0
  22. HDLForBeginners_Examples/30092022_testbench_start_finish/src/pdm_clk_gen.sv +91 -0
  23. HDLForBeginners_Examples/30092022_testbench_start_finish/src/pdm_microphone.sv +96 -0
  24. HDLForBeginners_Examples/30092022_testbench_start_finish/src/rst_gen.sv +45 -0
  25. HDLForBeginners_Examples/30092022_testbench_start_finish/src/triangle_gen.sv +100 -0
  26. HDLForBeginners_Examples/30092022_testbench_start_finish/tb/ethernet_tb.sv +104 -0
  27. HDLForBeginners_Examples/30092022_testbench_start_finish/tb/lfsr_8bit.sv +51 -0
  28. HDLForBeginners_Examples/30092022_testbench_start_finish/tb/log_data.sv +41 -0
  29. HDLForBeginners_Examples/30092022_testbench_start_finish/tb/read_stim.sv +53 -0
  30. HDLForBeginners_Examples/LED_Flash/src/led_flash.sv +78 -0
  31. HDLForBeginners_Examples/LED_Flash/tb/led_flash_tb.sv +53 -0
  32. HDLForBeginners_Examples/LFSR4Bit/lfsr_4Bit.tcl +529 -0
  33. HDLForBeginners_Examples/LFSR4Bit/src/lfsr_4bit_top.sv +50 -0
  34. HDLForBeginners_Examples/LFSR4Bit/tb/lfsr_4bit_tb.sv +56 -0
  35. HDLForBeginners_Examples/NexysBaseProject/NexysBaseProject.tcl +579 -0
  36. HDLForBeginners_Examples/NexysBaseProject/src/NexysBaseProject_top.sv +178 -0
  37. HDLForBeginners_Examples/NexysBaseProject/src/debounce.sv +65 -0
  38. HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv +46 -0
  39. HDLForBeginners_Examples/NexysBaseProject/src/eth_rst_gen.sv +83 -0
  40. HDLForBeginners_Examples/NexysBaseProject/src/rst_gen.sv +45 -0
  41. HDLForBeginners_Examples/NexysBaseProject/src/version.vh +2 -0
  42. HDLForBeginners_Examples/NexysBaseProject/tb/NexysBaseProject_tb.sv +54 -0
  43. HDLForBeginners_Examples/NexysBaseProject/tcl/post-build.tcl +45 -0
  44. HDLForBeginners_Examples/UART/src/uart.sv +80 -0
  45. HDLForBeginners_Examples/UART/src/uart_tx.sv +384 -0
  46. HDLForBeginners_Examples/UART/tb/lfsr_8bit.sv +51 -0
  47. HDLForBeginners_Examples/UART/tb/uart_tb.sv +99 -0
  48. HDLForBeginners_Examples/UART/uart.tcl +569 -0
  49. HDLForBeginners_Examples/ZynqSeries/fibonacci.sv +70 -0
  50. HDLForBeginners_Examples/ZynqSeries/fibonacci_bram.sv +112 -0
.gitattributes CHANGED
@@ -83,3 +83,9 @@ The-OpenROAD-Project_OpenROAD-flow-scripts/flow/designs/src/coyote/coyote.sv2v.v
83
  OpenTimer_OpenTimer/benchmark/vga_lcd/vga_lcd.v filter=lfs diff=lfs merge=lfs -text
84
  hguq_HG-PIPE/SPINAL/BlockSequence_bb.v filter=lfs diff=lfs merge=lfs -text
85
  hguq_HG-PIPE/SPINAL/vivado/BlockSequence_bb_replaced.v filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
83
  OpenTimer_OpenTimer/benchmark/vga_lcd/vga_lcd.v filter=lfs diff=lfs merge=lfs -text
84
  hguq_HG-PIPE/SPINAL/BlockSequence_bb.v filter=lfs diff=lfs merge=lfs -text
85
  hguq_HG-PIPE/SPINAL/vivado/BlockSequence_bb_replaced.v filter=lfs diff=lfs merge=lfs -text
86
+ efabless_caravel_mpw-one/verilog/gl/DFFRAM.v filter=lfs diff=lfs merge=lfs -text
87
+ efabless_caravel_mpw-one/verilog/gl/mgmt_core.v filter=lfs diff=lfs merge=lfs -text
88
+ lamda-bbo_Open3DBench/OpenROAD-3D/flow/designs/nangate45/bp_quad/bsg_chip_block.sv2v.v filter=lfs diff=lfs merge=lfs -text
89
+ lamda-bbo_Open3DBench/OpenROAD-3D/flow/designs/nangate45_3D/bp_quad/bsg_chip_block.sv2v.v filter=lfs diff=lfs merge=lfs -text
90
+ lamda-bbo_Open3DBench/OpenROAD-3D/flow/designs/src/bp_quad/bsg_chip_block.sv2v.v filter=lfs diff=lfs merge=lfs -text
91
+ lamda-bbo_Open3DBench/OpenROAD-3D/flow/designs/src/coyote/coyote.sv2v.v filter=lfs diff=lfs merge=lfs -text
HDLForBeginners_Examples/30092022_testbench_start_finish/30092022_testbench_start_finish.tcl ADDED
@@ -0,0 +1,1426 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #*****************************************************************************************
2
+ # Vivado (TM) v2021.1 (64-bit)
3
+ #
4
+ # eth_pdm_fft.tcl: Tcl script for re-creating project 'eth_pdm_fft'
5
+ #
6
+ # Generated by Vivado on Wed Sep 28 21:50:21 SAST 2022
7
+ # IP Build 3246043 on Fri Jun 11 00:30:35 MDT 2021
8
+ #
9
+ # This file contains the Vivado Tcl commands for re-creating the project to the state*
10
+ # when this script was generated. In order to re-create the project, please source this
11
+ # file in the Vivado Tcl Shell.
12
+ #
13
+ # * Note that the runs in the created project will be configured the same way as the
14
+ # original project, however they will not be launched automatically. To regenerate the
15
+ # run results please launch the synthesis/implementation runs as needed.
16
+ #
17
+ #*****************************************************************************************
18
+ # NOTE: In order to use this script for source control purposes, please make sure that the
19
+ # following files are added to the source control system:-
20
+ #
21
+ # 1. This project restoration tcl script (eth_pdm_fft.tcl) that was generated.
22
+ #
23
+ # 2. The following source(s) files that were local or imported into the original project.
24
+ # (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
25
+ #
26
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/ip/window_multiplier/window_multiplier.xci"
27
+ #
28
+ # 3. The following remote source files that were added to the original project:-
29
+ #
30
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/ip/data_fifo/data_fifo.xci"
31
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/ip/cic_compiler/cic_compiler_0.xci"
32
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/ip/clk_wiz_0/clk_wiz_0.xci"
33
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/crc_gen.sv"
34
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/endian_switch.sv"
35
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/ethernet_header_pkg.sv"
36
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/eth_header_gen.sv"
37
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/eth_rst_gen.sv"
38
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/packet_gen.sv"
39
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/parzen.sv"
40
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/pdm_clk_gen.sv"
41
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/pdm_microphone.sv"
42
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/rst_gen.sv"
43
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/triangle_gen.sv"
44
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/src/ethernet_top.sv"
45
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/ip/xfft_0/xfft_0.xci"
46
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/xdc/Nexys-A7-100T-Master.xdc"
47
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/tb/log_data.sv"
48
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/tb/read_stim.sv"
49
+ # "/media/edata/git/Examples/30_sep_2022_testbench_start_finish/tb/ethernet_tb.sv"
50
+ #
51
+ #*****************************************************************************************
52
+
53
+ # Check file required for this script exists
54
+ proc checkRequiredFiles { origin_dir} {
55
+ set status true
56
+ set files [list \
57
+ "[file normalize "$origin_dir/ip/window_multiplier/window_multiplier.xci"]"\
58
+ ]
59
+ foreach ifile $files {
60
+ if { ![file isfile $ifile] } {
61
+ puts " Could not find local file $ifile "
62
+ set status false
63
+ }
64
+ }
65
+
66
+ set files [list \
67
+ "[file normalize "$origin_dir/ip/data_fifo/data_fifo.xci"]"\
68
+ "[file normalize "$origin_dir/ip/cic_compiler/cic_compiler_0.xci"]"\
69
+ "[file normalize "$origin_dir/ip/clk_wiz_0/clk_wiz_0.xci"]"\
70
+ "[file normalize "$origin_dir/src/crc_gen.sv"]"\
71
+ "[file normalize "$origin_dir/src/endian_switch.sv"]"\
72
+ "[file normalize "$origin_dir/src/ethernet_header_pkg.sv"]"\
73
+ "[file normalize "$origin_dir/src/eth_header_gen.sv"]"\
74
+ "[file normalize "$origin_dir/src/eth_rst_gen.sv"]"\
75
+ "[file normalize "$origin_dir/src/packet_gen.sv"]"\
76
+ "[file normalize "$origin_dir/src/parzen.sv"]"\
77
+ "[file normalize "$origin_dir/src/pdm_clk_gen.sv"]"\
78
+ "[file normalize "$origin_dir/src/pdm_microphone.sv"]"\
79
+ "[file normalize "$origin_dir/src/rst_gen.sv"]"\
80
+ "[file normalize "$origin_dir/src/triangle_gen.sv"]"\
81
+ "[file normalize "$origin_dir/src/ethernet_top.sv"]"\
82
+ "[file normalize "$origin_dir/ip/xfft_0/xfft_0.xci"]"\
83
+ "[file normalize "$origin_dir/xdc/Nexys-A7-100T-Master.xdc"]"\
84
+ "[file normalize "$origin_dir/tb/log_data.sv"]"\
85
+ "[file normalize "$origin_dir/tb/read_stim.sv"]"\
86
+ "[file normalize "$origin_dir/tb/ethernet_tb.sv"]"\
87
+ ]
88
+ foreach ifile $files {
89
+ if { ![file isfile $ifile] } {
90
+ puts " Could not find remote file $ifile "
91
+ set status false
92
+ }
93
+ }
94
+
95
+ return $status
96
+ }
97
+ # Set the reference directory for source file relative paths (by default the value is script directory path)
98
+ set origin_dir [file dirname [info script]]
99
+
100
+ # Use origin directory path location variable, if specified in the tcl shell
101
+ if { [info exists ::origin_dir_loc] } {
102
+ set origin_dir $::origin_dir_loc
103
+ }
104
+
105
+ # Set the project name
106
+ set _xil_proj_name_ "30_sep_2022_testbench_start_finish"
107
+
108
+ # Use project name variable, if specified in the tcl shell
109
+ if { [info exists ::user_project_name] } {
110
+ set _xil_proj_name_ $::user_project_name
111
+ }
112
+
113
+ variable script_file
114
+ set script_file "30_sep_2022_testbench_start_finish.tcl"
115
+
116
+ # Help information for this script
117
+ proc print_help {} {
118
+ variable script_file
119
+ puts "\nDescription:"
120
+ puts "Recreate a Vivado project from this script. The created project will be"
121
+ puts "functionally equivalent to the original project for which this script was"
122
+ puts "generated. The script contains commands for creating a project, filesets,"
123
+ puts "runs, adding/importing sources and setting properties on various objects.\n"
124
+ puts "Syntax:"
125
+ puts "$script_file"
126
+ puts "$script_file -tclargs \[--origin_dir <path>\]"
127
+ puts "$script_file -tclargs \[--project_name <name>\]"
128
+ puts "$script_file -tclargs \[--help\]\n"
129
+ puts "Usage:"
130
+ puts "Name Description"
131
+ puts "-------------------------------------------------------------------------"
132
+ puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
133
+ puts " origin_dir path value is \".\", otherwise, the value"
134
+ puts " that was set with the \"-paths_relative_to\" switch"
135
+ puts " when this script was generated.\n"
136
+ puts "\[--project_name <name>\] Create project with the specified name. Default"
137
+ puts " name is the name of the project from where this"
138
+ puts " script was generated.\n"
139
+ puts "\[--help\] Print help information for this script"
140
+ puts "-------------------------------------------------------------------------\n"
141
+ exit 0
142
+ }
143
+
144
+ if { $::argc > 0 } {
145
+ for {set i 0} {$i < $::argc} {incr i} {
146
+ set option [string trim [lindex $::argv $i]]
147
+ switch -regexp -- $option {
148
+ "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
149
+ "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
150
+ "--help" { print_help }
151
+ default {
152
+ if { [regexp {^-} $option] } {
153
+ puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
154
+ return 1
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+
161
+ # Set the directory path for the original project from where this script was exported
162
+ set orig_proj_dir "[file normalize "$origin_dir/30_sep_2022_testbench_start_finish"]"
163
+
164
+ # Check for paths and files needed for project creation
165
+ set validate_required 0
166
+ if { $validate_required } {
167
+ if { [checkRequiredFiles $origin_dir] } {
168
+ puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
169
+ } else {
170
+ puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
171
+ return
172
+ }
173
+ }
174
+
175
+ # Create project
176
+ create_project ${_xil_proj_name_} ${origin_dir}/${_xil_proj_name_} -part xc7a100tcsg324-1
177
+
178
+ # Set the directory path for the new project
179
+ set proj_dir [get_property directory [current_project]]
180
+
181
+ # Set project properties
182
+ set obj [current_project]
183
+
184
+ set digilent_boardname "digilentinc.com:nexys-a7-100t:part0:1.0"
185
+
186
+ # Check if board file is available
187
+ if {[string first ${digilent_boardname} [get_board_parts]] != -1} {
188
+ set_property -name "board_part" -value ${digilent_boardname} -objects $obj
189
+ }
190
+
191
+ # Set project properties
192
+ set obj [current_project]
193
+ set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
194
+ set_property -name "enable_vhdl_2008" -value "1" -objects $obj
195
+ set_property -name "ip_cache_permissions" -value "read write" -objects $obj
196
+ set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
197
+ set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
198
+ set_property -name "platform.board_id" -value "nexys-a7-100t" -objects $obj
199
+ set_property -name "revised_directory_structure" -value "1" -objects $obj
200
+ set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
201
+ set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
202
+ set_property -name "simulator_language" -value "Mixed" -objects $obj
203
+ set_property -name "webtalk.activehdl_export_sim" -value "10" -objects $obj
204
+ set_property -name "webtalk.ies_export_sim" -value "10" -objects $obj
205
+ set_property -name "webtalk.modelsim_export_sim" -value "10" -objects $obj
206
+ set_property -name "webtalk.questa_export_sim" -value "10" -objects $obj
207
+ set_property -name "webtalk.riviera_export_sim" -value "10" -objects $obj
208
+ set_property -name "webtalk.vcs_export_sim" -value "10" -objects $obj
209
+ set_property -name "webtalk.xsim_export_sim" -value "10" -objects $obj
210
+ set_property -name "webtalk.xsim_launch_sim" -value "187" -objects $obj
211
+ set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
212
+
213
+ # Create 'sources_1' fileset (if not found)
214
+ if {[string equal [get_filesets -quiet sources_1] ""]} {
215
+ create_fileset -srcset sources_1
216
+ }
217
+
218
+ # Set 'sources_1' fileset object
219
+ set obj [get_filesets sources_1]
220
+ set files [list \
221
+ [file normalize "${origin_dir}/ip/data_fifo/data_fifo.xci"] \
222
+ [file normalize "${origin_dir}/ip/cic_compiler/cic_compiler_0.xci"] \
223
+ [file normalize "${origin_dir}/ip/clk_wiz_0/clk_wiz_0.xci"] \
224
+ [file normalize "${origin_dir}/src/crc_gen.sv"] \
225
+ [file normalize "${origin_dir}/src/endian_switch.sv"] \
226
+ [file normalize "${origin_dir}/src/ethernet_header_pkg.sv"] \
227
+ [file normalize "${origin_dir}/src/eth_header_gen.sv"] \
228
+ [file normalize "${origin_dir}/src/eth_rst_gen.sv"] \
229
+ [file normalize "${origin_dir}/src/packet_gen.sv"] \
230
+ [file normalize "${origin_dir}/src/parzen.sv"] \
231
+ [file normalize "${origin_dir}/src/pdm_clk_gen.sv"] \
232
+ [file normalize "${origin_dir}/src/pdm_microphone.sv"] \
233
+ [file normalize "${origin_dir}/src/rst_gen.sv"] \
234
+ [file normalize "${origin_dir}/src/triangle_gen.sv"] \
235
+ [file normalize "${origin_dir}/src/ethernet_top.sv"] \
236
+ ]
237
+ add_files -norecurse -fileset $obj $files
238
+
239
+ # Set 'sources_1' fileset file properties for remote files
240
+ set file "$origin_dir/ip/data_fifo/data_fifo.xci"
241
+ set file [file normalize $file]
242
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
243
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
244
+ if { ![get_property "is_locked" $file_obj] } {
245
+ set_property -name "generate_synth_checkpoint" -value "1" -objects $file_obj
246
+ }
247
+ set_property -name "is_enabled" -value "1" -objects $file_obj
248
+ set_property -name "is_global_include" -value "0" -objects $file_obj
249
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
250
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
251
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
252
+ if { ![get_property "is_locked" $file_obj] } {
253
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
254
+ }
255
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
256
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
257
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
258
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
259
+
260
+ set file "$origin_dir/ip/cic_compiler/cic_compiler_0.xci"
261
+ set file [file normalize $file]
262
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
263
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
264
+ if { ![get_property "is_locked" $file_obj] } {
265
+ set_property -name "generate_synth_checkpoint" -value "1" -objects $file_obj
266
+ }
267
+ set_property -name "is_enabled" -value "1" -objects $file_obj
268
+ set_property -name "is_global_include" -value "0" -objects $file_obj
269
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
270
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
271
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
272
+ if { ![get_property "is_locked" $file_obj] } {
273
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
274
+ }
275
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
276
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
277
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
278
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
279
+
280
+ set file "$origin_dir/ip/clk_wiz_0/clk_wiz_0.xci"
281
+ set file [file normalize $file]
282
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
283
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
284
+ if { ![get_property "is_locked" $file_obj] } {
285
+ set_property -name "generate_synth_checkpoint" -value "1" -objects $file_obj
286
+ }
287
+ set_property -name "is_enabled" -value "1" -objects $file_obj
288
+ set_property -name "is_global_include" -value "0" -objects $file_obj
289
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
290
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
291
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
292
+ if { ![get_property "is_locked" $file_obj] } {
293
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
294
+ }
295
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
296
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
297
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
298
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
299
+
300
+ set file "$origin_dir/src/crc_gen.sv"
301
+ set file [file normalize $file]
302
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
303
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
304
+ set_property -name "is_enabled" -value "1" -objects $file_obj
305
+ set_property -name "is_global_include" -value "0" -objects $file_obj
306
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
307
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
308
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
309
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
310
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
311
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
312
+
313
+ set file "$origin_dir/src/endian_switch.sv"
314
+ set file [file normalize $file]
315
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
316
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
317
+ set_property -name "is_enabled" -value "1" -objects $file_obj
318
+ set_property -name "is_global_include" -value "0" -objects $file_obj
319
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
320
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
321
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
322
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
323
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
324
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
325
+
326
+ set file "$origin_dir/src/ethernet_header_pkg.sv"
327
+ set file [file normalize $file]
328
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
329
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
330
+ set_property -name "is_enabled" -value "1" -objects $file_obj
331
+ set_property -name "is_global_include" -value "0" -objects $file_obj
332
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
333
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
334
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
335
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
336
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
337
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
338
+
339
+ set file "$origin_dir/src/eth_header_gen.sv"
340
+ set file [file normalize $file]
341
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
342
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
343
+ set_property -name "is_enabled" -value "1" -objects $file_obj
344
+ set_property -name "is_global_include" -value "0" -objects $file_obj
345
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
346
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
347
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
348
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
349
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
350
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
351
+
352
+ set file "$origin_dir/src/eth_rst_gen.sv"
353
+ set file [file normalize $file]
354
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
355
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
356
+ set_property -name "is_enabled" -value "1" -objects $file_obj
357
+ set_property -name "is_global_include" -value "0" -objects $file_obj
358
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
359
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
360
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
361
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
362
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
363
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
364
+
365
+ set file "$origin_dir/src/packet_gen.sv"
366
+ set file [file normalize $file]
367
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
368
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
369
+ set_property -name "is_enabled" -value "1" -objects $file_obj
370
+ set_property -name "is_global_include" -value "0" -objects $file_obj
371
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
372
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
373
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
374
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
375
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
376
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
377
+
378
+ set file "$origin_dir/src/parzen.sv"
379
+ set file [file normalize $file]
380
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
381
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
382
+ set_property -name "is_enabled" -value "1" -objects $file_obj
383
+ set_property -name "is_global_include" -value "0" -objects $file_obj
384
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
385
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
386
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
387
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
388
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
389
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
390
+
391
+ set file "$origin_dir/src/pdm_clk_gen.sv"
392
+ set file [file normalize $file]
393
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
394
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
395
+ set_property -name "is_enabled" -value "1" -objects $file_obj
396
+ set_property -name "is_global_include" -value "0" -objects $file_obj
397
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
398
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
399
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
400
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
401
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
402
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
403
+
404
+ set file "$origin_dir/src/pdm_microphone.sv"
405
+ set file [file normalize $file]
406
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
407
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
408
+ set_property -name "is_enabled" -value "1" -objects $file_obj
409
+ set_property -name "is_global_include" -value "0" -objects $file_obj
410
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
411
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
412
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
413
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
414
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
415
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
416
+
417
+ set file "$origin_dir/src/rst_gen.sv"
418
+ set file [file normalize $file]
419
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
420
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
421
+ set_property -name "is_enabled" -value "1" -objects $file_obj
422
+ set_property -name "is_global_include" -value "0" -objects $file_obj
423
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
424
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
425
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
426
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
427
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
428
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
429
+
430
+ set file "$origin_dir/src/triangle_gen.sv"
431
+ set file [file normalize $file]
432
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
433
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
434
+ set_property -name "is_enabled" -value "1" -objects $file_obj
435
+ set_property -name "is_global_include" -value "0" -objects $file_obj
436
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
437
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
438
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
439
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
440
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
441
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
442
+
443
+ set file "$origin_dir/src/ethernet_top.sv"
444
+ set file [file normalize $file]
445
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
446
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
447
+ set_property -name "is_enabled" -value "1" -objects $file_obj
448
+ set_property -name "is_global_include" -value "0" -objects $file_obj
449
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
450
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
451
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
452
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
453
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
454
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
455
+
456
+
457
+ # Set 'sources_1' fileset file properties for local files
458
+ # None
459
+
460
+ # Set 'sources_1' fileset properties
461
+ set obj [get_filesets sources_1]
462
+ set_property -name "design_mode" -value "RTL" -objects $obj
463
+ set_property -name "edif_extra_search_paths" -value "" -objects $obj
464
+ set_property -name "elab_link_dcps" -value "1" -objects $obj
465
+ set_property -name "elab_load_timing_constraints" -value "1" -objects $obj
466
+ set_property -name "generic" -value "" -objects $obj
467
+ set_property -name "include_dirs" -value "" -objects $obj
468
+ set_property -name "lib_map_file" -value "" -objects $obj
469
+ set_property -name "loop_count" -value "1000" -objects $obj
470
+ set_property -name "name" -value "sources_1" -objects $obj
471
+ set_property -name "top" -value "ethernet_top" -objects $obj
472
+ set_property -name "top_auto_set" -value "0" -objects $obj
473
+ set_property -name "verilog_define" -value "" -objects $obj
474
+ set_property -name "verilog_uppercase" -value "0" -objects $obj
475
+ set_property -name "verilog_version" -value "verilog_2001" -objects $obj
476
+ set_property -name "vhdl_version" -value "vhdl_2k" -objects $obj
477
+
478
+ # Set 'sources_1' fileset object
479
+ set obj [get_filesets sources_1]
480
+ set files [list \
481
+ [file normalize "${origin_dir}/ip/xfft_0/xfft_0.xci"] \
482
+ ]
483
+ add_files -norecurse -fileset $obj $files
484
+
485
+ # Set 'sources_1' fileset file properties for remote files
486
+ set file "$origin_dir/ip/xfft_0/xfft_0.xci"
487
+ set file [file normalize $file]
488
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
489
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
490
+ if { ![get_property "is_locked" $file_obj] } {
491
+ set_property -name "generate_synth_checkpoint" -value "1" -objects $file_obj
492
+ }
493
+ set_property -name "is_enabled" -value "1" -objects $file_obj
494
+ set_property -name "is_global_include" -value "0" -objects $file_obj
495
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
496
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
497
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
498
+ if { ![get_property "is_locked" $file_obj] } {
499
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
500
+ }
501
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
502
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
503
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
504
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
505
+
506
+
507
+ # Set 'sources_1' fileset file properties for local files
508
+ # None
509
+
510
+ # Set 'sources_1' fileset object
511
+ set obj [get_filesets sources_1]
512
+ # Add local files from the original project (-no_copy_sources specified)
513
+ set files [list \
514
+ [file normalize "${origin_dir}/ip/window_multiplier/window_multiplier.xci" ]\
515
+ ]
516
+ set added_files [add_files -fileset sources_1 $files]
517
+
518
+ # Set 'sources_1' fileset file properties for remote files
519
+ # None
520
+
521
+ # Set 'sources_1' fileset file properties for local files
522
+ set file "window_multiplier/window_multiplier.xci"
523
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
524
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
525
+ if { ![get_property "is_locked" $file_obj] } {
526
+ set_property -name "generate_synth_checkpoint" -value "1" -objects $file_obj
527
+ }
528
+ set_property -name "is_enabled" -value "1" -objects $file_obj
529
+ set_property -name "is_global_include" -value "0" -objects $file_obj
530
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
531
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
532
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
533
+ if { ![get_property "is_locked" $file_obj] } {
534
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
535
+ }
536
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
537
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
538
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
539
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
540
+
541
+
542
+ # Create 'constrs_1' fileset (if not found)
543
+ if {[string equal [get_filesets -quiet constrs_1] ""]} {
544
+ create_fileset -constrset constrs_1
545
+ }
546
+
547
+ # Set 'constrs_1' fileset object
548
+ set obj [get_filesets constrs_1]
549
+
550
+ # Add/Import constrs file and set constrs file properties
551
+ set file "[file normalize "$origin_dir/xdc/Nexys-A7-100T-Master.xdc"]"
552
+ set file_added [add_files -norecurse -fileset $obj [list $file]]
553
+ set file "$origin_dir/xdc/Nexys-A7-100T-Master.xdc"
554
+ set file [file normalize $file]
555
+ set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
556
+ set_property -name "file_type" -value "XDC" -objects $file_obj
557
+ set_property -name "is_enabled" -value "1" -objects $file_obj
558
+ set_property -name "is_global_include" -value "0" -objects $file_obj
559
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
560
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
561
+ set_property -name "processing_order" -value "NORMAL" -objects $file_obj
562
+ set_property -name "scoped_to_cells" -value "" -objects $file_obj
563
+ set_property -name "scoped_to_ref" -value "" -objects $file_obj
564
+ set_property -name "used_in" -value "synthesis implementation" -objects $file_obj
565
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
566
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
567
+
568
+ # Set 'constrs_1' fileset properties
569
+ set obj [get_filesets constrs_1]
570
+ set_property -name "constrs_type" -value "XDC" -objects $obj
571
+ set_property -name "name" -value "constrs_1" -objects $obj
572
+ set_property -name "target_constrs_file" -value "" -objects $obj
573
+
574
+ # Create 'sim_1' fileset (if not found)
575
+ if {[string equal [get_filesets -quiet sim_1] ""]} {
576
+ create_fileset -simset sim_1
577
+ }
578
+
579
+ # Set 'sim_1' fileset object
580
+ set obj [get_filesets sim_1]
581
+ set files [list \
582
+ [file normalize "${origin_dir}/tb/log_data.sv"] \
583
+ [file normalize "${origin_dir}/tb/read_stim.sv"] \
584
+ [file normalize "${origin_dir}/tb/ethernet_tb.sv"] \
585
+ ]
586
+ add_files -norecurse -fileset $obj $files
587
+
588
+ # Set 'sim_1' fileset file properties for remote files
589
+ set file "$origin_dir/tb/log_data.sv"
590
+ set file [file normalize $file]
591
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
592
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
593
+ set_property -name "is_enabled" -value "1" -objects $file_obj
594
+ set_property -name "is_global_include" -value "0" -objects $file_obj
595
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
596
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
597
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
598
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
599
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
600
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
601
+
602
+ set file "$origin_dir/tb/read_stim.sv"
603
+ set file [file normalize $file]
604
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
605
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
606
+ set_property -name "is_enabled" -value "1" -objects $file_obj
607
+ set_property -name "is_global_include" -value "0" -objects $file_obj
608
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
609
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
610
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
611
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
612
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
613
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
614
+
615
+ set file "$origin_dir/tb/ethernet_tb.sv"
616
+ set file [file normalize $file]
617
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
618
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
619
+ set_property -name "is_enabled" -value "1" -objects $file_obj
620
+ set_property -name "is_global_include" -value "0" -objects $file_obj
621
+ set_property -name "library" -value "xil_defaultlib" -objects $file_obj
622
+ set_property -name "path_mode" -value "RelativeFirst" -objects $file_obj
623
+ set_property -name "used_in" -value "synthesis implementation simulation" -objects $file_obj
624
+ set_property -name "used_in_implementation" -value "1" -objects $file_obj
625
+ set_property -name "used_in_simulation" -value "1" -objects $file_obj
626
+ set_property -name "used_in_synthesis" -value "1" -objects $file_obj
627
+
628
+
629
+ # Set 'sim_1' fileset file properties for local files
630
+ # None
631
+
632
+ # Set 'sim_1' fileset properties
633
+ set obj [get_filesets sim_1]
634
+ set_property -name "32bit" -value "0" -objects $obj
635
+ set_property -name "force_compile_glbl" -value "0" -objects $obj
636
+ set_property -name "force_no_compile_glbl" -value "0" -objects $obj
637
+ set_property -name "generate_scripts_only" -value "0" -objects $obj
638
+ set_property -name "generic" -value "" -objects $obj
639
+ set_property -name "hbs.configure_design_for_hier_access" -value "1" -objects $obj
640
+ set_property -name "hw_emu.debug_mode" -value "wdb" -objects $obj
641
+ set_property -name "include_dirs" -value "" -objects $obj
642
+ set_property -name "incremental" -value "1" -objects $obj
643
+ set_property -name "name" -value "sim_1" -objects $obj
644
+ set_property -name "nl.cell" -value "" -objects $obj
645
+ set_property -name "nl.incl_unisim_models" -value "0" -objects $obj
646
+ set_property -name "nl.process_corner" -value "slow" -objects $obj
647
+ set_property -name "nl.rename_top" -value "" -objects $obj
648
+ set_property -name "nl.sdf_anno" -value "1" -objects $obj
649
+ set_property -name "nl.write_all_overrides" -value "0" -objects $obj
650
+ set_property -name "simmodel_value_check" -value "1" -objects $obj
651
+ set_property -name "simulator_launch_mode" -value "off" -objects $obj
652
+ set_property -name "source_set" -value "sources_1" -objects $obj
653
+ set_property -name "systemc_include_dirs" -value "" -objects $obj
654
+ set_property -name "top" -value "ethernet_tb" -objects $obj
655
+ set_property -name "top_auto_set" -value "0" -objects $obj
656
+ set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
657
+ set_property -name "transport_int_delay" -value "0" -objects $obj
658
+ set_property -name "transport_path_delay" -value "0" -objects $obj
659
+ set_property -name "unifast" -value "0" -objects $obj
660
+ set_property -name "verilog_define" -value "" -objects $obj
661
+ set_property -name "verilog_uppercase" -value "0" -objects $obj
662
+ set_property -name "xelab.dll" -value "0" -objects $obj
663
+ set_property -name "xsim.compile.tcl.pre" -value "" -objects $obj
664
+ set_property -name "xsim.compile.xsc.more_options" -value "" -objects $obj
665
+ set_property -name "xsim.compile.xvhdl.more_options" -value "" -objects $obj
666
+ set_property -name "xsim.compile.xvhdl.nosort" -value "1" -objects $obj
667
+ set_property -name "xsim.compile.xvhdl.relax" -value "1" -objects $obj
668
+ set_property -name "xsim.compile.xvlog.more_options" -value "" -objects $obj
669
+ set_property -name "xsim.compile.xvlog.nosort" -value "1" -objects $obj
670
+ set_property -name "xsim.compile.xvlog.relax" -value "1" -objects $obj
671
+ set_property -name "xsim.elaborate.coverage.celldefine" -value "0" -objects $obj
672
+ set_property -name "xsim.elaborate.coverage.dir" -value "" -objects $obj
673
+ set_property -name "xsim.elaborate.coverage.library" -value "0" -objects $obj
674
+ set_property -name "xsim.elaborate.coverage.name" -value "" -objects $obj
675
+ set_property -name "xsim.elaborate.coverage.type" -value "" -objects $obj
676
+ set_property -name "xsim.elaborate.debug_level" -value "typical" -objects $obj
677
+ set_property -name "xsim.elaborate.load_glbl" -value "1" -objects $obj
678
+ set_property -name "xsim.elaborate.mt_level" -value "auto" -objects $obj
679
+ set_property -name "xsim.elaborate.rangecheck" -value "0" -objects $obj
680
+ set_property -name "xsim.elaborate.relax" -value "1" -objects $obj
681
+ set_property -name "xsim.elaborate.sdf_delay" -value "sdfmax" -objects $obj
682
+ set_property -name "xsim.elaborate.snapshot" -value "" -objects $obj
683
+ set_property -name "xsim.elaborate.xelab.more_options" -value "" -objects $obj
684
+ set_property -name "xsim.elaborate.xsc.more_options" -value "" -objects $obj
685
+ set_property -name "xsim.simulate.add_positional" -value "0" -objects $obj
686
+ set_property -name "xsim.simulate.custom_tcl" -value "" -objects $obj
687
+ set_property -name "xsim.simulate.log_all_signals" -value "0" -objects $obj
688
+ set_property -name "xsim.simulate.no_quit" -value "0" -objects $obj
689
+ set_property -name "xsim.simulate.runtime" -value "1000ns" -objects $obj
690
+ set_property -name "xsim.simulate.saif" -value "" -objects $obj
691
+ set_property -name "xsim.simulate.saif_all_signals" -value "0" -objects $obj
692
+ set_property -name "xsim.simulate.saif_scope" -value "" -objects $obj
693
+ set_property -name "xsim.simulate.tcl.post" -value "" -objects $obj
694
+ set_property -name "xsim.simulate.wdb" -value "" -objects $obj
695
+ set_property -name "xsim.simulate.xsim.more_options" -value "" -objects $obj
696
+
697
+ # Set 'utils_1' fileset object
698
+ set obj [get_filesets utils_1]
699
+ # Empty (no sources present)
700
+
701
+ # Set 'utils_1' fileset properties
702
+ set obj [get_filesets utils_1]
703
+ set_property -name "name" -value "utils_1" -objects $obj
704
+
705
+ set idrFlowPropertiesConstraints ""
706
+ catch {
707
+ set idrFlowPropertiesConstraints [get_param runs.disableIDRFlowPropertyConstraints]
708
+ set_param runs.disableIDRFlowPropertyConstraints 1
709
+ }
710
+
711
+ # Create 'synth_1' run (if not found)
712
+ if {[string equal [get_runs -quiet synth_1] ""]} {
713
+ create_run -name synth_1 -part xc7a100tcsg324-1 -flow {Vivado Synthesis 2020} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
714
+ } else {
715
+ set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
716
+ set_property flow "Vivado Synthesis 2020" [get_runs synth_1]
717
+ }
718
+ set obj [get_runs synth_1]
719
+ set_property set_report_strategy_name 1 $obj
720
+ set_property report_strategy {Vivado Synthesis Default Reports} $obj
721
+ set_property set_report_strategy_name 0 $obj
722
+ # Create 'synth_1_synth_report_utilization_0' report (if not found)
723
+ if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
724
+ create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
725
+ }
726
+ set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
727
+ if { $obj != "" } {
728
+ set_property -name "is_enabled" -value "1" -objects $obj
729
+ set_property -name "display_name" -value "Utilization - Synth Design" -objects $obj
730
+ set_property -name "options.pblocks" -value "" -objects $obj
731
+ set_property -name "options.cells" -value "" -objects $obj
732
+ set_property -name "options.slr" -value "0" -objects $obj
733
+ set_property -name "options.packthru" -value "0" -objects $obj
734
+ set_property -name "options.hierarchical" -value "0" -objects $obj
735
+ set_property -name "options.hierarchical_depth" -value "" -objects $obj
736
+ set_property -name "options.hierarchical_percentages" -value "0" -objects $obj
737
+ set_property -name "options.more_options" -value "" -objects $obj
738
+
739
+ }
740
+ set obj [get_runs synth_1]
741
+ set_property -name "constrset" -value "constrs_1" -objects $obj
742
+ set_property -name "description" -value "Vivado Synthesis Defaults" -objects $obj
743
+ set_property -name "flow" -value "Vivado Synthesis 2020" -objects $obj
744
+ set_property -name "name" -value "synth_1" -objects $obj
745
+ set_property -name "needs_refresh" -value "1" -objects $obj
746
+ set_property -name "srcset" -value "sources_1" -objects $obj
747
+ set_property -name "incremental_checkpoint" -value "" -objects $obj
748
+ set_property -name "auto_incremental_checkpoint" -value "0" -objects $obj
749
+ set_property -name "rqs_files" -value "" -objects $obj
750
+ set_property -name "incremental_checkpoint.more_options" -value "" -objects $obj
751
+ set_property -name "include_in_archive" -value "1" -objects $obj
752
+ set_property -name "gen_full_bitstream" -value "1" -objects $obj
753
+ set_property -name "write_incremental_synth_checkpoint" -value "0" -objects $obj
754
+ set_property -name "auto_incremental_checkpoint.directory" -value "/media/edata/git/Examples/eth_pdm_fft/eth_pdm_fft/eth_pdm_fft.srcs/utils_1/imports/synth_1" -objects $obj
755
+ set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
756
+ set_property -name "steps.synth_design.tcl.pre" -value "" -objects $obj
757
+ set_property -name "steps.synth_design.tcl.post" -value "" -objects $obj
758
+ set_property -name "steps.synth_design.args.flatten_hierarchy" -value "rebuilt" -objects $obj
759
+ set_property -name "steps.synth_design.args.gated_clock_conversion" -value "off" -objects $obj
760
+ set_property -name "steps.synth_design.args.bufg" -value "12" -objects $obj
761
+ set_property -name "steps.synth_design.args.directive" -value "Default" -objects $obj
762
+ set_property -name "steps.synth_design.args.retiming" -value "0" -objects $obj
763
+ set_property -name "steps.synth_design.args.fsm_extraction" -value "auto" -objects $obj
764
+ set_property -name "steps.synth_design.args.keep_equivalent_registers" -value "0" -objects $obj
765
+ set_property -name "steps.synth_design.args.resource_sharing" -value "auto" -objects $obj
766
+ set_property -name "steps.synth_design.args.control_set_opt_threshold" -value "auto" -objects $obj
767
+ set_property -name "steps.synth_design.args.no_lc" -value "0" -objects $obj
768
+ set_property -name "steps.synth_design.args.no_srlextract" -value "0" -objects $obj
769
+ set_property -name "steps.synth_design.args.shreg_min_size" -value "3" -objects $obj
770
+ set_property -name "steps.synth_design.args.max_bram" -value "-1" -objects $obj
771
+ set_property -name "steps.synth_design.args.max_uram" -value "-1" -objects $obj
772
+ set_property -name "steps.synth_design.args.max_dsp" -value "-1" -objects $obj
773
+ set_property -name "steps.synth_design.args.max_bram_cascade_height" -value "-1" -objects $obj
774
+ set_property -name "steps.synth_design.args.max_uram_cascade_height" -value "-1" -objects $obj
775
+ set_property -name "steps.synth_design.args.cascade_dsp" -value "auto" -objects $obj
776
+ set_property -name "steps.synth_design.args.assert" -value "0" -objects $obj
777
+ set_property -name "steps.synth_design.args.more options" -value "" -objects $obj
778
+
779
+ # set the current synth run
780
+ current_run -synthesis [get_runs synth_1]
781
+
782
+ # Create 'impl_1' run (if not found)
783
+ if {[string equal [get_runs -quiet impl_1] ""]} {
784
+ create_run -name impl_1 -part xc7a100tcsg324-1 -flow {Vivado Implementation 2020} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
785
+ } else {
786
+ set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
787
+ set_property flow "Vivado Implementation 2020" [get_runs impl_1]
788
+ }
789
+ set obj [get_runs impl_1]
790
+ set_property set_report_strategy_name 1 $obj
791
+ set_property report_strategy {Vivado Implementation Default Reports} $obj
792
+ set_property set_report_strategy_name 0 $obj
793
+ # Create 'impl_1_init_report_timing_summary_0' report (if not found)
794
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
795
+ create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
796
+ }
797
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
798
+ if { $obj != "" } {
799
+ set_property -name "is_enabled" -value "0" -objects $obj
800
+ set_property -name "display_name" -value "Timing Summary - Design Initialization" -objects $obj
801
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
802
+ set_property -name "options.delay_type" -value "" -objects $obj
803
+ set_property -name "options.setup" -value "0" -objects $obj
804
+ set_property -name "options.hold" -value "0" -objects $obj
805
+ set_property -name "options.max_paths" -value "10" -objects $obj
806
+ set_property -name "options.nworst" -value "" -objects $obj
807
+ set_property -name "options.unique_pins" -value "0" -objects $obj
808
+ set_property -name "options.path_type" -value "" -objects $obj
809
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
810
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
811
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
812
+ set_property -name "options.significant_digits" -value "" -objects $obj
813
+ set_property -name "options.cell" -value "" -objects $obj
814
+ set_property -name "options.more_options" -value "" -objects $obj
815
+
816
+ }
817
+ # Create 'impl_1_opt_report_drc_0' report (if not found)
818
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
819
+ create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
820
+ }
821
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
822
+ if { $obj != "" } {
823
+ set_property -name "is_enabled" -value "1" -objects $obj
824
+ set_property -name "display_name" -value "DRC - Opt Design" -objects $obj
825
+ set_property -name "options.upgrade_cw" -value "0" -objects $obj
826
+ set_property -name "options.checks" -value "" -objects $obj
827
+ set_property -name "options.ruledecks" -value "" -objects $obj
828
+ set_property -name "options.more_options" -value "" -objects $obj
829
+
830
+ }
831
+ # Create 'impl_1_opt_report_timing_summary_0' report (if not found)
832
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
833
+ create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
834
+ }
835
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
836
+ if { $obj != "" } {
837
+ set_property -name "is_enabled" -value "0" -objects $obj
838
+ set_property -name "display_name" -value "Timing Summary - Opt Design" -objects $obj
839
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
840
+ set_property -name "options.delay_type" -value "" -objects $obj
841
+ set_property -name "options.setup" -value "0" -objects $obj
842
+ set_property -name "options.hold" -value "0" -objects $obj
843
+ set_property -name "options.max_paths" -value "10" -objects $obj
844
+ set_property -name "options.nworst" -value "" -objects $obj
845
+ set_property -name "options.unique_pins" -value "0" -objects $obj
846
+ set_property -name "options.path_type" -value "" -objects $obj
847
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
848
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
849
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
850
+ set_property -name "options.significant_digits" -value "" -objects $obj
851
+ set_property -name "options.cell" -value "" -objects $obj
852
+ set_property -name "options.more_options" -value "" -objects $obj
853
+
854
+ }
855
+ # Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
856
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
857
+ create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
858
+ }
859
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
860
+ if { $obj != "" } {
861
+ set_property -name "is_enabled" -value "0" -objects $obj
862
+ set_property -name "display_name" -value "Timing Summary - Power Opt Design" -objects $obj
863
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
864
+ set_property -name "options.delay_type" -value "" -objects $obj
865
+ set_property -name "options.setup" -value "0" -objects $obj
866
+ set_property -name "options.hold" -value "0" -objects $obj
867
+ set_property -name "options.max_paths" -value "10" -objects $obj
868
+ set_property -name "options.nworst" -value "" -objects $obj
869
+ set_property -name "options.unique_pins" -value "0" -objects $obj
870
+ set_property -name "options.path_type" -value "" -objects $obj
871
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
872
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
873
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
874
+ set_property -name "options.significant_digits" -value "" -objects $obj
875
+ set_property -name "options.cell" -value "" -objects $obj
876
+ set_property -name "options.more_options" -value "" -objects $obj
877
+
878
+ }
879
+ # Create 'impl_1_place_report_io_0' report (if not found)
880
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
881
+ create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
882
+ }
883
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
884
+ if { $obj != "" } {
885
+ set_property -name "is_enabled" -value "1" -objects $obj
886
+ set_property -name "display_name" -value "IO - Place Design" -objects $obj
887
+ set_property -name "options.more_options" -value "" -objects $obj
888
+
889
+ }
890
+ # Create 'impl_1_place_report_utilization_0' report (if not found)
891
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
892
+ create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
893
+ }
894
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
895
+ if { $obj != "" } {
896
+ set_property -name "is_enabled" -value "1" -objects $obj
897
+ set_property -name "display_name" -value "Utilization - Place Design" -objects $obj
898
+ set_property -name "options.pblocks" -value "" -objects $obj
899
+ set_property -name "options.cells" -value "" -objects $obj
900
+ set_property -name "options.slr" -value "0" -objects $obj
901
+ set_property -name "options.packthru" -value "0" -objects $obj
902
+ set_property -name "options.hierarchical" -value "0" -objects $obj
903
+ set_property -name "options.hierarchical_depth" -value "" -objects $obj
904
+ set_property -name "options.hierarchical_percentages" -value "0" -objects $obj
905
+ set_property -name "options.more_options" -value "" -objects $obj
906
+
907
+ }
908
+ # Create 'impl_1_place_report_control_sets_0' report (if not found)
909
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
910
+ create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
911
+ }
912
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
913
+ if { $obj != "" } {
914
+ set_property -name "is_enabled" -value "1" -objects $obj
915
+ set_property -name "display_name" -value "Control Sets - Place Design" -objects $obj
916
+ set_property -name "options.verbose" -value "1" -objects $obj
917
+ set_property -name "options.cells" -value "" -objects $obj
918
+ set_property -name "options.more_options" -value "" -objects $obj
919
+
920
+ }
921
+ # Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
922
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
923
+ create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
924
+ }
925
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
926
+ if { $obj != "" } {
927
+ set_property -name "is_enabled" -value "0" -objects $obj
928
+ set_property -name "display_name" -value "Incremental Reuse - Place Design" -objects $obj
929
+ set_property -name "options.cells" -value "" -objects $obj
930
+ set_property -name "options.hierarchical" -value "0" -objects $obj
931
+ set_property -name "options.hierarchical_depth" -value "" -objects $obj
932
+ set_property -name "options.more_options" -value "" -objects $obj
933
+
934
+ }
935
+ # Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
936
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
937
+ create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
938
+ }
939
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
940
+ if { $obj != "" } {
941
+ set_property -name "is_enabled" -value "0" -objects $obj
942
+ set_property -name "display_name" -value "Incremental Reuse - Place Design" -objects $obj
943
+ set_property -name "options.cells" -value "" -objects $obj
944
+ set_property -name "options.hierarchical" -value "0" -objects $obj
945
+ set_property -name "options.hierarchical_depth" -value "" -objects $obj
946
+ set_property -name "options.more_options" -value "" -objects $obj
947
+
948
+ }
949
+ # Create 'impl_1_place_report_timing_summary_0' report (if not found)
950
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
951
+ create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
952
+ }
953
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
954
+ if { $obj != "" } {
955
+ set_property -name "is_enabled" -value "0" -objects $obj
956
+ set_property -name "display_name" -value "Timing Summary - Place Design" -objects $obj
957
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
958
+ set_property -name "options.delay_type" -value "" -objects $obj
959
+ set_property -name "options.setup" -value "0" -objects $obj
960
+ set_property -name "options.hold" -value "0" -objects $obj
961
+ set_property -name "options.max_paths" -value "10" -objects $obj
962
+ set_property -name "options.nworst" -value "" -objects $obj
963
+ set_property -name "options.unique_pins" -value "0" -objects $obj
964
+ set_property -name "options.path_type" -value "" -objects $obj
965
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
966
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
967
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
968
+ set_property -name "options.significant_digits" -value "" -objects $obj
969
+ set_property -name "options.cell" -value "" -objects $obj
970
+ set_property -name "options.more_options" -value "" -objects $obj
971
+
972
+ }
973
+ # Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
974
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
975
+ create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
976
+ }
977
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
978
+ if { $obj != "" } {
979
+ set_property -name "is_enabled" -value "0" -objects $obj
980
+ set_property -name "display_name" -value "Timing Summary - Post-Place Power Opt Design" -objects $obj
981
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
982
+ set_property -name "options.delay_type" -value "" -objects $obj
983
+ set_property -name "options.setup" -value "0" -objects $obj
984
+ set_property -name "options.hold" -value "0" -objects $obj
985
+ set_property -name "options.max_paths" -value "10" -objects $obj
986
+ set_property -name "options.nworst" -value "" -objects $obj
987
+ set_property -name "options.unique_pins" -value "0" -objects $obj
988
+ set_property -name "options.path_type" -value "" -objects $obj
989
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
990
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
991
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
992
+ set_property -name "options.significant_digits" -value "" -objects $obj
993
+ set_property -name "options.cell" -value "" -objects $obj
994
+ set_property -name "options.more_options" -value "" -objects $obj
995
+
996
+ }
997
+ # Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
998
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
999
+ create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
1000
+ }
1001
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
1002
+ if { $obj != "" } {
1003
+ set_property -name "is_enabled" -value "0" -objects $obj
1004
+ set_property -name "display_name" -value "Timing Summary - Post-Place Phys Opt Design" -objects $obj
1005
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
1006
+ set_property -name "options.delay_type" -value "" -objects $obj
1007
+ set_property -name "options.setup" -value "0" -objects $obj
1008
+ set_property -name "options.hold" -value "0" -objects $obj
1009
+ set_property -name "options.max_paths" -value "10" -objects $obj
1010
+ set_property -name "options.nworst" -value "" -objects $obj
1011
+ set_property -name "options.unique_pins" -value "0" -objects $obj
1012
+ set_property -name "options.path_type" -value "" -objects $obj
1013
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
1014
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
1015
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
1016
+ set_property -name "options.significant_digits" -value "" -objects $obj
1017
+ set_property -name "options.cell" -value "" -objects $obj
1018
+ set_property -name "options.more_options" -value "" -objects $obj
1019
+
1020
+ }
1021
+ # Create 'impl_1_route_report_drc_0' report (if not found)
1022
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
1023
+ create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
1024
+ }
1025
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
1026
+ if { $obj != "" } {
1027
+ set_property -name "is_enabled" -value "1" -objects $obj
1028
+ set_property -name "display_name" -value "DRC - Route Design" -objects $obj
1029
+ set_property -name "options.upgrade_cw" -value "0" -objects $obj
1030
+ set_property -name "options.checks" -value "" -objects $obj
1031
+ set_property -name "options.ruledecks" -value "" -objects $obj
1032
+ set_property -name "options.more_options" -value "" -objects $obj
1033
+
1034
+ }
1035
+ # Create 'impl_1_route_report_methodology_0' report (if not found)
1036
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
1037
+ create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
1038
+ }
1039
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
1040
+ if { $obj != "" } {
1041
+ set_property -name "is_enabled" -value "1" -objects $obj
1042
+ set_property -name "display_name" -value "Methodology - Route Design" -objects $obj
1043
+ set_property -name "options.checks" -value "" -objects $obj
1044
+ set_property -name "options.more_options" -value "" -objects $obj
1045
+
1046
+ }
1047
+ # Create 'impl_1_route_report_power_0' report (if not found)
1048
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
1049
+ create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
1050
+ }
1051
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
1052
+ if { $obj != "" } {
1053
+ set_property -name "is_enabled" -value "1" -objects $obj
1054
+ set_property -name "display_name" -value "Power - Route Design" -objects $obj
1055
+ set_property -name "options.advisory" -value "0" -objects $obj
1056
+ set_property -name "options.xpe" -value "" -objects $obj
1057
+ set_property -name "options.more_options" -value "" -objects $obj
1058
+
1059
+ }
1060
+ # Create 'impl_1_route_report_route_status_0' report (if not found)
1061
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
1062
+ create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
1063
+ }
1064
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
1065
+ if { $obj != "" } {
1066
+ set_property -name "is_enabled" -value "1" -objects $obj
1067
+ set_property -name "display_name" -value "Route Status - Route Design" -objects $obj
1068
+ set_property -name "options.of_objects" -value "" -objects $obj
1069
+ set_property -name "options.route_type" -value "" -objects $obj
1070
+ set_property -name "options.list_all_nets" -value "0" -objects $obj
1071
+ set_property -name "options.show_all" -value "0" -objects $obj
1072
+ set_property -name "options.has_routing" -value "0" -objects $obj
1073
+ set_property -name "options.more_options" -value "" -objects $obj
1074
+
1075
+ }
1076
+ # Create 'impl_1_route_report_timing_summary_0' report (if not found)
1077
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
1078
+ create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
1079
+ }
1080
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
1081
+ if { $obj != "" } {
1082
+ set_property -name "is_enabled" -value "1" -objects $obj
1083
+ set_property -name "display_name" -value "Timing Summary - Route Design" -objects $obj
1084
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
1085
+ set_property -name "options.delay_type" -value "" -objects $obj
1086
+ set_property -name "options.setup" -value "0" -objects $obj
1087
+ set_property -name "options.hold" -value "0" -objects $obj
1088
+ set_property -name "options.max_paths" -value "10" -objects $obj
1089
+ set_property -name "options.nworst" -value "" -objects $obj
1090
+ set_property -name "options.unique_pins" -value "0" -objects $obj
1091
+ set_property -name "options.path_type" -value "" -objects $obj
1092
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
1093
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
1094
+ set_property -name "options.warn_on_violation" -value "0" -objects $obj
1095
+ set_property -name "options.significant_digits" -value "" -objects $obj
1096
+ set_property -name "options.cell" -value "" -objects $obj
1097
+ set_property -name "options.more_options" -value "" -objects $obj
1098
+
1099
+ }
1100
+ # Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
1101
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
1102
+ create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
1103
+ }
1104
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
1105
+ if { $obj != "" } {
1106
+ set_property -name "is_enabled" -value "1" -objects $obj
1107
+ set_property -name "display_name" -value "Incremental Reuse - Route Design" -objects $obj
1108
+ set_property -name "options.cells" -value "" -objects $obj
1109
+ set_property -name "options.hierarchical" -value "0" -objects $obj
1110
+ set_property -name "options.hierarchical_depth" -value "" -objects $obj
1111
+ set_property -name "options.more_options" -value "" -objects $obj
1112
+
1113
+ }
1114
+ # Create 'impl_1_route_report_clock_utilization_0' report (if not found)
1115
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
1116
+ create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
1117
+ }
1118
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
1119
+ if { $obj != "" } {
1120
+ set_property -name "is_enabled" -value "1" -objects $obj
1121
+ set_property -name "display_name" -value "Clock Utilization - Route Design" -objects $obj
1122
+ set_property -name "options.write_xdc" -value "0" -objects $obj
1123
+ set_property -name "options.clock_roots_only" -value "0" -objects $obj
1124
+ set_property -name "options.more_options" -value "" -objects $obj
1125
+
1126
+ }
1127
+ # Create 'impl_1_route_report_bus_skew_0' report (if not found)
1128
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
1129
+ create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
1130
+ }
1131
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
1132
+ if { $obj != "" } {
1133
+ set_property -name "is_enabled" -value "1" -objects $obj
1134
+ set_property -name "display_name" -value "Bus Skew - Route Design" -objects $obj
1135
+ set_property -name "options.delay_type" -value "" -objects $obj
1136
+ set_property -name "options.setup" -value "0" -objects $obj
1137
+ set_property -name "options.hold" -value "0" -objects $obj
1138
+ set_property -name "options.max_paths" -value "" -objects $obj
1139
+ set_property -name "options.nworst" -value "" -objects $obj
1140
+ set_property -name "options.unique_pins" -value "0" -objects $obj
1141
+ set_property -name "options.path_type" -value "" -objects $obj
1142
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
1143
+ set_property -name "options.slack_greater_than" -value "" -objects $obj
1144
+ set_property -name "options.significant_digits" -value "" -objects $obj
1145
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
1146
+ set_property -name "options.more_options" -value "" -objects $obj
1147
+
1148
+ }
1149
+ # Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
1150
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
1151
+ create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
1152
+ }
1153
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
1154
+ if { $obj != "" } {
1155
+ set_property -name "is_enabled" -value "1" -objects $obj
1156
+ set_property -name "display_name" -value "Timing Summary - Post-Route Phys Opt Design" -objects $obj
1157
+ set_property -name "options.check_timing_verbose" -value "0" -objects $obj
1158
+ set_property -name "options.delay_type" -value "" -objects $obj
1159
+ set_property -name "options.setup" -value "0" -objects $obj
1160
+ set_property -name "options.hold" -value "0" -objects $obj
1161
+ set_property -name "options.max_paths" -value "10" -objects $obj
1162
+ set_property -name "options.nworst" -value "" -objects $obj
1163
+ set_property -name "options.unique_pins" -value "0" -objects $obj
1164
+ set_property -name "options.path_type" -value "" -objects $obj
1165
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
1166
+ set_property -name "options.report_unconstrained" -value "0" -objects $obj
1167
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
1168
+ set_property -name "options.significant_digits" -value "" -objects $obj
1169
+ set_property -name "options.cell" -value "" -objects $obj
1170
+ set_property -name "options.more_options" -value "" -objects $obj
1171
+
1172
+ }
1173
+ # Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
1174
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
1175
+ create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
1176
+ }
1177
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
1178
+ if { $obj != "" } {
1179
+ set_property -name "is_enabled" -value "1" -objects $obj
1180
+ set_property -name "display_name" -value "Bus Skew - Post-Route Phys Opt Design" -objects $obj
1181
+ set_property -name "options.delay_type" -value "" -objects $obj
1182
+ set_property -name "options.setup" -value "0" -objects $obj
1183
+ set_property -name "options.hold" -value "0" -objects $obj
1184
+ set_property -name "options.max_paths" -value "" -objects $obj
1185
+ set_property -name "options.nworst" -value "" -objects $obj
1186
+ set_property -name "options.unique_pins" -value "0" -objects $obj
1187
+ set_property -name "options.path_type" -value "" -objects $obj
1188
+ set_property -name "options.slack_lesser_than" -value "" -objects $obj
1189
+ set_property -name "options.slack_greater_than" -value "" -objects $obj
1190
+ set_property -name "options.significant_digits" -value "" -objects $obj
1191
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
1192
+ set_property -name "options.more_options" -value "" -objects $obj
1193
+
1194
+ }
1195
+ set obj [get_runs impl_1]
1196
+ set_property -name "constrset" -value "constrs_1" -objects $obj
1197
+ set_property -name "description" -value "Default settings for Implementation." -objects $obj
1198
+ set_property -name "flow" -value "Vivado Implementation 2020" -objects $obj
1199
+ set_property -name "name" -value "impl_1" -objects $obj
1200
+ set_property -name "needs_refresh" -value "1" -objects $obj
1201
+ set_property -name "pr_configuration" -value "" -objects $obj
1202
+ set_property -name "srcset" -value "sources_1" -objects $obj
1203
+ set_property -name "incremental_checkpoint" -value "" -objects $obj
1204
+ set_property -name "auto_incremental_checkpoint" -value "0" -objects $obj
1205
+ set_property -name "incremental_checkpoint.directive" -value "" -objects $obj
1206
+ set_property -name "rqs_files" -value "" -objects $obj
1207
+ set_property -name "incremental_checkpoint.more_options" -value "" -objects $obj
1208
+ set_property -name "include_in_archive" -value "1" -objects $obj
1209
+ set_property -name "gen_full_bitstream" -value "1" -objects $obj
1210
+ set_property -name "auto_incremental_checkpoint.directory" -value "/media/edata/git/Examples/eth_pdm_fft/eth_pdm_fft/eth_pdm_fft.srcs/utils_1/imports/impl_1" -objects $obj
1211
+ set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
1212
+ set_property -name "steps.init_design.tcl.pre" -value "" -objects $obj
1213
+ set_property -name "steps.init_design.tcl.post" -value "" -objects $obj
1214
+ set_property -name "steps.init_design.args.more options" -value "" -objects $obj
1215
+ set_property -name "steps.opt_design.is_enabled" -value "1" -objects $obj
1216
+ set_property -name "steps.opt_design.tcl.pre" -value "" -objects $obj
1217
+ set_property -name "steps.opt_design.tcl.post" -value "" -objects $obj
1218
+ set_property -name "steps.opt_design.args.verbose" -value "0" -objects $obj
1219
+ set_property -name "steps.opt_design.args.directive" -value "Default" -objects $obj
1220
+ set_property -name "steps.opt_design.args.more options" -value "" -objects $obj
1221
+ set_property -name "steps.power_opt_design.is_enabled" -value "0" -objects $obj
1222
+ set_property -name "steps.power_opt_design.tcl.pre" -value "" -objects $obj
1223
+ set_property -name "steps.power_opt_design.tcl.post" -value "" -objects $obj
1224
+ set_property -name "steps.power_opt_design.args.more options" -value "" -objects $obj
1225
+ set_property -name "steps.place_design.tcl.pre" -value "" -objects $obj
1226
+ set_property -name "steps.place_design.tcl.post" -value "" -objects $obj
1227
+ set_property -name "steps.place_design.args.directive" -value "Default" -objects $obj
1228
+ set_property -name "steps.place_design.args.more options" -value "" -objects $obj
1229
+ set_property -name "steps.post_place_power_opt_design.is_enabled" -value "0" -objects $obj
1230
+ set_property -name "steps.post_place_power_opt_design.tcl.pre" -value "" -objects $obj
1231
+ set_property -name "steps.post_place_power_opt_design.tcl.post" -value "" -objects $obj
1232
+ set_property -name "steps.post_place_power_opt_design.args.more options" -value "" -objects $obj
1233
+ set_property -name "steps.phys_opt_design.is_enabled" -value "1" -objects $obj
1234
+ set_property -name "steps.phys_opt_design.tcl.pre" -value "" -objects $obj
1235
+ set_property -name "steps.phys_opt_design.tcl.post" -value "" -objects $obj
1236
+ set_property -name "steps.phys_opt_design.args.directive" -value "Default" -objects $obj
1237
+ set_property -name "steps.phys_opt_design.args.more options" -value "" -objects $obj
1238
+ set_property -name "steps.route_design.tcl.pre" -value "" -objects $obj
1239
+ set_property -name "steps.route_design.tcl.post" -value "" -objects $obj
1240
+ set_property -name "steps.route_design.args.directive" -value "Default" -objects $obj
1241
+ set_property -name "steps.route_design.args.more options" -value "" -objects $obj
1242
+ set_property -name "steps.post_route_phys_opt_design.is_enabled" -value "0" -objects $obj
1243
+ set_property -name "steps.post_route_phys_opt_design.tcl.pre" -value "" -objects $obj
1244
+ set_property -name "steps.post_route_phys_opt_design.tcl.post" -value "" -objects $obj
1245
+ set_property -name "steps.post_route_phys_opt_design.args.directive" -value "Default" -objects $obj
1246
+ set_property -name "steps.post_route_phys_opt_design.args.more options" -value "" -objects $obj
1247
+ set_property -name "steps.write_bitstream.tcl.pre" -value "" -objects $obj
1248
+ set_property -name "steps.write_bitstream.tcl.post" -value "" -objects $obj
1249
+ set_property -name "steps.write_bitstream.args.raw_bitfile" -value "0" -objects $obj
1250
+ set_property -name "steps.write_bitstream.args.mask_file" -value "0" -objects $obj
1251
+ set_property -name "steps.write_bitstream.args.no_binary_bitfile" -value "0" -objects $obj
1252
+ set_property -name "steps.write_bitstream.args.bin_file" -value "0" -objects $obj
1253
+ set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
1254
+ set_property -name "steps.write_bitstream.args.logic_location_file" -value "0" -objects $obj
1255
+ set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
1256
+ set_property -name "steps.write_bitstream.args.more options" -value "" -objects $obj
1257
+
1258
+ # set the current impl run
1259
+ current_run -implementation [get_runs impl_1]
1260
+ catch {
1261
+ if { $idrFlowPropertiesConstraints != {} } {
1262
+ set_param runs.disableIDRFlowPropertyConstraints $idrFlowPropertiesConstraints
1263
+ }
1264
+ }
1265
+
1266
+ puts "INFO: Project created:${_xil_proj_name_}"
1267
+ # Create 'drc_1' gadget (if not found)
1268
+ if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
1269
+ create_dashboard_gadget -name {drc_1} -type drc
1270
+ }
1271
+ set obj [get_dashboard_gadgets [ list "drc_1" ] ]
1272
+ set_property -name "active_reports" -value "" -objects $obj
1273
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1274
+ set_property -name "active_run" -value "0" -objects $obj
1275
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1276
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1277
+ set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
1278
+ set_property -name "run.step" -value "route_design" -objects $obj
1279
+ set_property -name "run.type" -value "implementation" -objects $obj
1280
+ set_property -name "statistics.critical_warning" -value "1" -objects $obj
1281
+ set_property -name "statistics.error" -value "1" -objects $obj
1282
+ set_property -name "statistics.info" -value "1" -objects $obj
1283
+ set_property -name "statistics.warning" -value "1" -objects $obj
1284
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1285
+ set_property -name "view.type" -value "Graph" -objects $obj
1286
+
1287
+ # Create 'methodology_1' gadget (if not found)
1288
+ if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
1289
+ create_dashboard_gadget -name {methodology_1} -type methodology
1290
+ }
1291
+ set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
1292
+ set_property -name "active_reports" -value "" -objects $obj
1293
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1294
+ set_property -name "active_run" -value "0" -objects $obj
1295
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1296
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1297
+ set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
1298
+ set_property -name "run.step" -value "route_design" -objects $obj
1299
+ set_property -name "run.type" -value "implementation" -objects $obj
1300
+ set_property -name "statistics.critical_warning" -value "1" -objects $obj
1301
+ set_property -name "statistics.error" -value "1" -objects $obj
1302
+ set_property -name "statistics.info" -value "1" -objects $obj
1303
+ set_property -name "statistics.warning" -value "1" -objects $obj
1304
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1305
+ set_property -name "view.type" -value "Graph" -objects $obj
1306
+
1307
+ # Create 'power_1' gadget (if not found)
1308
+ if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
1309
+ create_dashboard_gadget -name {power_1} -type power
1310
+ }
1311
+ set obj [get_dashboard_gadgets [ list "power_1" ] ]
1312
+ set_property -name "active_reports" -value "" -objects $obj
1313
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1314
+ set_property -name "active_run" -value "0" -objects $obj
1315
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1316
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1317
+ set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
1318
+ set_property -name "run.step" -value "route_design" -objects $obj
1319
+ set_property -name "run.type" -value "implementation" -objects $obj
1320
+ set_property -name "statistics.bram" -value "1" -objects $obj
1321
+ set_property -name "statistics.clocks" -value "1" -objects $obj
1322
+ set_property -name "statistics.dsp" -value "1" -objects $obj
1323
+ set_property -name "statistics.gth" -value "1" -objects $obj
1324
+ set_property -name "statistics.gtp" -value "1" -objects $obj
1325
+ set_property -name "statistics.gtx" -value "1" -objects $obj
1326
+ set_property -name "statistics.gtz" -value "1" -objects $obj
1327
+ set_property -name "statistics.io" -value "1" -objects $obj
1328
+ set_property -name "statistics.logic" -value "1" -objects $obj
1329
+ set_property -name "statistics.mmcm" -value "1" -objects $obj
1330
+ set_property -name "statistics.pcie" -value "1" -objects $obj
1331
+ set_property -name "statistics.phaser" -value "1" -objects $obj
1332
+ set_property -name "statistics.pll" -value "1" -objects $obj
1333
+ set_property -name "statistics.pl_static" -value "1" -objects $obj
1334
+ set_property -name "statistics.ps7" -value "1" -objects $obj
1335
+ set_property -name "statistics.ps" -value "1" -objects $obj
1336
+ set_property -name "statistics.ps_static" -value "1" -objects $obj
1337
+ set_property -name "statistics.signals" -value "1" -objects $obj
1338
+ set_property -name "statistics.total_power" -value "1" -objects $obj
1339
+ set_property -name "statistics.transceiver" -value "1" -objects $obj
1340
+ set_property -name "statistics.xadc" -value "1" -objects $obj
1341
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1342
+ set_property -name "view.type" -value "Graph" -objects $obj
1343
+
1344
+ # Create 'timing_1' gadget (if not found)
1345
+ if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
1346
+ create_dashboard_gadget -name {timing_1} -type timing
1347
+ }
1348
+ set obj [get_dashboard_gadgets [ list "timing_1" ] ]
1349
+ set_property -name "active_reports" -value "" -objects $obj
1350
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1351
+ set_property -name "active_run" -value "0" -objects $obj
1352
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1353
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1354
+ set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
1355
+ set_property -name "run.step" -value "route_design" -objects $obj
1356
+ set_property -name "run.type" -value "implementation" -objects $obj
1357
+ set_property -name "statistics.ths" -value "1" -objects $obj
1358
+ set_property -name "statistics.tns" -value "1" -objects $obj
1359
+ set_property -name "statistics.tpws" -value "1" -objects $obj
1360
+ set_property -name "statistics.whs" -value "1" -objects $obj
1361
+ set_property -name "statistics.wns" -value "1" -objects $obj
1362
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1363
+ set_property -name "view.type" -value "Table" -objects $obj
1364
+
1365
+ # Create 'utilization_1' gadget (if not found)
1366
+ if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
1367
+ create_dashboard_gadget -name {utilization_1} -type utilization
1368
+ }
1369
+ set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
1370
+ set_property -name "active_reports" -value "" -objects $obj
1371
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1372
+ set_property -name "active_run" -value "0" -objects $obj
1373
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1374
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1375
+ set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
1376
+ set_property -name "run.step" -value "synth_design" -objects $obj
1377
+ set_property -name "run.type" -value "synthesis" -objects $obj
1378
+ set_property -name "statistics.bram" -value "1" -objects $obj
1379
+ set_property -name "statistics.bufg" -value "1" -objects $obj
1380
+ set_property -name "statistics.dsp" -value "1" -objects $obj
1381
+ set_property -name "statistics.ff" -value "1" -objects $obj
1382
+ set_property -name "statistics.gt" -value "1" -objects $obj
1383
+ set_property -name "statistics.io" -value "1" -objects $obj
1384
+ set_property -name "statistics.lut" -value "1" -objects $obj
1385
+ set_property -name "statistics.lutram" -value "1" -objects $obj
1386
+ set_property -name "statistics.mmcm" -value "1" -objects $obj
1387
+ set_property -name "statistics.pcie" -value "1" -objects $obj
1388
+ set_property -name "statistics.pll" -value "1" -objects $obj
1389
+ set_property -name "statistics.uram" -value "1" -objects $obj
1390
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1391
+ set_property -name "view.type" -value "Graph" -objects $obj
1392
+
1393
+ # Create 'utilization_2' gadget (if not found)
1394
+ if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
1395
+ create_dashboard_gadget -name {utilization_2} -type utilization
1396
+ }
1397
+ set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
1398
+ set_property -name "active_reports" -value "" -objects $obj
1399
+ set_property -name "active_reports_invalid" -value "" -objects $obj
1400
+ set_property -name "active_run" -value "0" -objects $obj
1401
+ set_property -name "hide_unused_data" -value "1" -objects $obj
1402
+ set_property -name "incl_new_reports" -value "0" -objects $obj
1403
+ set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
1404
+ set_property -name "run.step" -value "place_design" -objects $obj
1405
+ set_property -name "run.type" -value "implementation" -objects $obj
1406
+ set_property -name "statistics.bram" -value "1" -objects $obj
1407
+ set_property -name "statistics.bufg" -value "1" -objects $obj
1408
+ set_property -name "statistics.dsp" -value "1" -objects $obj
1409
+ set_property -name "statistics.ff" -value "1" -objects $obj
1410
+ set_property -name "statistics.gt" -value "1" -objects $obj
1411
+ set_property -name "statistics.io" -value "1" -objects $obj
1412
+ set_property -name "statistics.lut" -value "1" -objects $obj
1413
+ set_property -name "statistics.lutram" -value "1" -objects $obj
1414
+ set_property -name "statistics.mmcm" -value "1" -objects $obj
1415
+ set_property -name "statistics.pcie" -value "1" -objects $obj
1416
+ set_property -name "statistics.pll" -value "1" -objects $obj
1417
+ set_property -name "statistics.uram" -value "1" -objects $obj
1418
+ set_property -name "view.orientation" -value "Horizontal" -objects $obj
1419
+ set_property -name "view.type" -value "Graph" -objects $obj
1420
+
1421
+ move_dashboard_gadget -name {utilization_1} -row 0 -col 0
1422
+ move_dashboard_gadget -name {power_1} -row 1 -col 0
1423
+ move_dashboard_gadget -name {drc_1} -row 2 -col 0
1424
+ move_dashboard_gadget -name {timing_1} -row 0 -col 1
1425
+ move_dashboard_gadget -name {utilization_2} -row 1 -col 1
1426
+ move_dashboard_gadget -name {methodology_1} -row 2 -col 1
HDLForBeginners_Examples/30092022_testbench_start_finish/README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ This code is companion code for the video "Reading from and writing to file: My PDM testbench from start to finish"
4
+ https://youtu.be/PGTaECnh7ZA
5
+
6
+
7
+ To run this code, download and install Vivado 2021.1 or higher from here
8
+ https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/2021-1.html
9
+
10
+ You need to register and fill in a form, but the download is free.
11
+
12
+ Once installed, open and go to Tools -> Run Tcl Script
13
+
14
+ Navigate to 30_sep_2022_testbench_start_finish.tcl in the same directory as this readme file.
15
+
16
+ Once it is finished running, check for errors in the Tcl Console window tab on the bottom left.
17
+
18
+ Click Simultion -> Run Simulation -> Run Behavioural Simulation on the left
19
+
20
+ Select the module of interest in the "Scope" window, and the signals of interest in the "Objects" window, and drag accross to the simulation waveform viewer.
21
+
22
+ Click the Play button (blue triangle button) to run the simulation.
23
+
24
+ Folder breakdown:
25
+ py: Python code
26
+ src: synthesizable SystemVerilog code
27
+ tb: testbench SystemVerilog code
28
+ xdc: constraints
29
+ ip: IP cores
HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/sim/data_fifo.v ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // (c) Copyright 1995-2022 Xilinx, Inc. All rights reserved.
2
+ //
3
+ // This file contains confidential and proprietary information
4
+ // of Xilinx, Inc. and is protected under U.S. and
5
+ // international copyright and other intellectual property
6
+ // laws.
7
+ //
8
+ // DISCLAIMER
9
+ // This disclaimer is not a license and does not grant any
10
+ // rights to the materials distributed herewith. Except as
11
+ // otherwise provided in a valid license issued to you by
12
+ // Xilinx, and to the maximum extent permitted by applicable
13
+ // law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
14
+ // WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
15
+ // AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
16
+ // BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
17
+ // INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
18
+ // (2) Xilinx shall not be liable (whether in contract or tort,
19
+ // including negligence, or under any other theory of
20
+ // liability) for any loss or damage of any kind or nature
21
+ // related to, arising under or in connection with these
22
+ // materials, including for any direct, or any indirect,
23
+ // special, incidental, or consequential loss or damage
24
+ // (including loss of data, profits, goodwill, or any type of
25
+ // loss or damage suffered as a result of any action brought
26
+ // by a third party) even if such damage or loss was
27
+ // reasonably foreseeable or Xilinx had been advised of the
28
+ // possibility of the same.
29
+ //
30
+ // CRITICAL APPLICATIONS
31
+ // Xilinx products are not designed or intended to be fail-
32
+ // safe, or for use in any application requiring fail-safe
33
+ // performance, such as life-support or safety devices or
34
+ // systems, Class III medical devices, nuclear facilities,
35
+ // applications related to the deployment of airbags, or any
36
+ // other applications that could lead to death, personal
37
+ // injury, or severe property or environmental damage
38
+ // (individually and collectively, "Critical
39
+ // Applications"). Customer assumes the sole risk and
40
+ // liability of any use of Xilinx products in Critical
41
+ // Applications, subject only to applicable laws and
42
+ // regulations governing limitations on product liability.
43
+ //
44
+ // THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
45
+ // PART OF THIS FILE AT ALL TIMES.
46
+ //
47
+ // DO NOT MODIFY THIS FILE.
48
+
49
+
50
+ // IP VLNV: xilinx.com:ip:fifo_generator:13.2
51
+ // IP Revision: 5
52
+
53
+ `timescale 1ns/1ps
54
+
55
+ (* DowngradeIPIdentifiedWarnings = "yes" *)
56
+ module data_fifo (
57
+ clk,
58
+ srst,
59
+ din,
60
+ wr_en,
61
+ rd_en,
62
+ dout,
63
+ full,
64
+ empty,
65
+ data_count
66
+ );
67
+
68
+ (* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME core_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, INSERT_VIP 0" *)
69
+ (* X_INTERFACE_INFO = "xilinx.com:signal:clock:1.0 core_clk CLK" *)
70
+ input wire clk;
71
+ input wire srst;
72
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE WR_DATA" *)
73
+ input wire [31 : 0] din;
74
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE WR_EN" *)
75
+ input wire wr_en;
76
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_read:1.0 FIFO_READ RD_EN" *)
77
+ input wire rd_en;
78
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_read:1.0 FIFO_READ RD_DATA" *)
79
+ output wire [31 : 0] dout;
80
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE FULL" *)
81
+ output wire full;
82
+ (* X_INTERFACE_INFO = "xilinx.com:interface:fifo_read:1.0 FIFO_READ EMPTY" *)
83
+ output wire empty;
84
+ output wire [11 : 0] data_count;
85
+
86
+ fifo_generator_v13_2_5 #(
87
+ .C_COMMON_CLOCK(1),
88
+ .C_SELECT_XPM(0),
89
+ .C_COUNT_TYPE(0),
90
+ .C_DATA_COUNT_WIDTH(12),
91
+ .C_DEFAULT_VALUE("BlankString"),
92
+ .C_DIN_WIDTH(32),
93
+ .C_DOUT_RST_VAL("0"),
94
+ .C_DOUT_WIDTH(32),
95
+ .C_ENABLE_RLOCS(0),
96
+ .C_FAMILY("artix7"),
97
+ .C_FULL_FLAGS_RST_VAL(0),
98
+ .C_HAS_ALMOST_EMPTY(0),
99
+ .C_HAS_ALMOST_FULL(0),
100
+ .C_HAS_BACKUP(0),
101
+ .C_HAS_DATA_COUNT(1),
102
+ .C_HAS_INT_CLK(0),
103
+ .C_HAS_MEMINIT_FILE(0),
104
+ .C_HAS_OVERFLOW(0),
105
+ .C_HAS_RD_DATA_COUNT(0),
106
+ .C_HAS_RD_RST(0),
107
+ .C_HAS_RST(0),
108
+ .C_HAS_SRST(1),
109
+ .C_HAS_UNDERFLOW(0),
110
+ .C_HAS_VALID(0),
111
+ .C_HAS_WR_ACK(0),
112
+ .C_HAS_WR_DATA_COUNT(0),
113
+ .C_HAS_WR_RST(0),
114
+ .C_IMPLEMENTATION_TYPE(0),
115
+ .C_INIT_WR_PNTR_VAL(0),
116
+ .C_MEMORY_TYPE(1),
117
+ .C_MIF_FILE_NAME("BlankString"),
118
+ .C_OPTIMIZATION_MODE(0),
119
+ .C_OVERFLOW_LOW(0),
120
+ .C_PRELOAD_LATENCY(0),
121
+ .C_PRELOAD_REGS(1),
122
+ .C_PRIM_FIFO_TYPE("2kx18"),
123
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL(4),
124
+ .C_PROG_EMPTY_THRESH_NEGATE_VAL(5),
125
+ .C_PROG_EMPTY_TYPE(0),
126
+ .C_PROG_FULL_THRESH_ASSERT_VAL(2047),
127
+ .C_PROG_FULL_THRESH_NEGATE_VAL(2046),
128
+ .C_PROG_FULL_TYPE(0),
129
+ .C_RD_DATA_COUNT_WIDTH(12),
130
+ .C_RD_DEPTH(2048),
131
+ .C_RD_FREQ(1),
132
+ .C_RD_PNTR_WIDTH(11),
133
+ .C_UNDERFLOW_LOW(0),
134
+ .C_USE_DOUT_RST(1),
135
+ .C_USE_ECC(0),
136
+ .C_USE_EMBEDDED_REG(0),
137
+ .C_USE_PIPELINE_REG(0),
138
+ .C_POWER_SAVING_MODE(0),
139
+ .C_USE_FIFO16_FLAGS(0),
140
+ .C_USE_FWFT_DATA_COUNT(1),
141
+ .C_VALID_LOW(0),
142
+ .C_WR_ACK_LOW(0),
143
+ .C_WR_DATA_COUNT_WIDTH(12),
144
+ .C_WR_DEPTH(2048),
145
+ .C_WR_FREQ(1),
146
+ .C_WR_PNTR_WIDTH(11),
147
+ .C_WR_RESPONSE_LATENCY(1),
148
+ .C_MSGON_VAL(1),
149
+ .C_ENABLE_RST_SYNC(1),
150
+ .C_EN_SAFETY_CKT(0),
151
+ .C_ERROR_INJECTION_TYPE(0),
152
+ .C_SYNCHRONIZER_STAGE(2),
153
+ .C_INTERFACE_TYPE(0),
154
+ .C_AXI_TYPE(1),
155
+ .C_HAS_AXI_WR_CHANNEL(1),
156
+ .C_HAS_AXI_RD_CHANNEL(1),
157
+ .C_HAS_SLAVE_CE(0),
158
+ .C_HAS_MASTER_CE(0),
159
+ .C_ADD_NGC_CONSTRAINT(0),
160
+ .C_USE_COMMON_OVERFLOW(0),
161
+ .C_USE_COMMON_UNDERFLOW(0),
162
+ .C_USE_DEFAULT_SETTINGS(0),
163
+ .C_AXI_ID_WIDTH(1),
164
+ .C_AXI_ADDR_WIDTH(32),
165
+ .C_AXI_DATA_WIDTH(64),
166
+ .C_AXI_LEN_WIDTH(8),
167
+ .C_AXI_LOCK_WIDTH(1),
168
+ .C_HAS_AXI_ID(0),
169
+ .C_HAS_AXI_AWUSER(0),
170
+ .C_HAS_AXI_WUSER(0),
171
+ .C_HAS_AXI_BUSER(0),
172
+ .C_HAS_AXI_ARUSER(0),
173
+ .C_HAS_AXI_RUSER(0),
174
+ .C_AXI_ARUSER_WIDTH(1),
175
+ .C_AXI_AWUSER_WIDTH(1),
176
+ .C_AXI_WUSER_WIDTH(1),
177
+ .C_AXI_BUSER_WIDTH(1),
178
+ .C_AXI_RUSER_WIDTH(1),
179
+ .C_HAS_AXIS_TDATA(1),
180
+ .C_HAS_AXIS_TID(0),
181
+ .C_HAS_AXIS_TDEST(0),
182
+ .C_HAS_AXIS_TUSER(1),
183
+ .C_HAS_AXIS_TREADY(1),
184
+ .C_HAS_AXIS_TLAST(0),
185
+ .C_HAS_AXIS_TSTRB(0),
186
+ .C_HAS_AXIS_TKEEP(0),
187
+ .C_AXIS_TDATA_WIDTH(8),
188
+ .C_AXIS_TID_WIDTH(1),
189
+ .C_AXIS_TDEST_WIDTH(1),
190
+ .C_AXIS_TUSER_WIDTH(4),
191
+ .C_AXIS_TSTRB_WIDTH(1),
192
+ .C_AXIS_TKEEP_WIDTH(1),
193
+ .C_WACH_TYPE(0),
194
+ .C_WDCH_TYPE(0),
195
+ .C_WRCH_TYPE(0),
196
+ .C_RACH_TYPE(0),
197
+ .C_RDCH_TYPE(0),
198
+ .C_AXIS_TYPE(0),
199
+ .C_IMPLEMENTATION_TYPE_WACH(1),
200
+ .C_IMPLEMENTATION_TYPE_WDCH(1),
201
+ .C_IMPLEMENTATION_TYPE_WRCH(1),
202
+ .C_IMPLEMENTATION_TYPE_RACH(1),
203
+ .C_IMPLEMENTATION_TYPE_RDCH(1),
204
+ .C_IMPLEMENTATION_TYPE_AXIS(1),
205
+ .C_APPLICATION_TYPE_WACH(0),
206
+ .C_APPLICATION_TYPE_WDCH(0),
207
+ .C_APPLICATION_TYPE_WRCH(0),
208
+ .C_APPLICATION_TYPE_RACH(0),
209
+ .C_APPLICATION_TYPE_RDCH(0),
210
+ .C_APPLICATION_TYPE_AXIS(0),
211
+ .C_PRIM_FIFO_TYPE_WACH("512x36"),
212
+ .C_PRIM_FIFO_TYPE_WDCH("1kx36"),
213
+ .C_PRIM_FIFO_TYPE_WRCH("512x36"),
214
+ .C_PRIM_FIFO_TYPE_RACH("512x36"),
215
+ .C_PRIM_FIFO_TYPE_RDCH("1kx36"),
216
+ .C_PRIM_FIFO_TYPE_AXIS("1kx18"),
217
+ .C_USE_ECC_WACH(0),
218
+ .C_USE_ECC_WDCH(0),
219
+ .C_USE_ECC_WRCH(0),
220
+ .C_USE_ECC_RACH(0),
221
+ .C_USE_ECC_RDCH(0),
222
+ .C_USE_ECC_AXIS(0),
223
+ .C_ERROR_INJECTION_TYPE_WACH(0),
224
+ .C_ERROR_INJECTION_TYPE_WDCH(0),
225
+ .C_ERROR_INJECTION_TYPE_WRCH(0),
226
+ .C_ERROR_INJECTION_TYPE_RACH(0),
227
+ .C_ERROR_INJECTION_TYPE_RDCH(0),
228
+ .C_ERROR_INJECTION_TYPE_AXIS(0),
229
+ .C_DIN_WIDTH_WACH(1),
230
+ .C_DIN_WIDTH_WDCH(64),
231
+ .C_DIN_WIDTH_WRCH(2),
232
+ .C_DIN_WIDTH_RACH(32),
233
+ .C_DIN_WIDTH_RDCH(64),
234
+ .C_DIN_WIDTH_AXIS(1),
235
+ .C_WR_DEPTH_WACH(16),
236
+ .C_WR_DEPTH_WDCH(1024),
237
+ .C_WR_DEPTH_WRCH(16),
238
+ .C_WR_DEPTH_RACH(16),
239
+ .C_WR_DEPTH_RDCH(1024),
240
+ .C_WR_DEPTH_AXIS(1024),
241
+ .C_WR_PNTR_WIDTH_WACH(4),
242
+ .C_WR_PNTR_WIDTH_WDCH(10),
243
+ .C_WR_PNTR_WIDTH_WRCH(4),
244
+ .C_WR_PNTR_WIDTH_RACH(4),
245
+ .C_WR_PNTR_WIDTH_RDCH(10),
246
+ .C_WR_PNTR_WIDTH_AXIS(10),
247
+ .C_HAS_DATA_COUNTS_WACH(0),
248
+ .C_HAS_DATA_COUNTS_WDCH(0),
249
+ .C_HAS_DATA_COUNTS_WRCH(0),
250
+ .C_HAS_DATA_COUNTS_RACH(0),
251
+ .C_HAS_DATA_COUNTS_RDCH(0),
252
+ .C_HAS_DATA_COUNTS_AXIS(0),
253
+ .C_HAS_PROG_FLAGS_WACH(0),
254
+ .C_HAS_PROG_FLAGS_WDCH(0),
255
+ .C_HAS_PROG_FLAGS_WRCH(0),
256
+ .C_HAS_PROG_FLAGS_RACH(0),
257
+ .C_HAS_PROG_FLAGS_RDCH(0),
258
+ .C_HAS_PROG_FLAGS_AXIS(0),
259
+ .C_PROG_FULL_TYPE_WACH(0),
260
+ .C_PROG_FULL_TYPE_WDCH(0),
261
+ .C_PROG_FULL_TYPE_WRCH(0),
262
+ .C_PROG_FULL_TYPE_RACH(0),
263
+ .C_PROG_FULL_TYPE_RDCH(0),
264
+ .C_PROG_FULL_TYPE_AXIS(0),
265
+ .C_PROG_FULL_THRESH_ASSERT_VAL_WACH(1023),
266
+ .C_PROG_FULL_THRESH_ASSERT_VAL_WDCH(1023),
267
+ .C_PROG_FULL_THRESH_ASSERT_VAL_WRCH(1023),
268
+ .C_PROG_FULL_THRESH_ASSERT_VAL_RACH(1023),
269
+ .C_PROG_FULL_THRESH_ASSERT_VAL_RDCH(1023),
270
+ .C_PROG_FULL_THRESH_ASSERT_VAL_AXIS(1023),
271
+ .C_PROG_EMPTY_TYPE_WACH(0),
272
+ .C_PROG_EMPTY_TYPE_WDCH(0),
273
+ .C_PROG_EMPTY_TYPE_WRCH(0),
274
+ .C_PROG_EMPTY_TYPE_RACH(0),
275
+ .C_PROG_EMPTY_TYPE_RDCH(0),
276
+ .C_PROG_EMPTY_TYPE_AXIS(0),
277
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_WACH(1022),
278
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_WDCH(1022),
279
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_WRCH(1022),
280
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_RACH(1022),
281
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_RDCH(1022),
282
+ .C_PROG_EMPTY_THRESH_ASSERT_VAL_AXIS(1022),
283
+ .C_REG_SLICE_MODE_WACH(0),
284
+ .C_REG_SLICE_MODE_WDCH(0),
285
+ .C_REG_SLICE_MODE_WRCH(0),
286
+ .C_REG_SLICE_MODE_RACH(0),
287
+ .C_REG_SLICE_MODE_RDCH(0),
288
+ .C_REG_SLICE_MODE_AXIS(0)
289
+ ) inst (
290
+ .backup(1'D0),
291
+ .backup_marker(1'D0),
292
+ .clk(clk),
293
+ .rst(1'D0),
294
+ .srst(srst),
295
+ .wr_clk(1'D0),
296
+ .wr_rst(1'D0),
297
+ .rd_clk(1'D0),
298
+ .rd_rst(1'D0),
299
+ .din(din),
300
+ .wr_en(wr_en),
301
+ .rd_en(rd_en),
302
+ .prog_empty_thresh(11'B0),
303
+ .prog_empty_thresh_assert(11'B0),
304
+ .prog_empty_thresh_negate(11'B0),
305
+ .prog_full_thresh(11'B0),
306
+ .prog_full_thresh_assert(11'B0),
307
+ .prog_full_thresh_negate(11'B0),
308
+ .int_clk(1'D0),
309
+ .injectdbiterr(1'D0),
310
+ .injectsbiterr(1'D0),
311
+ .sleep(1'D0),
312
+ .dout(dout),
313
+ .full(full),
314
+ .almost_full(),
315
+ .wr_ack(),
316
+ .overflow(),
317
+ .empty(empty),
318
+ .almost_empty(),
319
+ .valid(),
320
+ .underflow(),
321
+ .data_count(data_count),
322
+ .rd_data_count(),
323
+ .wr_data_count(),
324
+ .prog_full(),
325
+ .prog_empty(),
326
+ .sbiterr(),
327
+ .dbiterr(),
328
+ .wr_rst_busy(),
329
+ .rd_rst_busy(),
330
+ .m_aclk(1'D0),
331
+ .s_aclk(1'D0),
332
+ .s_aresetn(1'D0),
333
+ .m_aclk_en(1'D0),
334
+ .s_aclk_en(1'D0),
335
+ .s_axi_awid(1'B0),
336
+ .s_axi_awaddr(32'B0),
337
+ .s_axi_awlen(8'B0),
338
+ .s_axi_awsize(3'B0),
339
+ .s_axi_awburst(2'B0),
340
+ .s_axi_awlock(1'B0),
341
+ .s_axi_awcache(4'B0),
342
+ .s_axi_awprot(3'B0),
343
+ .s_axi_awqos(4'B0),
344
+ .s_axi_awregion(4'B0),
345
+ .s_axi_awuser(1'B0),
346
+ .s_axi_awvalid(1'D0),
347
+ .s_axi_awready(),
348
+ .s_axi_wid(1'B0),
349
+ .s_axi_wdata(64'B0),
350
+ .s_axi_wstrb(8'B0),
351
+ .s_axi_wlast(1'D0),
352
+ .s_axi_wuser(1'B0),
353
+ .s_axi_wvalid(1'D0),
354
+ .s_axi_wready(),
355
+ .s_axi_bid(),
356
+ .s_axi_bresp(),
357
+ .s_axi_buser(),
358
+ .s_axi_bvalid(),
359
+ .s_axi_bready(1'D0),
360
+ .m_axi_awid(),
361
+ .m_axi_awaddr(),
362
+ .m_axi_awlen(),
363
+ .m_axi_awsize(),
364
+ .m_axi_awburst(),
365
+ .m_axi_awlock(),
366
+ .m_axi_awcache(),
367
+ .m_axi_awprot(),
368
+ .m_axi_awqos(),
369
+ .m_axi_awregion(),
370
+ .m_axi_awuser(),
371
+ .m_axi_awvalid(),
372
+ .m_axi_awready(1'D0),
373
+ .m_axi_wid(),
374
+ .m_axi_wdata(),
375
+ .m_axi_wstrb(),
376
+ .m_axi_wlast(),
377
+ .m_axi_wuser(),
378
+ .m_axi_wvalid(),
379
+ .m_axi_wready(1'D0),
380
+ .m_axi_bid(1'B0),
381
+ .m_axi_bresp(2'B0),
382
+ .m_axi_buser(1'B0),
383
+ .m_axi_bvalid(1'D0),
384
+ .m_axi_bready(),
385
+ .s_axi_arid(1'B0),
386
+ .s_axi_araddr(32'B0),
387
+ .s_axi_arlen(8'B0),
388
+ .s_axi_arsize(3'B0),
389
+ .s_axi_arburst(2'B0),
390
+ .s_axi_arlock(1'B0),
391
+ .s_axi_arcache(4'B0),
392
+ .s_axi_arprot(3'B0),
393
+ .s_axi_arqos(4'B0),
394
+ .s_axi_arregion(4'B0),
395
+ .s_axi_aruser(1'B0),
396
+ .s_axi_arvalid(1'D0),
397
+ .s_axi_arready(),
398
+ .s_axi_rid(),
399
+ .s_axi_rdata(),
400
+ .s_axi_rresp(),
401
+ .s_axi_rlast(),
402
+ .s_axi_ruser(),
403
+ .s_axi_rvalid(),
404
+ .s_axi_rready(1'D0),
405
+ .m_axi_arid(),
406
+ .m_axi_araddr(),
407
+ .m_axi_arlen(),
408
+ .m_axi_arsize(),
409
+ .m_axi_arburst(),
410
+ .m_axi_arlock(),
411
+ .m_axi_arcache(),
412
+ .m_axi_arprot(),
413
+ .m_axi_arqos(),
414
+ .m_axi_arregion(),
415
+ .m_axi_aruser(),
416
+ .m_axi_arvalid(),
417
+ .m_axi_arready(1'D0),
418
+ .m_axi_rid(1'B0),
419
+ .m_axi_rdata(64'B0),
420
+ .m_axi_rresp(2'B0),
421
+ .m_axi_rlast(1'D0),
422
+ .m_axi_ruser(1'B0),
423
+ .m_axi_rvalid(1'D0),
424
+ .m_axi_rready(),
425
+ .s_axis_tvalid(1'D0),
426
+ .s_axis_tready(),
427
+ .s_axis_tdata(8'B0),
428
+ .s_axis_tstrb(1'B0),
429
+ .s_axis_tkeep(1'B0),
430
+ .s_axis_tlast(1'D0),
431
+ .s_axis_tid(1'B0),
432
+ .s_axis_tdest(1'B0),
433
+ .s_axis_tuser(4'B0),
434
+ .m_axis_tvalid(),
435
+ .m_axis_tready(1'D0),
436
+ .m_axis_tdata(),
437
+ .m_axis_tstrb(),
438
+ .m_axis_tkeep(),
439
+ .m_axis_tlast(),
440
+ .m_axis_tid(),
441
+ .m_axis_tdest(),
442
+ .m_axis_tuser(),
443
+ .axi_aw_injectsbiterr(1'D0),
444
+ .axi_aw_injectdbiterr(1'D0),
445
+ .axi_aw_prog_full_thresh(4'B0),
446
+ .axi_aw_prog_empty_thresh(4'B0),
447
+ .axi_aw_data_count(),
448
+ .axi_aw_wr_data_count(),
449
+ .axi_aw_rd_data_count(),
450
+ .axi_aw_sbiterr(),
451
+ .axi_aw_dbiterr(),
452
+ .axi_aw_overflow(),
453
+ .axi_aw_underflow(),
454
+ .axi_aw_prog_full(),
455
+ .axi_aw_prog_empty(),
456
+ .axi_w_injectsbiterr(1'D0),
457
+ .axi_w_injectdbiterr(1'D0),
458
+ .axi_w_prog_full_thresh(10'B0),
459
+ .axi_w_prog_empty_thresh(10'B0),
460
+ .axi_w_data_count(),
461
+ .axi_w_wr_data_count(),
462
+ .axi_w_rd_data_count(),
463
+ .axi_w_sbiterr(),
464
+ .axi_w_dbiterr(),
465
+ .axi_w_overflow(),
466
+ .axi_w_underflow(),
467
+ .axi_w_prog_full(),
468
+ .axi_w_prog_empty(),
469
+ .axi_b_injectsbiterr(1'D0),
470
+ .axi_b_injectdbiterr(1'D0),
471
+ .axi_b_prog_full_thresh(4'B0),
472
+ .axi_b_prog_empty_thresh(4'B0),
473
+ .axi_b_data_count(),
474
+ .axi_b_wr_data_count(),
475
+ .axi_b_rd_data_count(),
476
+ .axi_b_sbiterr(),
477
+ .axi_b_dbiterr(),
478
+ .axi_b_overflow(),
479
+ .axi_b_underflow(),
480
+ .axi_b_prog_full(),
481
+ .axi_b_prog_empty(),
482
+ .axi_ar_injectsbiterr(1'D0),
483
+ .axi_ar_injectdbiterr(1'D0),
484
+ .axi_ar_prog_full_thresh(4'B0),
485
+ .axi_ar_prog_empty_thresh(4'B0),
486
+ .axi_ar_data_count(),
487
+ .axi_ar_wr_data_count(),
488
+ .axi_ar_rd_data_count(),
489
+ .axi_ar_sbiterr(),
490
+ .axi_ar_dbiterr(),
491
+ .axi_ar_overflow(),
492
+ .axi_ar_underflow(),
493
+ .axi_ar_prog_full(),
494
+ .axi_ar_prog_empty(),
495
+ .axi_r_injectsbiterr(1'D0),
496
+ .axi_r_injectdbiterr(1'D0),
497
+ .axi_r_prog_full_thresh(10'B0),
498
+ .axi_r_prog_empty_thresh(10'B0),
499
+ .axi_r_data_count(),
500
+ .axi_r_wr_data_count(),
501
+ .axi_r_rd_data_count(),
502
+ .axi_r_sbiterr(),
503
+ .axi_r_dbiterr(),
504
+ .axi_r_overflow(),
505
+ .axi_r_underflow(),
506
+ .axi_r_prog_full(),
507
+ .axi_r_prog_empty(),
508
+ .axis_injectsbiterr(1'D0),
509
+ .axis_injectdbiterr(1'D0),
510
+ .axis_prog_full_thresh(10'B0),
511
+ .axis_prog_empty_thresh(10'B0),
512
+ .axis_data_count(),
513
+ .axis_wr_data_count(),
514
+ .axis_rd_data_count(),
515
+ .axis_sbiterr(),
516
+ .axis_dbiterr(),
517
+ .axis_overflow(),
518
+ .axis_underflow(),
519
+ .axis_prog_full(),
520
+ .axis_prog_empty()
521
+ );
522
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/simulation/fifo_generator_vlog_beh.v ADDED
The diff for this file is too large to render. See raw diff
 
HDLForBeginners_Examples/30092022_testbench_start_finish/ip/data_fifo/synth/data_fifo.vhd ADDED
@@ -0,0 +1,857 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- (c) Copyright 1995-2022 Xilinx, Inc. All rights reserved.
2
+ --
3
+ -- This file contains confidential and proprietary information
4
+ -- of Xilinx, Inc. and is protected under U.S. and
5
+ -- international copyright and other intellectual property
6
+ -- laws.
7
+ --
8
+ -- DISCLAIMER
9
+ -- This disclaimer is not a license and does not grant any
10
+ -- rights to the materials distributed herewith. Except as
11
+ -- otherwise provided in a valid license issued to you by
12
+ -- Xilinx, and to the maximum extent permitted by applicable
13
+ -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
14
+ -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
15
+ -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
16
+ -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
17
+ -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
18
+ -- (2) Xilinx shall not be liable (whether in contract or tort,
19
+ -- including negligence, or under any other theory of
20
+ -- liability) for any loss or damage of any kind or nature
21
+ -- related to, arising under or in connection with these
22
+ -- materials, including for any direct, or any indirect,
23
+ -- special, incidental, or consequential loss or damage
24
+ -- (including loss of data, profits, goodwill, or any type of
25
+ -- loss or damage suffered as a result of any action brought
26
+ -- by a third party) even if such damage or loss was
27
+ -- reasonably foreseeable or Xilinx had been advised of the
28
+ -- possibility of the same.
29
+ --
30
+ -- CRITICAL APPLICATIONS
31
+ -- Xilinx products are not designed or intended to be fail-
32
+ -- safe, or for use in any application requiring fail-safe
33
+ -- performance, such as life-support or safety devices or
34
+ -- systems, Class III medical devices, nuclear facilities,
35
+ -- applications related to the deployment of airbags, or any
36
+ -- other applications that could lead to death, personal
37
+ -- injury, or severe property or environmental damage
38
+ -- (individually and collectively, "Critical
39
+ -- Applications"). Customer assumes the sole risk and
40
+ -- liability of any use of Xilinx products in Critical
41
+ -- Applications, subject only to applicable laws and
42
+ -- regulations governing limitations on product liability.
43
+ --
44
+ -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
45
+ -- PART OF THIS FILE AT ALL TIMES.
46
+ --
47
+ -- DO NOT MODIFY THIS FILE.
48
+
49
+ -- IP VLNV: xilinx.com:ip:fifo_generator:13.2
50
+ -- IP Revision: 5
51
+
52
+ LIBRARY ieee;
53
+ USE ieee.std_logic_1164.ALL;
54
+ USE ieee.numeric_std.ALL;
55
+
56
+ LIBRARY fifo_generator_v13_2_5;
57
+ USE fifo_generator_v13_2_5.fifo_generator_v13_2_5;
58
+
59
+ ENTITY data_fifo IS
60
+ PORT (
61
+ clk : IN STD_LOGIC;
62
+ srst : IN STD_LOGIC;
63
+ din : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
64
+ wr_en : IN STD_LOGIC;
65
+ rd_en : IN STD_LOGIC;
66
+ dout : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
67
+ full : OUT STD_LOGIC;
68
+ empty : OUT STD_LOGIC;
69
+ data_count : OUT STD_LOGIC_VECTOR(11 DOWNTO 0)
70
+ );
71
+ END data_fifo;
72
+
73
+ ARCHITECTURE data_fifo_arch OF data_fifo IS
74
+ ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING;
75
+ ATTRIBUTE DowngradeIPIdentifiedWarnings OF data_fifo_arch: ARCHITECTURE IS "yes";
76
+ COMPONENT fifo_generator_v13_2_5 IS
77
+ GENERIC (
78
+ C_COMMON_CLOCK : INTEGER;
79
+ C_SELECT_XPM : INTEGER;
80
+ C_COUNT_TYPE : INTEGER;
81
+ C_DATA_COUNT_WIDTH : INTEGER;
82
+ C_DEFAULT_VALUE : STRING;
83
+ C_DIN_WIDTH : INTEGER;
84
+ C_DOUT_RST_VAL : STRING;
85
+ C_DOUT_WIDTH : INTEGER;
86
+ C_ENABLE_RLOCS : INTEGER;
87
+ C_FAMILY : STRING;
88
+ C_FULL_FLAGS_RST_VAL : INTEGER;
89
+ C_HAS_ALMOST_EMPTY : INTEGER;
90
+ C_HAS_ALMOST_FULL : INTEGER;
91
+ C_HAS_BACKUP : INTEGER;
92
+ C_HAS_DATA_COUNT : INTEGER;
93
+ C_HAS_INT_CLK : INTEGER;
94
+ C_HAS_MEMINIT_FILE : INTEGER;
95
+ C_HAS_OVERFLOW : INTEGER;
96
+ C_HAS_RD_DATA_COUNT : INTEGER;
97
+ C_HAS_RD_RST : INTEGER;
98
+ C_HAS_RST : INTEGER;
99
+ C_HAS_SRST : INTEGER;
100
+ C_HAS_UNDERFLOW : INTEGER;
101
+ C_HAS_VALID : INTEGER;
102
+ C_HAS_WR_ACK : INTEGER;
103
+ C_HAS_WR_DATA_COUNT : INTEGER;
104
+ C_HAS_WR_RST : INTEGER;
105
+ C_IMPLEMENTATION_TYPE : INTEGER;
106
+ C_INIT_WR_PNTR_VAL : INTEGER;
107
+ C_MEMORY_TYPE : INTEGER;
108
+ C_MIF_FILE_NAME : STRING;
109
+ C_OPTIMIZATION_MODE : INTEGER;
110
+ C_OVERFLOW_LOW : INTEGER;
111
+ C_PRELOAD_LATENCY : INTEGER;
112
+ C_PRELOAD_REGS : INTEGER;
113
+ C_PRIM_FIFO_TYPE : STRING;
114
+ C_PROG_EMPTY_THRESH_ASSERT_VAL : INTEGER;
115
+ C_PROG_EMPTY_THRESH_NEGATE_VAL : INTEGER;
116
+ C_PROG_EMPTY_TYPE : INTEGER;
117
+ C_PROG_FULL_THRESH_ASSERT_VAL : INTEGER;
118
+ C_PROG_FULL_THRESH_NEGATE_VAL : INTEGER;
119
+ C_PROG_FULL_TYPE : INTEGER;
120
+ C_RD_DATA_COUNT_WIDTH : INTEGER;
121
+ C_RD_DEPTH : INTEGER;
122
+ C_RD_FREQ : INTEGER;
123
+ C_RD_PNTR_WIDTH : INTEGER;
124
+ C_UNDERFLOW_LOW : INTEGER;
125
+ C_USE_DOUT_RST : INTEGER;
126
+ C_USE_ECC : INTEGER;
127
+ C_USE_EMBEDDED_REG : INTEGER;
128
+ C_USE_PIPELINE_REG : INTEGER;
129
+ C_POWER_SAVING_MODE : INTEGER;
130
+ C_USE_FIFO16_FLAGS : INTEGER;
131
+ C_USE_FWFT_DATA_COUNT : INTEGER;
132
+ C_VALID_LOW : INTEGER;
133
+ C_WR_ACK_LOW : INTEGER;
134
+ C_WR_DATA_COUNT_WIDTH : INTEGER;
135
+ C_WR_DEPTH : INTEGER;
136
+ C_WR_FREQ : INTEGER;
137
+ C_WR_PNTR_WIDTH : INTEGER;
138
+ C_WR_RESPONSE_LATENCY : INTEGER;
139
+ C_MSGON_VAL : INTEGER;
140
+ C_ENABLE_RST_SYNC : INTEGER;
141
+ C_EN_SAFETY_CKT : INTEGER;
142
+ C_ERROR_INJECTION_TYPE : INTEGER;
143
+ C_SYNCHRONIZER_STAGE : INTEGER;
144
+ C_INTERFACE_TYPE : INTEGER;
145
+ C_AXI_TYPE : INTEGER;
146
+ C_HAS_AXI_WR_CHANNEL : INTEGER;
147
+ C_HAS_AXI_RD_CHANNEL : INTEGER;
148
+ C_HAS_SLAVE_CE : INTEGER;
149
+ C_HAS_MASTER_CE : INTEGER;
150
+ C_ADD_NGC_CONSTRAINT : INTEGER;
151
+ C_USE_COMMON_OVERFLOW : INTEGER;
152
+ C_USE_COMMON_UNDERFLOW : INTEGER;
153
+ C_USE_DEFAULT_SETTINGS : INTEGER;
154
+ C_AXI_ID_WIDTH : INTEGER;
155
+ C_AXI_ADDR_WIDTH : INTEGER;
156
+ C_AXI_DATA_WIDTH : INTEGER;
157
+ C_AXI_LEN_WIDTH : INTEGER;
158
+ C_AXI_LOCK_WIDTH : INTEGER;
159
+ C_HAS_AXI_ID : INTEGER;
160
+ C_HAS_AXI_AWUSER : INTEGER;
161
+ C_HAS_AXI_WUSER : INTEGER;
162
+ C_HAS_AXI_BUSER : INTEGER;
163
+ C_HAS_AXI_ARUSER : INTEGER;
164
+ C_HAS_AXI_RUSER : INTEGER;
165
+ C_AXI_ARUSER_WIDTH : INTEGER;
166
+ C_AXI_AWUSER_WIDTH : INTEGER;
167
+ C_AXI_WUSER_WIDTH : INTEGER;
168
+ C_AXI_BUSER_WIDTH : INTEGER;
169
+ C_AXI_RUSER_WIDTH : INTEGER;
170
+ C_HAS_AXIS_TDATA : INTEGER;
171
+ C_HAS_AXIS_TID : INTEGER;
172
+ C_HAS_AXIS_TDEST : INTEGER;
173
+ C_HAS_AXIS_TUSER : INTEGER;
174
+ C_HAS_AXIS_TREADY : INTEGER;
175
+ C_HAS_AXIS_TLAST : INTEGER;
176
+ C_HAS_AXIS_TSTRB : INTEGER;
177
+ C_HAS_AXIS_TKEEP : INTEGER;
178
+ C_AXIS_TDATA_WIDTH : INTEGER;
179
+ C_AXIS_TID_WIDTH : INTEGER;
180
+ C_AXIS_TDEST_WIDTH : INTEGER;
181
+ C_AXIS_TUSER_WIDTH : INTEGER;
182
+ C_AXIS_TSTRB_WIDTH : INTEGER;
183
+ C_AXIS_TKEEP_WIDTH : INTEGER;
184
+ C_WACH_TYPE : INTEGER;
185
+ C_WDCH_TYPE : INTEGER;
186
+ C_WRCH_TYPE : INTEGER;
187
+ C_RACH_TYPE : INTEGER;
188
+ C_RDCH_TYPE : INTEGER;
189
+ C_AXIS_TYPE : INTEGER;
190
+ C_IMPLEMENTATION_TYPE_WACH : INTEGER;
191
+ C_IMPLEMENTATION_TYPE_WDCH : INTEGER;
192
+ C_IMPLEMENTATION_TYPE_WRCH : INTEGER;
193
+ C_IMPLEMENTATION_TYPE_RACH : INTEGER;
194
+ C_IMPLEMENTATION_TYPE_RDCH : INTEGER;
195
+ C_IMPLEMENTATION_TYPE_AXIS : INTEGER;
196
+ C_APPLICATION_TYPE_WACH : INTEGER;
197
+ C_APPLICATION_TYPE_WDCH : INTEGER;
198
+ C_APPLICATION_TYPE_WRCH : INTEGER;
199
+ C_APPLICATION_TYPE_RACH : INTEGER;
200
+ C_APPLICATION_TYPE_RDCH : INTEGER;
201
+ C_APPLICATION_TYPE_AXIS : INTEGER;
202
+ C_PRIM_FIFO_TYPE_WACH : STRING;
203
+ C_PRIM_FIFO_TYPE_WDCH : STRING;
204
+ C_PRIM_FIFO_TYPE_WRCH : STRING;
205
+ C_PRIM_FIFO_TYPE_RACH : STRING;
206
+ C_PRIM_FIFO_TYPE_RDCH : STRING;
207
+ C_PRIM_FIFO_TYPE_AXIS : STRING;
208
+ C_USE_ECC_WACH : INTEGER;
209
+ C_USE_ECC_WDCH : INTEGER;
210
+ C_USE_ECC_WRCH : INTEGER;
211
+ C_USE_ECC_RACH : INTEGER;
212
+ C_USE_ECC_RDCH : INTEGER;
213
+ C_USE_ECC_AXIS : INTEGER;
214
+ C_ERROR_INJECTION_TYPE_WACH : INTEGER;
215
+ C_ERROR_INJECTION_TYPE_WDCH : INTEGER;
216
+ C_ERROR_INJECTION_TYPE_WRCH : INTEGER;
217
+ C_ERROR_INJECTION_TYPE_RACH : INTEGER;
218
+ C_ERROR_INJECTION_TYPE_RDCH : INTEGER;
219
+ C_ERROR_INJECTION_TYPE_AXIS : INTEGER;
220
+ C_DIN_WIDTH_WACH : INTEGER;
221
+ C_DIN_WIDTH_WDCH : INTEGER;
222
+ C_DIN_WIDTH_WRCH : INTEGER;
223
+ C_DIN_WIDTH_RACH : INTEGER;
224
+ C_DIN_WIDTH_RDCH : INTEGER;
225
+ C_DIN_WIDTH_AXIS : INTEGER;
226
+ C_WR_DEPTH_WACH : INTEGER;
227
+ C_WR_DEPTH_WDCH : INTEGER;
228
+ C_WR_DEPTH_WRCH : INTEGER;
229
+ C_WR_DEPTH_RACH : INTEGER;
230
+ C_WR_DEPTH_RDCH : INTEGER;
231
+ C_WR_DEPTH_AXIS : INTEGER;
232
+ C_WR_PNTR_WIDTH_WACH : INTEGER;
233
+ C_WR_PNTR_WIDTH_WDCH : INTEGER;
234
+ C_WR_PNTR_WIDTH_WRCH : INTEGER;
235
+ C_WR_PNTR_WIDTH_RACH : INTEGER;
236
+ C_WR_PNTR_WIDTH_RDCH : INTEGER;
237
+ C_WR_PNTR_WIDTH_AXIS : INTEGER;
238
+ C_HAS_DATA_COUNTS_WACH : INTEGER;
239
+ C_HAS_DATA_COUNTS_WDCH : INTEGER;
240
+ C_HAS_DATA_COUNTS_WRCH : INTEGER;
241
+ C_HAS_DATA_COUNTS_RACH : INTEGER;
242
+ C_HAS_DATA_COUNTS_RDCH : INTEGER;
243
+ C_HAS_DATA_COUNTS_AXIS : INTEGER;
244
+ C_HAS_PROG_FLAGS_WACH : INTEGER;
245
+ C_HAS_PROG_FLAGS_WDCH : INTEGER;
246
+ C_HAS_PROG_FLAGS_WRCH : INTEGER;
247
+ C_HAS_PROG_FLAGS_RACH : INTEGER;
248
+ C_HAS_PROG_FLAGS_RDCH : INTEGER;
249
+ C_HAS_PROG_FLAGS_AXIS : INTEGER;
250
+ C_PROG_FULL_TYPE_WACH : INTEGER;
251
+ C_PROG_FULL_TYPE_WDCH : INTEGER;
252
+ C_PROG_FULL_TYPE_WRCH : INTEGER;
253
+ C_PROG_FULL_TYPE_RACH : INTEGER;
254
+ C_PROG_FULL_TYPE_RDCH : INTEGER;
255
+ C_PROG_FULL_TYPE_AXIS : INTEGER;
256
+ C_PROG_FULL_THRESH_ASSERT_VAL_WACH : INTEGER;
257
+ C_PROG_FULL_THRESH_ASSERT_VAL_WDCH : INTEGER;
258
+ C_PROG_FULL_THRESH_ASSERT_VAL_WRCH : INTEGER;
259
+ C_PROG_FULL_THRESH_ASSERT_VAL_RACH : INTEGER;
260
+ C_PROG_FULL_THRESH_ASSERT_VAL_RDCH : INTEGER;
261
+ C_PROG_FULL_THRESH_ASSERT_VAL_AXIS : INTEGER;
262
+ C_PROG_EMPTY_TYPE_WACH : INTEGER;
263
+ C_PROG_EMPTY_TYPE_WDCH : INTEGER;
264
+ C_PROG_EMPTY_TYPE_WRCH : INTEGER;
265
+ C_PROG_EMPTY_TYPE_RACH : INTEGER;
266
+ C_PROG_EMPTY_TYPE_RDCH : INTEGER;
267
+ C_PROG_EMPTY_TYPE_AXIS : INTEGER;
268
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WACH : INTEGER;
269
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WDCH : INTEGER;
270
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WRCH : INTEGER;
271
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_RACH : INTEGER;
272
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_RDCH : INTEGER;
273
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_AXIS : INTEGER;
274
+ C_REG_SLICE_MODE_WACH : INTEGER;
275
+ C_REG_SLICE_MODE_WDCH : INTEGER;
276
+ C_REG_SLICE_MODE_WRCH : INTEGER;
277
+ C_REG_SLICE_MODE_RACH : INTEGER;
278
+ C_REG_SLICE_MODE_RDCH : INTEGER;
279
+ C_REG_SLICE_MODE_AXIS : INTEGER
280
+ );
281
+ PORT (
282
+ backup : IN STD_LOGIC;
283
+ backup_marker : IN STD_LOGIC;
284
+ clk : IN STD_LOGIC;
285
+ rst : IN STD_LOGIC;
286
+ srst : IN STD_LOGIC;
287
+ wr_clk : IN STD_LOGIC;
288
+ wr_rst : IN STD_LOGIC;
289
+ rd_clk : IN STD_LOGIC;
290
+ rd_rst : IN STD_LOGIC;
291
+ din : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
292
+ wr_en : IN STD_LOGIC;
293
+ rd_en : IN STD_LOGIC;
294
+ prog_empty_thresh : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
295
+ prog_empty_thresh_assert : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
296
+ prog_empty_thresh_negate : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
297
+ prog_full_thresh : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
298
+ prog_full_thresh_assert : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
299
+ prog_full_thresh_negate : IN STD_LOGIC_VECTOR(10 DOWNTO 0);
300
+ int_clk : IN STD_LOGIC;
301
+ injectdbiterr : IN STD_LOGIC;
302
+ injectsbiterr : IN STD_LOGIC;
303
+ sleep : IN STD_LOGIC;
304
+ dout : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
305
+ full : OUT STD_LOGIC;
306
+ almost_full : OUT STD_LOGIC;
307
+ wr_ack : OUT STD_LOGIC;
308
+ overflow : OUT STD_LOGIC;
309
+ empty : OUT STD_LOGIC;
310
+ almost_empty : OUT STD_LOGIC;
311
+ valid : OUT STD_LOGIC;
312
+ underflow : OUT STD_LOGIC;
313
+ data_count : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
314
+ rd_data_count : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
315
+ wr_data_count : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
316
+ prog_full : OUT STD_LOGIC;
317
+ prog_empty : OUT STD_LOGIC;
318
+ sbiterr : OUT STD_LOGIC;
319
+ dbiterr : OUT STD_LOGIC;
320
+ wr_rst_busy : OUT STD_LOGIC;
321
+ rd_rst_busy : OUT STD_LOGIC;
322
+ m_aclk : IN STD_LOGIC;
323
+ s_aclk : IN STD_LOGIC;
324
+ s_aresetn : IN STD_LOGIC;
325
+ m_aclk_en : IN STD_LOGIC;
326
+ s_aclk_en : IN STD_LOGIC;
327
+ s_axi_awid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
328
+ s_axi_awaddr : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
329
+ s_axi_awlen : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
330
+ s_axi_awsize : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
331
+ s_axi_awburst : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
332
+ s_axi_awlock : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
333
+ s_axi_awcache : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
334
+ s_axi_awprot : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
335
+ s_axi_awqos : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
336
+ s_axi_awregion : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
337
+ s_axi_awuser : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
338
+ s_axi_awvalid : IN STD_LOGIC;
339
+ s_axi_awready : OUT STD_LOGIC;
340
+ s_axi_wid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
341
+ s_axi_wdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
342
+ s_axi_wstrb : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
343
+ s_axi_wlast : IN STD_LOGIC;
344
+ s_axi_wuser : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
345
+ s_axi_wvalid : IN STD_LOGIC;
346
+ s_axi_wready : OUT STD_LOGIC;
347
+ s_axi_bid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
348
+ s_axi_bresp : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
349
+ s_axi_buser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
350
+ s_axi_bvalid : OUT STD_LOGIC;
351
+ s_axi_bready : IN STD_LOGIC;
352
+ m_axi_awid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
353
+ m_axi_awaddr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
354
+ m_axi_awlen : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
355
+ m_axi_awsize : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
356
+ m_axi_awburst : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
357
+ m_axi_awlock : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
358
+ m_axi_awcache : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
359
+ m_axi_awprot : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
360
+ m_axi_awqos : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
361
+ m_axi_awregion : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
362
+ m_axi_awuser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
363
+ m_axi_awvalid : OUT STD_LOGIC;
364
+ m_axi_awready : IN STD_LOGIC;
365
+ m_axi_wid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
366
+ m_axi_wdata : OUT STD_LOGIC_VECTOR(63 DOWNTO 0);
367
+ m_axi_wstrb : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
368
+ m_axi_wlast : OUT STD_LOGIC;
369
+ m_axi_wuser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
370
+ m_axi_wvalid : OUT STD_LOGIC;
371
+ m_axi_wready : IN STD_LOGIC;
372
+ m_axi_bid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
373
+ m_axi_bresp : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
374
+ m_axi_buser : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
375
+ m_axi_bvalid : IN STD_LOGIC;
376
+ m_axi_bready : OUT STD_LOGIC;
377
+ s_axi_arid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
378
+ s_axi_araddr : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
379
+ s_axi_arlen : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
380
+ s_axi_arsize : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
381
+ s_axi_arburst : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
382
+ s_axi_arlock : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
383
+ s_axi_arcache : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
384
+ s_axi_arprot : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
385
+ s_axi_arqos : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
386
+ s_axi_arregion : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
387
+ s_axi_aruser : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
388
+ s_axi_arvalid : IN STD_LOGIC;
389
+ s_axi_arready : OUT STD_LOGIC;
390
+ s_axi_rid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
391
+ s_axi_rdata : OUT STD_LOGIC_VECTOR(63 DOWNTO 0);
392
+ s_axi_rresp : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
393
+ s_axi_rlast : OUT STD_LOGIC;
394
+ s_axi_ruser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
395
+ s_axi_rvalid : OUT STD_LOGIC;
396
+ s_axi_rready : IN STD_LOGIC;
397
+ m_axi_arid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
398
+ m_axi_araddr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
399
+ m_axi_arlen : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
400
+ m_axi_arsize : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
401
+ m_axi_arburst : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
402
+ m_axi_arlock : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
403
+ m_axi_arcache : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
404
+ m_axi_arprot : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
405
+ m_axi_arqos : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
406
+ m_axi_arregion : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
407
+ m_axi_aruser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
408
+ m_axi_arvalid : OUT STD_LOGIC;
409
+ m_axi_arready : IN STD_LOGIC;
410
+ m_axi_rid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
411
+ m_axi_rdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
412
+ m_axi_rresp : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
413
+ m_axi_rlast : IN STD_LOGIC;
414
+ m_axi_ruser : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
415
+ m_axi_rvalid : IN STD_LOGIC;
416
+ m_axi_rready : OUT STD_LOGIC;
417
+ s_axis_tvalid : IN STD_LOGIC;
418
+ s_axis_tready : OUT STD_LOGIC;
419
+ s_axis_tdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
420
+ s_axis_tstrb : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
421
+ s_axis_tkeep : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
422
+ s_axis_tlast : IN STD_LOGIC;
423
+ s_axis_tid : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
424
+ s_axis_tdest : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
425
+ s_axis_tuser : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
426
+ m_axis_tvalid : OUT STD_LOGIC;
427
+ m_axis_tready : IN STD_LOGIC;
428
+ m_axis_tdata : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
429
+ m_axis_tstrb : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
430
+ m_axis_tkeep : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
431
+ m_axis_tlast : OUT STD_LOGIC;
432
+ m_axis_tid : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
433
+ m_axis_tdest : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
434
+ m_axis_tuser : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
435
+ axi_aw_injectsbiterr : IN STD_LOGIC;
436
+ axi_aw_injectdbiterr : IN STD_LOGIC;
437
+ axi_aw_prog_full_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
438
+ axi_aw_prog_empty_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
439
+ axi_aw_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
440
+ axi_aw_wr_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
441
+ axi_aw_rd_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
442
+ axi_aw_sbiterr : OUT STD_LOGIC;
443
+ axi_aw_dbiterr : OUT STD_LOGIC;
444
+ axi_aw_overflow : OUT STD_LOGIC;
445
+ axi_aw_underflow : OUT STD_LOGIC;
446
+ axi_aw_prog_full : OUT STD_LOGIC;
447
+ axi_aw_prog_empty : OUT STD_LOGIC;
448
+ axi_w_injectsbiterr : IN STD_LOGIC;
449
+ axi_w_injectdbiterr : IN STD_LOGIC;
450
+ axi_w_prog_full_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
451
+ axi_w_prog_empty_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
452
+ axi_w_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
453
+ axi_w_wr_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
454
+ axi_w_rd_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
455
+ axi_w_sbiterr : OUT STD_LOGIC;
456
+ axi_w_dbiterr : OUT STD_LOGIC;
457
+ axi_w_overflow : OUT STD_LOGIC;
458
+ axi_w_underflow : OUT STD_LOGIC;
459
+ axi_w_prog_full : OUT STD_LOGIC;
460
+ axi_w_prog_empty : OUT STD_LOGIC;
461
+ axi_b_injectsbiterr : IN STD_LOGIC;
462
+ axi_b_injectdbiterr : IN STD_LOGIC;
463
+ axi_b_prog_full_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
464
+ axi_b_prog_empty_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
465
+ axi_b_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
466
+ axi_b_wr_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
467
+ axi_b_rd_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
468
+ axi_b_sbiterr : OUT STD_LOGIC;
469
+ axi_b_dbiterr : OUT STD_LOGIC;
470
+ axi_b_overflow : OUT STD_LOGIC;
471
+ axi_b_underflow : OUT STD_LOGIC;
472
+ axi_b_prog_full : OUT STD_LOGIC;
473
+ axi_b_prog_empty : OUT STD_LOGIC;
474
+ axi_ar_injectsbiterr : IN STD_LOGIC;
475
+ axi_ar_injectdbiterr : IN STD_LOGIC;
476
+ axi_ar_prog_full_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
477
+ axi_ar_prog_empty_thresh : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
478
+ axi_ar_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
479
+ axi_ar_wr_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
480
+ axi_ar_rd_data_count : OUT STD_LOGIC_VECTOR(4 DOWNTO 0);
481
+ axi_ar_sbiterr : OUT STD_LOGIC;
482
+ axi_ar_dbiterr : OUT STD_LOGIC;
483
+ axi_ar_overflow : OUT STD_LOGIC;
484
+ axi_ar_underflow : OUT STD_LOGIC;
485
+ axi_ar_prog_full : OUT STD_LOGIC;
486
+ axi_ar_prog_empty : OUT STD_LOGIC;
487
+ axi_r_injectsbiterr : IN STD_LOGIC;
488
+ axi_r_injectdbiterr : IN STD_LOGIC;
489
+ axi_r_prog_full_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
490
+ axi_r_prog_empty_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
491
+ axi_r_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
492
+ axi_r_wr_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
493
+ axi_r_rd_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
494
+ axi_r_sbiterr : OUT STD_LOGIC;
495
+ axi_r_dbiterr : OUT STD_LOGIC;
496
+ axi_r_overflow : OUT STD_LOGIC;
497
+ axi_r_underflow : OUT STD_LOGIC;
498
+ axi_r_prog_full : OUT STD_LOGIC;
499
+ axi_r_prog_empty : OUT STD_LOGIC;
500
+ axis_injectsbiterr : IN STD_LOGIC;
501
+ axis_injectdbiterr : IN STD_LOGIC;
502
+ axis_prog_full_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
503
+ axis_prog_empty_thresh : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
504
+ axis_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
505
+ axis_wr_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
506
+ axis_rd_data_count : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
507
+ axis_sbiterr : OUT STD_LOGIC;
508
+ axis_dbiterr : OUT STD_LOGIC;
509
+ axis_overflow : OUT STD_LOGIC;
510
+ axis_underflow : OUT STD_LOGIC;
511
+ axis_prog_full : OUT STD_LOGIC;
512
+ axis_prog_empty : OUT STD_LOGIC
513
+ );
514
+ END COMPONENT fifo_generator_v13_2_5;
515
+ ATTRIBUTE X_CORE_INFO : STRING;
516
+ ATTRIBUTE X_CORE_INFO OF data_fifo_arch: ARCHITECTURE IS "fifo_generator_v13_2_5,Vivado 2021.1";
517
+ ATTRIBUTE CHECK_LICENSE_TYPE : STRING;
518
+ ATTRIBUTE CHECK_LICENSE_TYPE OF data_fifo_arch : ARCHITECTURE IS "data_fifo,fifo_generator_v13_2_5,{}";
519
+ ATTRIBUTE CORE_GENERATION_INFO : STRING;
520
+ ATTRIBUTE CORE_GENERATION_INFO OF data_fifo_arch: ARCHITECTURE IS "data_fifo,fifo_generator_v13_2_5,{x_ipProduct=Vivado 2021.1,x_ipVendor=xilinx.com,x_ipLibrary=ip,x_ipName=fifo_generator,x_ipVersion=13.2,x_ipCoreRevision=5,x_ipLanguage=VERILOG,x_ipSimLanguage=MIXED,C_COMMON_CLOCK=1,C_SELECT_XPM=0,C_COUNT_TYPE=0,C_DATA_COUNT_WIDTH=12,C_DEFAULT_VALUE=BlankString,C_DIN_WIDTH=32,C_DOUT_RST_VAL=0,C_DOUT_WIDTH=32,C_ENABLE_RLOCS=0,C_FAMILY=artix7,C_FULL_FLAGS_RST_VAL=0,C_HAS_ALMOST_EMPTY=0,C_HAS_ALMOST_FULL=0,C_HAS_BACKUP=0,C_HAS_DATA_COUNT=1,C_HAS_INT_CLK=0,C_HAS_ME" &
521
+ "MINIT_FILE=0,C_HAS_OVERFLOW=0,C_HAS_RD_DATA_COUNT=0,C_HAS_RD_RST=0,C_HAS_RST=0,C_HAS_SRST=1,C_HAS_UNDERFLOW=0,C_HAS_VALID=0,C_HAS_WR_ACK=0,C_HAS_WR_DATA_COUNT=0,C_HAS_WR_RST=0,C_IMPLEMENTATION_TYPE=0,C_INIT_WR_PNTR_VAL=0,C_MEMORY_TYPE=1,C_MIF_FILE_NAME=BlankString,C_OPTIMIZATION_MODE=0,C_OVERFLOW_LOW=0,C_PRELOAD_LATENCY=0,C_PRELOAD_REGS=1,C_PRIM_FIFO_TYPE=2kx18,C_PROG_EMPTY_THRESH_ASSERT_VAL=4,C_PROG_EMPTY_THRESH_NEGATE_VAL=5,C_PROG_EMPTY_TYPE=0,C_PROG_FULL_THRESH_ASSERT_VAL=2047,C_PROG_FULL_THR" &
522
+ "ESH_NEGATE_VAL=2046,C_PROG_FULL_TYPE=0,C_RD_DATA_COUNT_WIDTH=12,C_RD_DEPTH=2048,C_RD_FREQ=1,C_RD_PNTR_WIDTH=11,C_UNDERFLOW_LOW=0,C_USE_DOUT_RST=1,C_USE_ECC=0,C_USE_EMBEDDED_REG=0,C_USE_PIPELINE_REG=0,C_POWER_SAVING_MODE=0,C_USE_FIFO16_FLAGS=0,C_USE_FWFT_DATA_COUNT=1,C_VALID_LOW=0,C_WR_ACK_LOW=0,C_WR_DATA_COUNT_WIDTH=12,C_WR_DEPTH=2048,C_WR_FREQ=1,C_WR_PNTR_WIDTH=11,C_WR_RESPONSE_LATENCY=1,C_MSGON_VAL=1,C_ENABLE_RST_SYNC=1,C_EN_SAFETY_CKT=0,C_ERROR_INJECTION_TYPE=0,C_SYNCHRONIZER_STAGE=2,C_INTERF" &
523
+ "ACE_TYPE=0,C_AXI_TYPE=1,C_HAS_AXI_WR_CHANNEL=1,C_HAS_AXI_RD_CHANNEL=1,C_HAS_SLAVE_CE=0,C_HAS_MASTER_CE=0,C_ADD_NGC_CONSTRAINT=0,C_USE_COMMON_OVERFLOW=0,C_USE_COMMON_UNDERFLOW=0,C_USE_DEFAULT_SETTINGS=0,C_AXI_ID_WIDTH=1,C_AXI_ADDR_WIDTH=32,C_AXI_DATA_WIDTH=64,C_AXI_LEN_WIDTH=8,C_AXI_LOCK_WIDTH=1,C_HAS_AXI_ID=0,C_HAS_AXI_AWUSER=0,C_HAS_AXI_WUSER=0,C_HAS_AXI_BUSER=0,C_HAS_AXI_ARUSER=0,C_HAS_AXI_RUSER=0,C_AXI_ARUSER_WIDTH=1,C_AXI_AWUSER_WIDTH=1,C_AXI_WUSER_WIDTH=1,C_AXI_BUSER_WIDTH=1,C_AXI_RUSER_WID" &
524
+ "TH=1,C_HAS_AXIS_TDATA=1,C_HAS_AXIS_TID=0,C_HAS_AXIS_TDEST=0,C_HAS_AXIS_TUSER=1,C_HAS_AXIS_TREADY=1,C_HAS_AXIS_TLAST=0,C_HAS_AXIS_TSTRB=0,C_HAS_AXIS_TKEEP=0,C_AXIS_TDATA_WIDTH=8,C_AXIS_TID_WIDTH=1,C_AXIS_TDEST_WIDTH=1,C_AXIS_TUSER_WIDTH=4,C_AXIS_TSTRB_WIDTH=1,C_AXIS_TKEEP_WIDTH=1,C_WACH_TYPE=0,C_WDCH_TYPE=0,C_WRCH_TYPE=0,C_RACH_TYPE=0,C_RDCH_TYPE=0,C_AXIS_TYPE=0,C_IMPLEMENTATION_TYPE_WACH=1,C_IMPLEMENTATION_TYPE_WDCH=1,C_IMPLEMENTATION_TYPE_WRCH=1,C_IMPLEMENTATION_TYPE_RACH=1,C_IMPLEMENTATION_TYP" &
525
+ "E_RDCH=1,C_IMPLEMENTATION_TYPE_AXIS=1,C_APPLICATION_TYPE_WACH=0,C_APPLICATION_TYPE_WDCH=0,C_APPLICATION_TYPE_WRCH=0,C_APPLICATION_TYPE_RACH=0,C_APPLICATION_TYPE_RDCH=0,C_APPLICATION_TYPE_AXIS=0,C_PRIM_FIFO_TYPE_WACH=512x36,C_PRIM_FIFO_TYPE_WDCH=1kx36,C_PRIM_FIFO_TYPE_WRCH=512x36,C_PRIM_FIFO_TYPE_RACH=512x36,C_PRIM_FIFO_TYPE_RDCH=1kx36,C_PRIM_FIFO_TYPE_AXIS=1kx18,C_USE_ECC_WACH=0,C_USE_ECC_WDCH=0,C_USE_ECC_WRCH=0,C_USE_ECC_RACH=0,C_USE_ECC_RDCH=0,C_USE_ECC_AXIS=0,C_ERROR_INJECTION_TYPE_WACH=0,C_E" &
526
+ "RROR_INJECTION_TYPE_WDCH=0,C_ERROR_INJECTION_TYPE_WRCH=0,C_ERROR_INJECTION_TYPE_RACH=0,C_ERROR_INJECTION_TYPE_RDCH=0,C_ERROR_INJECTION_TYPE_AXIS=0,C_DIN_WIDTH_WACH=1,C_DIN_WIDTH_WDCH=64,C_DIN_WIDTH_WRCH=2,C_DIN_WIDTH_RACH=32,C_DIN_WIDTH_RDCH=64,C_DIN_WIDTH_AXIS=1,C_WR_DEPTH_WACH=16,C_WR_DEPTH_WDCH=1024,C_WR_DEPTH_WRCH=16,C_WR_DEPTH_RACH=16,C_WR_DEPTH_RDCH=1024,C_WR_DEPTH_AXIS=1024,C_WR_PNTR_WIDTH_WACH=4,C_WR_PNTR_WIDTH_WDCH=10,C_WR_PNTR_WIDTH_WRCH=4,C_WR_PNTR_WIDTH_RACH=4,C_WR_PNTR_WIDTH_RDCH=10" &
527
+ ",C_WR_PNTR_WIDTH_AXIS=10,C_HAS_DATA_COUNTS_WACH=0,C_HAS_DATA_COUNTS_WDCH=0,C_HAS_DATA_COUNTS_WRCH=0,C_HAS_DATA_COUNTS_RACH=0,C_HAS_DATA_COUNTS_RDCH=0,C_HAS_DATA_COUNTS_AXIS=0,C_HAS_PROG_FLAGS_WACH=0,C_HAS_PROG_FLAGS_WDCH=0,C_HAS_PROG_FLAGS_WRCH=0,C_HAS_PROG_FLAGS_RACH=0,C_HAS_PROG_FLAGS_RDCH=0,C_HAS_PROG_FLAGS_AXIS=0,C_PROG_FULL_TYPE_WACH=0,C_PROG_FULL_TYPE_WDCH=0,C_PROG_FULL_TYPE_WRCH=0,C_PROG_FULL_TYPE_RACH=0,C_PROG_FULL_TYPE_RDCH=0,C_PROG_FULL_TYPE_AXIS=0,C_PROG_FULL_THRESH_ASSERT_VAL_WACH=10" &
528
+ "23,C_PROG_FULL_THRESH_ASSERT_VAL_WDCH=1023,C_PROG_FULL_THRESH_ASSERT_VAL_WRCH=1023,C_PROG_FULL_THRESH_ASSERT_VAL_RACH=1023,C_PROG_FULL_THRESH_ASSERT_VAL_RDCH=1023,C_PROG_FULL_THRESH_ASSERT_VAL_AXIS=1023,C_PROG_EMPTY_TYPE_WACH=0,C_PROG_EMPTY_TYPE_WDCH=0,C_PROG_EMPTY_TYPE_WRCH=0,C_PROG_EMPTY_TYPE_RACH=0,C_PROG_EMPTY_TYPE_RDCH=0,C_PROG_EMPTY_TYPE_AXIS=0,C_PROG_EMPTY_THRESH_ASSERT_VAL_WACH=1022,C_PROG_EMPTY_THRESH_ASSERT_VAL_WDCH=1022,C_PROG_EMPTY_THRESH_ASSERT_VAL_WRCH=1022,C_PROG_EMPTY_THRESH_ASSE" &
529
+ "RT_VAL_RACH=1022,C_PROG_EMPTY_THRESH_ASSERT_VAL_RDCH=1022,C_PROG_EMPTY_THRESH_ASSERT_VAL_AXIS=1022,C_REG_SLICE_MODE_WACH=0,C_REG_SLICE_MODE_WDCH=0,C_REG_SLICE_MODE_WRCH=0,C_REG_SLICE_MODE_RACH=0,C_REG_SLICE_MODE_RDCH=0,C_REG_SLICE_MODE_AXIS=0}";
530
+ ATTRIBUTE X_INTERFACE_INFO : STRING;
531
+ ATTRIBUTE X_INTERFACE_PARAMETER : STRING;
532
+ ATTRIBUTE X_INTERFACE_INFO OF empty: SIGNAL IS "xilinx.com:interface:fifo_read:1.0 FIFO_READ EMPTY";
533
+ ATTRIBUTE X_INTERFACE_INFO OF full: SIGNAL IS "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE FULL";
534
+ ATTRIBUTE X_INTERFACE_INFO OF dout: SIGNAL IS "xilinx.com:interface:fifo_read:1.0 FIFO_READ RD_DATA";
535
+ ATTRIBUTE X_INTERFACE_INFO OF rd_en: SIGNAL IS "xilinx.com:interface:fifo_read:1.0 FIFO_READ RD_EN";
536
+ ATTRIBUTE X_INTERFACE_INFO OF wr_en: SIGNAL IS "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE WR_EN";
537
+ ATTRIBUTE X_INTERFACE_INFO OF din: SIGNAL IS "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE WR_DATA";
538
+ ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME core_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, INSERT_VIP 0";
539
+ ATTRIBUTE X_INTERFACE_INFO OF clk: SIGNAL IS "xilinx.com:signal:clock:1.0 core_clk CLK";
540
+ BEGIN
541
+ U0 : fifo_generator_v13_2_5
542
+ GENERIC MAP (
543
+ C_COMMON_CLOCK => 1,
544
+ C_SELECT_XPM => 0,
545
+ C_COUNT_TYPE => 0,
546
+ C_DATA_COUNT_WIDTH => 12,
547
+ C_DEFAULT_VALUE => "BlankString",
548
+ C_DIN_WIDTH => 32,
549
+ C_DOUT_RST_VAL => "0",
550
+ C_DOUT_WIDTH => 32,
551
+ C_ENABLE_RLOCS => 0,
552
+ C_FAMILY => "artix7",
553
+ C_FULL_FLAGS_RST_VAL => 0,
554
+ C_HAS_ALMOST_EMPTY => 0,
555
+ C_HAS_ALMOST_FULL => 0,
556
+ C_HAS_BACKUP => 0,
557
+ C_HAS_DATA_COUNT => 1,
558
+ C_HAS_INT_CLK => 0,
559
+ C_HAS_MEMINIT_FILE => 0,
560
+ C_HAS_OVERFLOW => 0,
561
+ C_HAS_RD_DATA_COUNT => 0,
562
+ C_HAS_RD_RST => 0,
563
+ C_HAS_RST => 0,
564
+ C_HAS_SRST => 1,
565
+ C_HAS_UNDERFLOW => 0,
566
+ C_HAS_VALID => 0,
567
+ C_HAS_WR_ACK => 0,
568
+ C_HAS_WR_DATA_COUNT => 0,
569
+ C_HAS_WR_RST => 0,
570
+ C_IMPLEMENTATION_TYPE => 0,
571
+ C_INIT_WR_PNTR_VAL => 0,
572
+ C_MEMORY_TYPE => 1,
573
+ C_MIF_FILE_NAME => "BlankString",
574
+ C_OPTIMIZATION_MODE => 0,
575
+ C_OVERFLOW_LOW => 0,
576
+ C_PRELOAD_LATENCY => 0,
577
+ C_PRELOAD_REGS => 1,
578
+ C_PRIM_FIFO_TYPE => "2kx18",
579
+ C_PROG_EMPTY_THRESH_ASSERT_VAL => 4,
580
+ C_PROG_EMPTY_THRESH_NEGATE_VAL => 5,
581
+ C_PROG_EMPTY_TYPE => 0,
582
+ C_PROG_FULL_THRESH_ASSERT_VAL => 2047,
583
+ C_PROG_FULL_THRESH_NEGATE_VAL => 2046,
584
+ C_PROG_FULL_TYPE => 0,
585
+ C_RD_DATA_COUNT_WIDTH => 12,
586
+ C_RD_DEPTH => 2048,
587
+ C_RD_FREQ => 1,
588
+ C_RD_PNTR_WIDTH => 11,
589
+ C_UNDERFLOW_LOW => 0,
590
+ C_USE_DOUT_RST => 1,
591
+ C_USE_ECC => 0,
592
+ C_USE_EMBEDDED_REG => 0,
593
+ C_USE_PIPELINE_REG => 0,
594
+ C_POWER_SAVING_MODE => 0,
595
+ C_USE_FIFO16_FLAGS => 0,
596
+ C_USE_FWFT_DATA_COUNT => 1,
597
+ C_VALID_LOW => 0,
598
+ C_WR_ACK_LOW => 0,
599
+ C_WR_DATA_COUNT_WIDTH => 12,
600
+ C_WR_DEPTH => 2048,
601
+ C_WR_FREQ => 1,
602
+ C_WR_PNTR_WIDTH => 11,
603
+ C_WR_RESPONSE_LATENCY => 1,
604
+ C_MSGON_VAL => 1,
605
+ C_ENABLE_RST_SYNC => 1,
606
+ C_EN_SAFETY_CKT => 0,
607
+ C_ERROR_INJECTION_TYPE => 0,
608
+ C_SYNCHRONIZER_STAGE => 2,
609
+ C_INTERFACE_TYPE => 0,
610
+ C_AXI_TYPE => 1,
611
+ C_HAS_AXI_WR_CHANNEL => 1,
612
+ C_HAS_AXI_RD_CHANNEL => 1,
613
+ C_HAS_SLAVE_CE => 0,
614
+ C_HAS_MASTER_CE => 0,
615
+ C_ADD_NGC_CONSTRAINT => 0,
616
+ C_USE_COMMON_OVERFLOW => 0,
617
+ C_USE_COMMON_UNDERFLOW => 0,
618
+ C_USE_DEFAULT_SETTINGS => 0,
619
+ C_AXI_ID_WIDTH => 1,
620
+ C_AXI_ADDR_WIDTH => 32,
621
+ C_AXI_DATA_WIDTH => 64,
622
+ C_AXI_LEN_WIDTH => 8,
623
+ C_AXI_LOCK_WIDTH => 1,
624
+ C_HAS_AXI_ID => 0,
625
+ C_HAS_AXI_AWUSER => 0,
626
+ C_HAS_AXI_WUSER => 0,
627
+ C_HAS_AXI_BUSER => 0,
628
+ C_HAS_AXI_ARUSER => 0,
629
+ C_HAS_AXI_RUSER => 0,
630
+ C_AXI_ARUSER_WIDTH => 1,
631
+ C_AXI_AWUSER_WIDTH => 1,
632
+ C_AXI_WUSER_WIDTH => 1,
633
+ C_AXI_BUSER_WIDTH => 1,
634
+ C_AXI_RUSER_WIDTH => 1,
635
+ C_HAS_AXIS_TDATA => 1,
636
+ C_HAS_AXIS_TID => 0,
637
+ C_HAS_AXIS_TDEST => 0,
638
+ C_HAS_AXIS_TUSER => 1,
639
+ C_HAS_AXIS_TREADY => 1,
640
+ C_HAS_AXIS_TLAST => 0,
641
+ C_HAS_AXIS_TSTRB => 0,
642
+ C_HAS_AXIS_TKEEP => 0,
643
+ C_AXIS_TDATA_WIDTH => 8,
644
+ C_AXIS_TID_WIDTH => 1,
645
+ C_AXIS_TDEST_WIDTH => 1,
646
+ C_AXIS_TUSER_WIDTH => 4,
647
+ C_AXIS_TSTRB_WIDTH => 1,
648
+ C_AXIS_TKEEP_WIDTH => 1,
649
+ C_WACH_TYPE => 0,
650
+ C_WDCH_TYPE => 0,
651
+ C_WRCH_TYPE => 0,
652
+ C_RACH_TYPE => 0,
653
+ C_RDCH_TYPE => 0,
654
+ C_AXIS_TYPE => 0,
655
+ C_IMPLEMENTATION_TYPE_WACH => 1,
656
+ C_IMPLEMENTATION_TYPE_WDCH => 1,
657
+ C_IMPLEMENTATION_TYPE_WRCH => 1,
658
+ C_IMPLEMENTATION_TYPE_RACH => 1,
659
+ C_IMPLEMENTATION_TYPE_RDCH => 1,
660
+ C_IMPLEMENTATION_TYPE_AXIS => 1,
661
+ C_APPLICATION_TYPE_WACH => 0,
662
+ C_APPLICATION_TYPE_WDCH => 0,
663
+ C_APPLICATION_TYPE_WRCH => 0,
664
+ C_APPLICATION_TYPE_RACH => 0,
665
+ C_APPLICATION_TYPE_RDCH => 0,
666
+ C_APPLICATION_TYPE_AXIS => 0,
667
+ C_PRIM_FIFO_TYPE_WACH => "512x36",
668
+ C_PRIM_FIFO_TYPE_WDCH => "1kx36",
669
+ C_PRIM_FIFO_TYPE_WRCH => "512x36",
670
+ C_PRIM_FIFO_TYPE_RACH => "512x36",
671
+ C_PRIM_FIFO_TYPE_RDCH => "1kx36",
672
+ C_PRIM_FIFO_TYPE_AXIS => "1kx18",
673
+ C_USE_ECC_WACH => 0,
674
+ C_USE_ECC_WDCH => 0,
675
+ C_USE_ECC_WRCH => 0,
676
+ C_USE_ECC_RACH => 0,
677
+ C_USE_ECC_RDCH => 0,
678
+ C_USE_ECC_AXIS => 0,
679
+ C_ERROR_INJECTION_TYPE_WACH => 0,
680
+ C_ERROR_INJECTION_TYPE_WDCH => 0,
681
+ C_ERROR_INJECTION_TYPE_WRCH => 0,
682
+ C_ERROR_INJECTION_TYPE_RACH => 0,
683
+ C_ERROR_INJECTION_TYPE_RDCH => 0,
684
+ C_ERROR_INJECTION_TYPE_AXIS => 0,
685
+ C_DIN_WIDTH_WACH => 1,
686
+ C_DIN_WIDTH_WDCH => 64,
687
+ C_DIN_WIDTH_WRCH => 2,
688
+ C_DIN_WIDTH_RACH => 32,
689
+ C_DIN_WIDTH_RDCH => 64,
690
+ C_DIN_WIDTH_AXIS => 1,
691
+ C_WR_DEPTH_WACH => 16,
692
+ C_WR_DEPTH_WDCH => 1024,
693
+ C_WR_DEPTH_WRCH => 16,
694
+ C_WR_DEPTH_RACH => 16,
695
+ C_WR_DEPTH_RDCH => 1024,
696
+ C_WR_DEPTH_AXIS => 1024,
697
+ C_WR_PNTR_WIDTH_WACH => 4,
698
+ C_WR_PNTR_WIDTH_WDCH => 10,
699
+ C_WR_PNTR_WIDTH_WRCH => 4,
700
+ C_WR_PNTR_WIDTH_RACH => 4,
701
+ C_WR_PNTR_WIDTH_RDCH => 10,
702
+ C_WR_PNTR_WIDTH_AXIS => 10,
703
+ C_HAS_DATA_COUNTS_WACH => 0,
704
+ C_HAS_DATA_COUNTS_WDCH => 0,
705
+ C_HAS_DATA_COUNTS_WRCH => 0,
706
+ C_HAS_DATA_COUNTS_RACH => 0,
707
+ C_HAS_DATA_COUNTS_RDCH => 0,
708
+ C_HAS_DATA_COUNTS_AXIS => 0,
709
+ C_HAS_PROG_FLAGS_WACH => 0,
710
+ C_HAS_PROG_FLAGS_WDCH => 0,
711
+ C_HAS_PROG_FLAGS_WRCH => 0,
712
+ C_HAS_PROG_FLAGS_RACH => 0,
713
+ C_HAS_PROG_FLAGS_RDCH => 0,
714
+ C_HAS_PROG_FLAGS_AXIS => 0,
715
+ C_PROG_FULL_TYPE_WACH => 0,
716
+ C_PROG_FULL_TYPE_WDCH => 0,
717
+ C_PROG_FULL_TYPE_WRCH => 0,
718
+ C_PROG_FULL_TYPE_RACH => 0,
719
+ C_PROG_FULL_TYPE_RDCH => 0,
720
+ C_PROG_FULL_TYPE_AXIS => 0,
721
+ C_PROG_FULL_THRESH_ASSERT_VAL_WACH => 1023,
722
+ C_PROG_FULL_THRESH_ASSERT_VAL_WDCH => 1023,
723
+ C_PROG_FULL_THRESH_ASSERT_VAL_WRCH => 1023,
724
+ C_PROG_FULL_THRESH_ASSERT_VAL_RACH => 1023,
725
+ C_PROG_FULL_THRESH_ASSERT_VAL_RDCH => 1023,
726
+ C_PROG_FULL_THRESH_ASSERT_VAL_AXIS => 1023,
727
+ C_PROG_EMPTY_TYPE_WACH => 0,
728
+ C_PROG_EMPTY_TYPE_WDCH => 0,
729
+ C_PROG_EMPTY_TYPE_WRCH => 0,
730
+ C_PROG_EMPTY_TYPE_RACH => 0,
731
+ C_PROG_EMPTY_TYPE_RDCH => 0,
732
+ C_PROG_EMPTY_TYPE_AXIS => 0,
733
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WACH => 1022,
734
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WDCH => 1022,
735
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_WRCH => 1022,
736
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_RACH => 1022,
737
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_RDCH => 1022,
738
+ C_PROG_EMPTY_THRESH_ASSERT_VAL_AXIS => 1022,
739
+ C_REG_SLICE_MODE_WACH => 0,
740
+ C_REG_SLICE_MODE_WDCH => 0,
741
+ C_REG_SLICE_MODE_WRCH => 0,
742
+ C_REG_SLICE_MODE_RACH => 0,
743
+ C_REG_SLICE_MODE_RDCH => 0,
744
+ C_REG_SLICE_MODE_AXIS => 0
745
+ )
746
+ PORT MAP (
747
+ backup => '0',
748
+ backup_marker => '0',
749
+ clk => clk,
750
+ rst => '0',
751
+ srst => srst,
752
+ wr_clk => '0',
753
+ wr_rst => '0',
754
+ rd_clk => '0',
755
+ rd_rst => '0',
756
+ din => din,
757
+ wr_en => wr_en,
758
+ rd_en => rd_en,
759
+ prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
760
+ prog_empty_thresh_assert => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
761
+ prog_empty_thresh_negate => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
762
+ prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
763
+ prog_full_thresh_assert => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
764
+ prog_full_thresh_negate => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 11)),
765
+ int_clk => '0',
766
+ injectdbiterr => '0',
767
+ injectsbiterr => '0',
768
+ sleep => '0',
769
+ dout => dout,
770
+ full => full,
771
+ empty => empty,
772
+ data_count => data_count,
773
+ m_aclk => '0',
774
+ s_aclk => '0',
775
+ s_aresetn => '0',
776
+ m_aclk_en => '0',
777
+ s_aclk_en => '0',
778
+ s_axi_awid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
779
+ s_axi_awaddr => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 32)),
780
+ s_axi_awlen => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)),
781
+ s_axi_awsize => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)),
782
+ s_axi_awburst => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)),
783
+ s_axi_awlock => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
784
+ s_axi_awcache => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
785
+ s_axi_awprot => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)),
786
+ s_axi_awqos => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
787
+ s_axi_awregion => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
788
+ s_axi_awuser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
789
+ s_axi_awvalid => '0',
790
+ s_axi_wid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
791
+ s_axi_wdata => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 64)),
792
+ s_axi_wstrb => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)),
793
+ s_axi_wlast => '0',
794
+ s_axi_wuser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
795
+ s_axi_wvalid => '0',
796
+ s_axi_bready => '0',
797
+ m_axi_awready => '0',
798
+ m_axi_wready => '0',
799
+ m_axi_bid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
800
+ m_axi_bresp => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)),
801
+ m_axi_buser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
802
+ m_axi_bvalid => '0',
803
+ s_axi_arid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
804
+ s_axi_araddr => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 32)),
805
+ s_axi_arlen => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)),
806
+ s_axi_arsize => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)),
807
+ s_axi_arburst => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)),
808
+ s_axi_arlock => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
809
+ s_axi_arcache => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
810
+ s_axi_arprot => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 3)),
811
+ s_axi_arqos => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
812
+ s_axi_arregion => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
813
+ s_axi_aruser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
814
+ s_axi_arvalid => '0',
815
+ s_axi_rready => '0',
816
+ m_axi_arready => '0',
817
+ m_axi_rid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
818
+ m_axi_rdata => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 64)),
819
+ m_axi_rresp => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 2)),
820
+ m_axi_rlast => '0',
821
+ m_axi_ruser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
822
+ m_axi_rvalid => '0',
823
+ s_axis_tvalid => '0',
824
+ s_axis_tdata => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 8)),
825
+ s_axis_tstrb => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
826
+ s_axis_tkeep => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
827
+ s_axis_tlast => '0',
828
+ s_axis_tid => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
829
+ s_axis_tdest => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 1)),
830
+ s_axis_tuser => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
831
+ m_axis_tready => '0',
832
+ axi_aw_injectsbiterr => '0',
833
+ axi_aw_injectdbiterr => '0',
834
+ axi_aw_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
835
+ axi_aw_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
836
+ axi_w_injectsbiterr => '0',
837
+ axi_w_injectdbiterr => '0',
838
+ axi_w_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10)),
839
+ axi_w_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10)),
840
+ axi_b_injectsbiterr => '0',
841
+ axi_b_injectdbiterr => '0',
842
+ axi_b_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
843
+ axi_b_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
844
+ axi_ar_injectsbiterr => '0',
845
+ axi_ar_injectdbiterr => '0',
846
+ axi_ar_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
847
+ axi_ar_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 4)),
848
+ axi_r_injectsbiterr => '0',
849
+ axi_r_injectdbiterr => '0',
850
+ axi_r_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10)),
851
+ axi_r_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10)),
852
+ axis_injectsbiterr => '0',
853
+ axis_injectdbiterr => '0',
854
+ axis_prog_full_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10)),
855
+ axis_prog_empty_thresh => STD_LOGIC_VECTOR(TO_UNSIGNED(0, 10))
856
+ );
857
+ END data_fifo_arch;
HDLForBeginners_Examples/30092022_testbench_start_finish/ip/xfft_0/sim/xfft_0.vhd ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- (c) Copyright 1995-2022 Xilinx, Inc. All rights reserved.
2
+ --
3
+ -- This file contains confidential and proprietary information
4
+ -- of Xilinx, Inc. and is protected under U.S. and
5
+ -- international copyright and other intellectual property
6
+ -- laws.
7
+ --
8
+ -- DISCLAIMER
9
+ -- This disclaimer is not a license and does not grant any
10
+ -- rights to the materials distributed herewith. Except as
11
+ -- otherwise provided in a valid license issued to you by
12
+ -- Xilinx, and to the maximum extent permitted by applicable
13
+ -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
14
+ -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
15
+ -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
16
+ -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
17
+ -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
18
+ -- (2) Xilinx shall not be liable (whether in contract or tort,
19
+ -- including negligence, or under any other theory of
20
+ -- liability) for any loss or damage of any kind or nature
21
+ -- related to, arising under or in connection with these
22
+ -- materials, including for any direct, or any indirect,
23
+ -- special, incidental, or consequential loss or damage
24
+ -- (including loss of data, profits, goodwill, or any type of
25
+ -- loss or damage suffered as a result of any action brought
26
+ -- by a third party) even if such damage or loss was
27
+ -- reasonably foreseeable or Xilinx had been advised of the
28
+ -- possibility of the same.
29
+ --
30
+ -- CRITICAL APPLICATIONS
31
+ -- Xilinx products are not designed or intended to be fail-
32
+ -- safe, or for use in any application requiring fail-safe
33
+ -- performance, such as life-support or safety devices or
34
+ -- systems, Class III medical devices, nuclear facilities,
35
+ -- applications related to the deployment of airbags, or any
36
+ -- other applications that could lead to death, personal
37
+ -- injury, or severe property or environmental damage
38
+ -- (individually and collectively, "Critical
39
+ -- Applications"). Customer assumes the sole risk and
40
+ -- liability of any use of Xilinx products in Critical
41
+ -- Applications, subject only to applicable laws and
42
+ -- regulations governing limitations on product liability.
43
+ --
44
+ -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
45
+ -- PART OF THIS FILE AT ALL TIMES.
46
+ --
47
+ -- DO NOT MODIFY THIS FILE.
48
+
49
+ -- IP VLNV: xilinx.com:ip:xfft:9.1
50
+ -- IP Revision: 6
51
+
52
+ LIBRARY ieee;
53
+ USE ieee.std_logic_1164.ALL;
54
+ USE ieee.numeric_std.ALL;
55
+
56
+ LIBRARY xfft_v9_1_6;
57
+ USE xfft_v9_1_6.xfft_v9_1_6;
58
+
59
+ ENTITY xfft_0 IS
60
+ PORT (
61
+ aclk : IN STD_LOGIC;
62
+ s_axis_config_tdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
63
+ s_axis_config_tvalid : IN STD_LOGIC;
64
+ s_axis_config_tready : OUT STD_LOGIC;
65
+ s_axis_data_tdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
66
+ s_axis_data_tvalid : IN STD_LOGIC;
67
+ s_axis_data_tready : OUT STD_LOGIC;
68
+ s_axis_data_tlast : IN STD_LOGIC;
69
+ m_axis_data_tdata : OUT STD_LOGIC_VECTOR(79 DOWNTO 0);
70
+ m_axis_data_tvalid : OUT STD_LOGIC;
71
+ m_axis_data_tready : IN STD_LOGIC;
72
+ m_axis_data_tlast : OUT STD_LOGIC;
73
+ event_frame_started : OUT STD_LOGIC;
74
+ event_tlast_unexpected : OUT STD_LOGIC;
75
+ event_tlast_missing : OUT STD_LOGIC;
76
+ event_status_channel_halt : OUT STD_LOGIC;
77
+ event_data_in_channel_halt : OUT STD_LOGIC;
78
+ event_data_out_channel_halt : OUT STD_LOGIC
79
+ );
80
+ END xfft_0;
81
+
82
+ ARCHITECTURE xfft_0_arch OF xfft_0 IS
83
+ ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING;
84
+ ATTRIBUTE DowngradeIPIdentifiedWarnings OF xfft_0_arch: ARCHITECTURE IS "yes";
85
+ COMPONENT xfft_v9_1_6 IS
86
+ GENERIC (
87
+ C_XDEVICEFAMILY : STRING;
88
+ C_PART : STRING;
89
+ C_S_AXIS_CONFIG_TDATA_WIDTH : INTEGER;
90
+ C_S_AXIS_DATA_TDATA_WIDTH : INTEGER;
91
+ C_M_AXIS_DATA_TDATA_WIDTH : INTEGER;
92
+ C_M_AXIS_DATA_TUSER_WIDTH : INTEGER;
93
+ C_M_AXIS_STATUS_TDATA_WIDTH : INTEGER;
94
+ C_THROTTLE_SCHEME : INTEGER;
95
+ C_CHANNELS : INTEGER;
96
+ C_NFFT_MAX : INTEGER;
97
+ C_ARCH : INTEGER;
98
+ C_HAS_NFFT : INTEGER;
99
+ C_USE_FLT_PT : INTEGER;
100
+ C_INPUT_WIDTH : INTEGER;
101
+ C_TWIDDLE_WIDTH : INTEGER;
102
+ C_OUTPUT_WIDTH : INTEGER;
103
+ C_HAS_SCALING : INTEGER;
104
+ C_HAS_BFP : INTEGER;
105
+ C_HAS_ROUNDING : INTEGER;
106
+ C_HAS_ACLKEN : INTEGER;
107
+ C_HAS_ARESETN : INTEGER;
108
+ C_HAS_OVFLO : INTEGER;
109
+ C_HAS_NATURAL_INPUT : INTEGER;
110
+ C_HAS_NATURAL_OUTPUT : INTEGER;
111
+ C_HAS_CYCLIC_PREFIX : INTEGER;
112
+ C_HAS_XK_INDEX : INTEGER;
113
+ C_DATA_MEM_TYPE : INTEGER;
114
+ C_TWIDDLE_MEM_TYPE : INTEGER;
115
+ C_BRAM_STAGES : INTEGER;
116
+ C_REORDER_MEM_TYPE : INTEGER;
117
+ C_USE_HYBRID_RAM : INTEGER;
118
+ C_OPTIMIZE_GOAL : INTEGER;
119
+ C_CMPY_TYPE : INTEGER;
120
+ C_BFLY_TYPE : INTEGER
121
+ );
122
+ PORT (
123
+ aclk : IN STD_LOGIC;
124
+ aclken : IN STD_LOGIC;
125
+ aresetn : IN STD_LOGIC;
126
+ s_axis_config_tdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
127
+ s_axis_config_tvalid : IN STD_LOGIC;
128
+ s_axis_config_tready : OUT STD_LOGIC;
129
+ s_axis_data_tdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
130
+ s_axis_data_tvalid : IN STD_LOGIC;
131
+ s_axis_data_tready : OUT STD_LOGIC;
132
+ s_axis_data_tlast : IN STD_LOGIC;
133
+ m_axis_data_tdata : OUT STD_LOGIC_VECTOR(79 DOWNTO 0);
134
+ m_axis_data_tuser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
135
+ m_axis_data_tvalid : OUT STD_LOGIC;
136
+ m_axis_data_tready : IN STD_LOGIC;
137
+ m_axis_data_tlast : OUT STD_LOGIC;
138
+ m_axis_status_tdata : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
139
+ m_axis_status_tvalid : OUT STD_LOGIC;
140
+ m_axis_status_tready : IN STD_LOGIC;
141
+ event_frame_started : OUT STD_LOGIC;
142
+ event_tlast_unexpected : OUT STD_LOGIC;
143
+ event_tlast_missing : OUT STD_LOGIC;
144
+ event_fft_overflow : OUT STD_LOGIC;
145
+ event_status_channel_halt : OUT STD_LOGIC;
146
+ event_data_in_channel_halt : OUT STD_LOGIC;
147
+ event_data_out_channel_halt : OUT STD_LOGIC
148
+ );
149
+ END COMPONENT xfft_v9_1_6;
150
+ ATTRIBUTE X_INTERFACE_INFO : STRING;
151
+ ATTRIBUTE X_INTERFACE_PARAMETER : STRING;
152
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_data_out_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_data_out_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
153
+ ATTRIBUTE X_INTERFACE_INFO OF event_data_out_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_data_out_channel_halt_intf INTERRUPT";
154
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_data_in_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_data_in_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
155
+ ATTRIBUTE X_INTERFACE_INFO OF event_data_in_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_data_in_channel_halt_intf INTERRUPT";
156
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_status_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_status_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
157
+ ATTRIBUTE X_INTERFACE_INFO OF event_status_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_status_channel_halt_intf INTERRUPT";
158
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_tlast_missing: SIGNAL IS "XIL_INTERFACENAME event_tlast_missing_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
159
+ ATTRIBUTE X_INTERFACE_INFO OF event_tlast_missing: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_tlast_missing_intf INTERRUPT";
160
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_tlast_unexpected: SIGNAL IS "XIL_INTERFACENAME event_tlast_unexpected_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
161
+ ATTRIBUTE X_INTERFACE_INFO OF event_tlast_unexpected: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_tlast_unexpected_intf INTERRUPT";
162
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_frame_started: SIGNAL IS "XIL_INTERFACENAME event_frame_started_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
163
+ ATTRIBUTE X_INTERFACE_INFO OF event_frame_started: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_frame_started_intf INTERRUPT";
164
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tlast: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TLAST";
165
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TREADY";
166
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TVALID";
167
+ ATTRIBUTE X_INTERFACE_PARAMETER OF m_axis_data_tdata: SIGNAL IS "XIL_INTERFACENAME M_AXIS_DATA, TDATA_NUM_BYTES 10, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 1, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
168
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TDATA";
169
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tlast: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TLAST";
170
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TREADY";
171
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TVALID";
172
+ ATTRIBUTE X_INTERFACE_PARAMETER OF s_axis_data_tdata: SIGNAL IS "XIL_INTERFACENAME S_AXIS_DATA, TDATA_NUM_BYTES 8, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 1, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
173
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TDATA";
174
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TREADY";
175
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TVALID";
176
+ ATTRIBUTE X_INTERFACE_PARAMETER OF s_axis_config_tdata: SIGNAL IS "XIL_INTERFACENAME S_AXIS_CONFIG, TDATA_NUM_BYTES 1, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 0, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
177
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TDATA";
178
+ ATTRIBUTE X_INTERFACE_PARAMETER OF aclk: SIGNAL IS "XIL_INTERFACENAME aclk_intf, ASSOCIATED_BUSIF S_AXIS_CONFIG:M_AXIS_DATA:M_AXIS_STATUS:S_AXIS_DATA, ASSOCIATED_RESET aresetn, ASSOCIATED_CLKEN aclken, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, INSERT_VIP 0";
179
+ ATTRIBUTE X_INTERFACE_INFO OF aclk: SIGNAL IS "xilinx.com:signal:clock:1.0 aclk_intf CLK";
180
+ BEGIN
181
+ U0 : xfft_v9_1_6
182
+ GENERIC MAP (
183
+ C_XDEVICEFAMILY => "artix7",
184
+ C_PART => "xc7a100tcsg324-1",
185
+ C_S_AXIS_CONFIG_TDATA_WIDTH => 8,
186
+ C_S_AXIS_DATA_TDATA_WIDTH => 64,
187
+ C_M_AXIS_DATA_TDATA_WIDTH => 80,
188
+ C_M_AXIS_DATA_TUSER_WIDTH => 1,
189
+ C_M_AXIS_STATUS_TDATA_WIDTH => 1,
190
+ C_THROTTLE_SCHEME => 1,
191
+ C_CHANNELS => 1,
192
+ C_NFFT_MAX => 8,
193
+ C_ARCH => 4,
194
+ C_HAS_NFFT => 0,
195
+ C_USE_FLT_PT => 0,
196
+ C_INPUT_WIDTH => 29,
197
+ C_TWIDDLE_WIDTH => 32,
198
+ C_OUTPUT_WIDTH => 38,
199
+ C_HAS_SCALING => 0,
200
+ C_HAS_BFP => 0,
201
+ C_HAS_ROUNDING => 0,
202
+ C_HAS_ACLKEN => 0,
203
+ C_HAS_ARESETN => 0,
204
+ C_HAS_OVFLO => 0,
205
+ C_HAS_NATURAL_INPUT => 1,
206
+ C_HAS_NATURAL_OUTPUT => 1,
207
+ C_HAS_CYCLIC_PREFIX => 0,
208
+ C_HAS_XK_INDEX => 0,
209
+ C_DATA_MEM_TYPE => 1,
210
+ C_TWIDDLE_MEM_TYPE => 1,
211
+ C_BRAM_STAGES => 0,
212
+ C_REORDER_MEM_TYPE => 1,
213
+ C_USE_HYBRID_RAM => 0,
214
+ C_OPTIMIZE_GOAL => 0,
215
+ C_CMPY_TYPE => 1,
216
+ C_BFLY_TYPE => 0
217
+ )
218
+ PORT MAP (
219
+ aclk => aclk,
220
+ aclken => '1',
221
+ aresetn => '1',
222
+ s_axis_config_tdata => s_axis_config_tdata,
223
+ s_axis_config_tvalid => s_axis_config_tvalid,
224
+ s_axis_config_tready => s_axis_config_tready,
225
+ s_axis_data_tdata => s_axis_data_tdata,
226
+ s_axis_data_tvalid => s_axis_data_tvalid,
227
+ s_axis_data_tready => s_axis_data_tready,
228
+ s_axis_data_tlast => s_axis_data_tlast,
229
+ m_axis_data_tdata => m_axis_data_tdata,
230
+ m_axis_data_tvalid => m_axis_data_tvalid,
231
+ m_axis_data_tready => m_axis_data_tready,
232
+ m_axis_data_tlast => m_axis_data_tlast,
233
+ m_axis_status_tready => '1',
234
+ event_frame_started => event_frame_started,
235
+ event_tlast_unexpected => event_tlast_unexpected,
236
+ event_tlast_missing => event_tlast_missing,
237
+ event_status_channel_halt => event_status_channel_halt,
238
+ event_data_in_channel_halt => event_data_in_channel_halt,
239
+ event_data_out_channel_halt => event_data_out_channel_halt
240
+ );
241
+ END xfft_0_arch;
HDLForBeginners_Examples/30092022_testbench_start_finish/ip/xfft_0/synth/xfft_0.vhd ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- (c) Copyright 1995-2022 Xilinx, Inc. All rights reserved.
2
+ --
3
+ -- This file contains confidential and proprietary information
4
+ -- of Xilinx, Inc. and is protected under U.S. and
5
+ -- international copyright and other intellectual property
6
+ -- laws.
7
+ --
8
+ -- DISCLAIMER
9
+ -- This disclaimer is not a license and does not grant any
10
+ -- rights to the materials distributed herewith. Except as
11
+ -- otherwise provided in a valid license issued to you by
12
+ -- Xilinx, and to the maximum extent permitted by applicable
13
+ -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
14
+ -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
15
+ -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
16
+ -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
17
+ -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
18
+ -- (2) Xilinx shall not be liable (whether in contract or tort,
19
+ -- including negligence, or under any other theory of
20
+ -- liability) for any loss or damage of any kind or nature
21
+ -- related to, arising under or in connection with these
22
+ -- materials, including for any direct, or any indirect,
23
+ -- special, incidental, or consequential loss or damage
24
+ -- (including loss of data, profits, goodwill, or any type of
25
+ -- loss or damage suffered as a result of any action brought
26
+ -- by a third party) even if such damage or loss was
27
+ -- reasonably foreseeable or Xilinx had been advised of the
28
+ -- possibility of the same.
29
+ --
30
+ -- CRITICAL APPLICATIONS
31
+ -- Xilinx products are not designed or intended to be fail-
32
+ -- safe, or for use in any application requiring fail-safe
33
+ -- performance, such as life-support or safety devices or
34
+ -- systems, Class III medical devices, nuclear facilities,
35
+ -- applications related to the deployment of airbags, or any
36
+ -- other applications that could lead to death, personal
37
+ -- injury, or severe property or environmental damage
38
+ -- (individually and collectively, "Critical
39
+ -- Applications"). Customer assumes the sole risk and
40
+ -- liability of any use of Xilinx products in Critical
41
+ -- Applications, subject only to applicable laws and
42
+ -- regulations governing limitations on product liability.
43
+ --
44
+ -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
45
+ -- PART OF THIS FILE AT ALL TIMES.
46
+ --
47
+ -- DO NOT MODIFY THIS FILE.
48
+
49
+ -- IP VLNV: xilinx.com:ip:xfft:9.1
50
+ -- IP Revision: 6
51
+
52
+ LIBRARY ieee;
53
+ USE ieee.std_logic_1164.ALL;
54
+ USE ieee.numeric_std.ALL;
55
+
56
+ LIBRARY xfft_v9_1_6;
57
+ USE xfft_v9_1_6.xfft_v9_1_6;
58
+
59
+ ENTITY xfft_0 IS
60
+ PORT (
61
+ aclk : IN STD_LOGIC;
62
+ s_axis_config_tdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
63
+ s_axis_config_tvalid : IN STD_LOGIC;
64
+ s_axis_config_tready : OUT STD_LOGIC;
65
+ s_axis_data_tdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
66
+ s_axis_data_tvalid : IN STD_LOGIC;
67
+ s_axis_data_tready : OUT STD_LOGIC;
68
+ s_axis_data_tlast : IN STD_LOGIC;
69
+ m_axis_data_tdata : OUT STD_LOGIC_VECTOR(79 DOWNTO 0);
70
+ m_axis_data_tvalid : OUT STD_LOGIC;
71
+ m_axis_data_tready : IN STD_LOGIC;
72
+ m_axis_data_tlast : OUT STD_LOGIC;
73
+ event_frame_started : OUT STD_LOGIC;
74
+ event_tlast_unexpected : OUT STD_LOGIC;
75
+ event_tlast_missing : OUT STD_LOGIC;
76
+ event_status_channel_halt : OUT STD_LOGIC;
77
+ event_data_in_channel_halt : OUT STD_LOGIC;
78
+ event_data_out_channel_halt : OUT STD_LOGIC
79
+ );
80
+ END xfft_0;
81
+
82
+ ARCHITECTURE xfft_0_arch OF xfft_0 IS
83
+ ATTRIBUTE DowngradeIPIdentifiedWarnings : STRING;
84
+ ATTRIBUTE DowngradeIPIdentifiedWarnings OF xfft_0_arch: ARCHITECTURE IS "yes";
85
+ COMPONENT xfft_v9_1_6 IS
86
+ GENERIC (
87
+ C_XDEVICEFAMILY : STRING;
88
+ C_PART : STRING;
89
+ C_S_AXIS_CONFIG_TDATA_WIDTH : INTEGER;
90
+ C_S_AXIS_DATA_TDATA_WIDTH : INTEGER;
91
+ C_M_AXIS_DATA_TDATA_WIDTH : INTEGER;
92
+ C_M_AXIS_DATA_TUSER_WIDTH : INTEGER;
93
+ C_M_AXIS_STATUS_TDATA_WIDTH : INTEGER;
94
+ C_THROTTLE_SCHEME : INTEGER;
95
+ C_CHANNELS : INTEGER;
96
+ C_NFFT_MAX : INTEGER;
97
+ C_ARCH : INTEGER;
98
+ C_HAS_NFFT : INTEGER;
99
+ C_USE_FLT_PT : INTEGER;
100
+ C_INPUT_WIDTH : INTEGER;
101
+ C_TWIDDLE_WIDTH : INTEGER;
102
+ C_OUTPUT_WIDTH : INTEGER;
103
+ C_HAS_SCALING : INTEGER;
104
+ C_HAS_BFP : INTEGER;
105
+ C_HAS_ROUNDING : INTEGER;
106
+ C_HAS_ACLKEN : INTEGER;
107
+ C_HAS_ARESETN : INTEGER;
108
+ C_HAS_OVFLO : INTEGER;
109
+ C_HAS_NATURAL_INPUT : INTEGER;
110
+ C_HAS_NATURAL_OUTPUT : INTEGER;
111
+ C_HAS_CYCLIC_PREFIX : INTEGER;
112
+ C_HAS_XK_INDEX : INTEGER;
113
+ C_DATA_MEM_TYPE : INTEGER;
114
+ C_TWIDDLE_MEM_TYPE : INTEGER;
115
+ C_BRAM_STAGES : INTEGER;
116
+ C_REORDER_MEM_TYPE : INTEGER;
117
+ C_USE_HYBRID_RAM : INTEGER;
118
+ C_OPTIMIZE_GOAL : INTEGER;
119
+ C_CMPY_TYPE : INTEGER;
120
+ C_BFLY_TYPE : INTEGER
121
+ );
122
+ PORT (
123
+ aclk : IN STD_LOGIC;
124
+ aclken : IN STD_LOGIC;
125
+ aresetn : IN STD_LOGIC;
126
+ s_axis_config_tdata : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
127
+ s_axis_config_tvalid : IN STD_LOGIC;
128
+ s_axis_config_tready : OUT STD_LOGIC;
129
+ s_axis_data_tdata : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
130
+ s_axis_data_tvalid : IN STD_LOGIC;
131
+ s_axis_data_tready : OUT STD_LOGIC;
132
+ s_axis_data_tlast : IN STD_LOGIC;
133
+ m_axis_data_tdata : OUT STD_LOGIC_VECTOR(79 DOWNTO 0);
134
+ m_axis_data_tuser : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
135
+ m_axis_data_tvalid : OUT STD_LOGIC;
136
+ m_axis_data_tready : IN STD_LOGIC;
137
+ m_axis_data_tlast : OUT STD_LOGIC;
138
+ m_axis_status_tdata : OUT STD_LOGIC_VECTOR(0 DOWNTO 0);
139
+ m_axis_status_tvalid : OUT STD_LOGIC;
140
+ m_axis_status_tready : IN STD_LOGIC;
141
+ event_frame_started : OUT STD_LOGIC;
142
+ event_tlast_unexpected : OUT STD_LOGIC;
143
+ event_tlast_missing : OUT STD_LOGIC;
144
+ event_fft_overflow : OUT STD_LOGIC;
145
+ event_status_channel_halt : OUT STD_LOGIC;
146
+ event_data_in_channel_halt : OUT STD_LOGIC;
147
+ event_data_out_channel_halt : OUT STD_LOGIC
148
+ );
149
+ END COMPONENT xfft_v9_1_6;
150
+ ATTRIBUTE X_CORE_INFO : STRING;
151
+ ATTRIBUTE X_CORE_INFO OF xfft_0_arch: ARCHITECTURE IS "xfft_v9_1_6,Vivado 2021.1";
152
+ ATTRIBUTE CHECK_LICENSE_TYPE : STRING;
153
+ ATTRIBUTE CHECK_LICENSE_TYPE OF xfft_0_arch : ARCHITECTURE IS "xfft_0,xfft_v9_1_6,{}";
154
+ ATTRIBUTE CORE_GENERATION_INFO : STRING;
155
+ ATTRIBUTE CORE_GENERATION_INFO OF xfft_0_arch: ARCHITECTURE IS "xfft_0,xfft_v9_1_6,{x_ipProduct=Vivado 2021.1,x_ipVendor=xilinx.com,x_ipLibrary=ip,x_ipName=xfft,x_ipVersion=9.1,x_ipCoreRevision=6,x_ipLanguage=VERILOG,x_ipSimLanguage=MIXED,C_XDEVICEFAMILY=artix7,C_PART=xc7a100tcsg324-1,C_S_AXIS_CONFIG_TDATA_WIDTH=8,C_S_AXIS_DATA_TDATA_WIDTH=64,C_M_AXIS_DATA_TDATA_WIDTH=80,C_M_AXIS_DATA_TUSER_WIDTH=1,C_M_AXIS_STATUS_TDATA_WIDTH=1,C_THROTTLE_SCHEME=1,C_CHANNELS=1,C_NFFT_MAX=8,C_ARCH=4,C_HAS_NFFT=0,C_USE_FLT_PT=0,C_INPUT_WIDTH=29,C_TWIDDLE_WIDTH=32,C_OUTPUT_WIDT" &
156
+ "H=38,C_HAS_SCALING=0,C_HAS_BFP=0,C_HAS_ROUNDING=0,C_HAS_ACLKEN=0,C_HAS_ARESETN=0,C_HAS_OVFLO=0,C_HAS_NATURAL_INPUT=1,C_HAS_NATURAL_OUTPUT=1,C_HAS_CYCLIC_PREFIX=0,C_HAS_XK_INDEX=0,C_DATA_MEM_TYPE=1,C_TWIDDLE_MEM_TYPE=1,C_BRAM_STAGES=0,C_REORDER_MEM_TYPE=1,C_USE_HYBRID_RAM=0,C_OPTIMIZE_GOAL=0,C_CMPY_TYPE=1,C_BFLY_TYPE=0}";
157
+ ATTRIBUTE X_INTERFACE_INFO : STRING;
158
+ ATTRIBUTE X_INTERFACE_PARAMETER : STRING;
159
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_data_out_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_data_out_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
160
+ ATTRIBUTE X_INTERFACE_INFO OF event_data_out_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_data_out_channel_halt_intf INTERRUPT";
161
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_data_in_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_data_in_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
162
+ ATTRIBUTE X_INTERFACE_INFO OF event_data_in_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_data_in_channel_halt_intf INTERRUPT";
163
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_status_channel_halt: SIGNAL IS "XIL_INTERFACENAME event_status_channel_halt_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
164
+ ATTRIBUTE X_INTERFACE_INFO OF event_status_channel_halt: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_status_channel_halt_intf INTERRUPT";
165
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_tlast_missing: SIGNAL IS "XIL_INTERFACENAME event_tlast_missing_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
166
+ ATTRIBUTE X_INTERFACE_INFO OF event_tlast_missing: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_tlast_missing_intf INTERRUPT";
167
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_tlast_unexpected: SIGNAL IS "XIL_INTERFACENAME event_tlast_unexpected_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
168
+ ATTRIBUTE X_INTERFACE_INFO OF event_tlast_unexpected: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_tlast_unexpected_intf INTERRUPT";
169
+ ATTRIBUTE X_INTERFACE_PARAMETER OF event_frame_started: SIGNAL IS "XIL_INTERFACENAME event_frame_started_intf, SENSITIVITY EDGE_RISING, PortWidth 1";
170
+ ATTRIBUTE X_INTERFACE_INFO OF event_frame_started: SIGNAL IS "xilinx.com:signal:interrupt:1.0 event_frame_started_intf INTERRUPT";
171
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tlast: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TLAST";
172
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TREADY";
173
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TVALID";
174
+ ATTRIBUTE X_INTERFACE_PARAMETER OF m_axis_data_tdata: SIGNAL IS "XIL_INTERFACENAME M_AXIS_DATA, TDATA_NUM_BYTES 10, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 1, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
175
+ ATTRIBUTE X_INTERFACE_INFO OF m_axis_data_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 M_AXIS_DATA TDATA";
176
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tlast: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TLAST";
177
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TREADY";
178
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TVALID";
179
+ ATTRIBUTE X_INTERFACE_PARAMETER OF s_axis_data_tdata: SIGNAL IS "XIL_INTERFACENAME S_AXIS_DATA, TDATA_NUM_BYTES 8, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 1, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
180
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_data_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_DATA TDATA";
181
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tready: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TREADY";
182
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tvalid: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TVALID";
183
+ ATTRIBUTE X_INTERFACE_PARAMETER OF s_axis_config_tdata: SIGNAL IS "XIL_INTERFACENAME S_AXIS_CONFIG, TDATA_NUM_BYTES 1, TDEST_WIDTH 0, TID_WIDTH 0, TUSER_WIDTH 0, HAS_TREADY 1, HAS_TSTRB 0, HAS_TKEEP 0, HAS_TLAST 0, FREQ_HZ 100000000, PHASE 0.0, LAYERED_METADATA undef, INSERT_VIP 0";
184
+ ATTRIBUTE X_INTERFACE_INFO OF s_axis_config_tdata: SIGNAL IS "xilinx.com:interface:axis:1.0 S_AXIS_CONFIG TDATA";
185
+ ATTRIBUTE X_INTERFACE_PARAMETER OF aclk: SIGNAL IS "XIL_INTERFACENAME aclk_intf, ASSOCIATED_BUSIF S_AXIS_CONFIG:M_AXIS_DATA:M_AXIS_STATUS:S_AXIS_DATA, ASSOCIATED_RESET aresetn, ASSOCIATED_CLKEN aclken, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, INSERT_VIP 0";
186
+ ATTRIBUTE X_INTERFACE_INFO OF aclk: SIGNAL IS "xilinx.com:signal:clock:1.0 aclk_intf CLK";
187
+ BEGIN
188
+ U0 : xfft_v9_1_6
189
+ GENERIC MAP (
190
+ C_XDEVICEFAMILY => "artix7",
191
+ C_PART => "xc7a100tcsg324-1",
192
+ C_S_AXIS_CONFIG_TDATA_WIDTH => 8,
193
+ C_S_AXIS_DATA_TDATA_WIDTH => 64,
194
+ C_M_AXIS_DATA_TDATA_WIDTH => 80,
195
+ C_M_AXIS_DATA_TUSER_WIDTH => 1,
196
+ C_M_AXIS_STATUS_TDATA_WIDTH => 1,
197
+ C_THROTTLE_SCHEME => 1,
198
+ C_CHANNELS => 1,
199
+ C_NFFT_MAX => 8,
200
+ C_ARCH => 4,
201
+ C_HAS_NFFT => 0,
202
+ C_USE_FLT_PT => 0,
203
+ C_INPUT_WIDTH => 29,
204
+ C_TWIDDLE_WIDTH => 32,
205
+ C_OUTPUT_WIDTH => 38,
206
+ C_HAS_SCALING => 0,
207
+ C_HAS_BFP => 0,
208
+ C_HAS_ROUNDING => 0,
209
+ C_HAS_ACLKEN => 0,
210
+ C_HAS_ARESETN => 0,
211
+ C_HAS_OVFLO => 0,
212
+ C_HAS_NATURAL_INPUT => 1,
213
+ C_HAS_NATURAL_OUTPUT => 1,
214
+ C_HAS_CYCLIC_PREFIX => 0,
215
+ C_HAS_XK_INDEX => 0,
216
+ C_DATA_MEM_TYPE => 1,
217
+ C_TWIDDLE_MEM_TYPE => 1,
218
+ C_BRAM_STAGES => 0,
219
+ C_REORDER_MEM_TYPE => 1,
220
+ C_USE_HYBRID_RAM => 0,
221
+ C_OPTIMIZE_GOAL => 0,
222
+ C_CMPY_TYPE => 1,
223
+ C_BFLY_TYPE => 0
224
+ )
225
+ PORT MAP (
226
+ aclk => aclk,
227
+ aclken => '1',
228
+ aresetn => '1',
229
+ s_axis_config_tdata => s_axis_config_tdata,
230
+ s_axis_config_tvalid => s_axis_config_tvalid,
231
+ s_axis_config_tready => s_axis_config_tready,
232
+ s_axis_data_tdata => s_axis_data_tdata,
233
+ s_axis_data_tvalid => s_axis_data_tvalid,
234
+ s_axis_data_tready => s_axis_data_tready,
235
+ s_axis_data_tlast => s_axis_data_tlast,
236
+ m_axis_data_tdata => m_axis_data_tdata,
237
+ m_axis_data_tvalid => m_axis_data_tvalid,
238
+ m_axis_data_tready => m_axis_data_tready,
239
+ m_axis_data_tlast => m_axis_data_tlast,
240
+ m_axis_status_tready => '1',
241
+ event_frame_started => event_frame_started,
242
+ event_tlast_unexpected => event_tlast_unexpected,
243
+ event_tlast_missing => event_tlast_missing,
244
+ event_status_channel_halt => event_status_channel_halt,
245
+ event_data_in_channel_halt => event_data_in_channel_halt,
246
+ event_data_out_channel_halt => event_data_out_channel_halt
247
+ );
248
+ END xfft_0_arch;
HDLForBeginners_Examples/30092022_testbench_start_finish/py/cic_comp_filter.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from scipy import signal
3
+ import matplotlib.pyplot as plt
4
+ sr = 3000
5
+ w, h = signal.freqz(b=[-0.5,2, -0.5], a=1)
6
+ x = w * sr * 1.0 / (2 * np.pi)
7
+ y = 20 * np.log10(abs(h))
8
+ plt.figure(figsize=(10,5))
9
+ plt.semilogx(x, y)
10
+ plt.ylabel('Amplitude [dB]')
11
+ plt.xlabel('Frequency [Hz]')
12
+ plt.title('Frequency response')
13
+ plt.grid(which='both', linestyle='-', color='grey')
14
+ plt.xticks([20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000], ["20", "50", "100", "200", "500", "1K", "2K", "5K", "10K", "20K"])
15
+ plt.show()
16
+
17
+ #from https://dsp.stackexchange.com/questions/49009/get-the-frequency-response-curve-from-fir-filter-coefficients-sampling-rate
HDLForBeginners_Examples/30092022_testbench_start_finish/py/gen_stimulus.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy
2
+ from matplotlib import pyplot as plt
3
+
4
+
5
+ fs = 3e6
6
+ f0 = 1e3
7
+ N = 2**14
8
+
9
+ w = 2*numpy.pi*f0/fs*numpy.arange(0,N)
10
+
11
+ stim = numpy.cos(w)+1
12
+
13
+ print(stim)
14
+
15
+ IMPULSE_HEIGHT = numpy.amax(stim)
16
+ THRESHOLD = IMPULSE_HEIGHT/2
17
+
18
+ output_pdm = numpy.zeros(N)
19
+ running_sum = 0
20
+
21
+ with open('pdm_stimulus.txt', 'w') as fd:
22
+ for i, sample in enumerate(stim):
23
+ running_sum = running_sum + sample
24
+ if running_sum > THRESHOLD:
25
+ running_sum = running_sum - IMPULSE_HEIGHT
26
+ output_pdm[i] = 1
27
+
28
+ fd.write(f"{int(output_pdm[i])}\n")
29
+
30
+
31
+ ax = plt.plot(output_pdm)
32
+ ax = plt.plot(stim)
33
+ plt.show()
HDLForBeginners_Examples/30092022_testbench_start_finish/py/receive_fft.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import socket
2
+ import struct
3
+ import numpy as np
4
+ from matplotlib import pyplot as plt
5
+ from matplotlib import animation
6
+
7
+ ETH_P_ALL=3 # not defined in socket module, sadly...
8
+ s=socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL))
9
+ s.bind(("eth0", 0))
10
+
11
+ fpga_src_dest = b"\x08\x00\x27\xfb\xdd\x65\xe8\x6a\x64\xe7\xe8\x30"
12
+ sample_bytes = 4
13
+ sample_rate = 2.4e6//64
14
+
15
+ fig = plt.figure()
16
+ ax = plt.axes(xlim=(0, 256), ylim=(0, ( (2**3))))
17
+ line, = ax.plot([], [], lw=2)
18
+
19
+ # initialization function: plot the background of each frame
20
+ def init():
21
+ line.set_data([], [])
22
+ return line,
23
+
24
+
25
+ # animation function. This is called sequentially
26
+ def animate(i):
27
+ data = None
28
+ for i in range(0,16):
29
+ r=s.recv(2000)
30
+ # Only receive packets from FPGA
31
+ if r[0:12]==fpga_src_dest:
32
+ x = np.arange(0,256)
33
+ y = np.frombuffer(r[14:], ">i4")
34
+ if data is None:
35
+ data = np.fft.fftshift((np.abs(np.sqrt(y))))
36
+ else:
37
+ data = data + np.fft.fftshift((np.abs((np.sqrt(y)))))
38
+ line.set_data(x, data/16)
39
+ return line,
40
+
41
+ # call the animator. blit=True means only re-draw the parts that have changed.
42
+ anim = animation.FuncAnimation(fig, animate, init_func=init,
43
+ frames=20000, interval=10)
44
+
45
+
46
+ plt.show()
HDLForBeginners_Examples/30092022_testbench_start_finish/py/testbench.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from matplotlib import pyplot as plt
2
+ import numpy
3
+
4
+ with open('output_mic_data.log', 'r') as fd:
5
+ content = fd.read()
6
+
7
+ with open('output_mic_data_avg.log', 'r') as fd:
8
+ content_avg = fd.read()
9
+
10
+ pdm_data = []
11
+ nums_avg = []
12
+
13
+ for x in content.split(','):
14
+ pdm_data.append(int(x))
15
+
16
+ for x in content_avg.split(','):
17
+ nums_avg.append(int(x))
18
+
19
+
20
+ N = 512
21
+ fs = 3e6/64
22
+
23
+ window = numpy.hanning(N)
24
+
25
+ fft_data = numpy.fft.fftshift(numpy.abs(numpy.fft.fft(pdm_data[0:N]*window)))
26
+ x_data = numpy.arange(-N/2,N/2)*fs*2/N
27
+
28
+
29
+ ax = plt.plot(x_data,fft_data)
30
+ plt.show()
HDLForBeginners_Examples/30092022_testbench_start_finish/src/crc_gen.sv ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ps / 1ps
2
+
3
+ //////////////////////////////////////////////////////////////////////////////////
4
+ // Company: HdlForBeginners
5
+ // Engineer:
6
+ //
7
+ // Create Date: 13.11.2021 13:55:40
8
+ // Design Name:
9
+ // Module Name: crc_gen
10
+ // Project Name:
11
+ // Target Devices:
12
+ // Tool Versions:
13
+ // Description:
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+ module crc_gen
24
+ (
25
+ input [1:0] data_in,
26
+ input crc_en,
27
+ output [31:0] crc_out,
28
+ input rst,
29
+ input clk);
30
+
31
+ logic [31:0] lfsr_q,lfsr_c;
32
+
33
+ // xor on the output
34
+ assign crc_out = lfsr_c ^ 32'hffffffff;
35
+
36
+ // used https://bues.ch/cms/hacking/crcgen to generate this code
37
+
38
+ // -------------------------------------------------------------------------
39
+ // THIS IS GENERATED VERILOG CODE.
40
+ // https://bues.ch/h/crcgen
41
+ //
42
+ // This code is Public Domain.
43
+ // Permission to use, copy, modify, and/or distribute this software for any
44
+ // purpose with or without fee is hereby granted.
45
+ //
46
+ // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
47
+ // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
48
+ // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
49
+ // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
50
+ // RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
51
+ // NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
52
+ // USE OR PERFORMANCE OF THIS SOFTWARE.
53
+
54
+ // CRC polynomial coefficients: x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
55
+ // 0xEDB88320 (hex)
56
+ // CRC width: 32 bits
57
+ // CRC shift direction: right (little endian)
58
+ // Input word width: 2 bits
59
+
60
+ assign lfsr_c[0] = lfsr_q[2];
61
+ assign lfsr_c[1] = lfsr_q[3];
62
+ assign lfsr_c[2] = lfsr_q[4];
63
+ assign lfsr_c[3] = lfsr_q[5];
64
+ assign lfsr_c[4] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[6]);
65
+ assign lfsr_c[5] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[7]);
66
+ assign lfsr_c[6] = lfsr_q[8];
67
+ assign lfsr_c[7] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[9]);
68
+ assign lfsr_c[8] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[10]);
69
+ assign lfsr_c[9] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[11]);
70
+ assign lfsr_c[10] = lfsr_q[12];
71
+ assign lfsr_c[11] = lfsr_q[13];
72
+ assign lfsr_c[12] = lfsr_q[14];
73
+ assign lfsr_c[13] = lfsr_q[15];
74
+ assign lfsr_c[14] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[16]);
75
+ assign lfsr_c[15] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[17]);
76
+ assign lfsr_c[16] = lfsr_q[18];
77
+ assign lfsr_c[17] = lfsr_q[19];
78
+ assign lfsr_c[18] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[20]);
79
+ assign lfsr_c[19] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[21]);
80
+ assign lfsr_c[20] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[22]);
81
+ assign lfsr_c[21] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[23]);
82
+ assign lfsr_c[22] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[24]);
83
+ assign lfsr_c[23] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[25]);
84
+ assign lfsr_c[24] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[26]);
85
+ assign lfsr_c[25] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[27]);
86
+ assign lfsr_c[26] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[28]);
87
+ assign lfsr_c[27] = (data_in[1] ^ lfsr_q[1] ^ lfsr_q[29]);
88
+ assign lfsr_c[28] = (data_in[0] ^ lfsr_q[0] ^ lfsr_q[30]);
89
+ assign lfsr_c[29] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1] ^ lfsr_q[31]);
90
+ assign lfsr_c[30] = (data_in[0] ^ data_in[1] ^ lfsr_q[0] ^ lfsr_q[1]);
91
+ assign lfsr_c[31] = (data_in[1] ^ lfsr_q[1]);
92
+
93
+ // -------------------------------------------------------------------------
94
+
95
+ always @(posedge clk, posedge rst) begin
96
+ if(rst) begin
97
+ lfsr_q <= {32{1'b1}};
98
+ end
99
+ else begin
100
+ lfsr_q <= crc_en ? lfsr_c : lfsr_q;
101
+ end
102
+ end // always
103
+ endmodule // crc
HDLForBeginners_Examples/30092022_testbench_start_finish/src/dc_removal.sv ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: rst_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module dc_removal
24
+ #(
25
+ parameter DATA_WIDTH = 32
26
+ )
27
+ (
28
+ input clk,
29
+ input rst,
30
+ input clk_en,
31
+
32
+ // x in
33
+ input [DATA_WIDTH-1:0] s_axis_data_tdata,
34
+
35
+ // y out
36
+ output [DATA_WIDTH-1:0] m_axis_data_tdata
37
+
38
+
39
+ );
40
+
41
+
42
+ // Real-Time DC Removal
43
+ // https://www.embedded.com/dsp-tricks-dc-removal/
44
+ // Figure 13(b)
45
+
46
+
47
+ // 973/1024 = 0.95
48
+ localparam a_coeff_num = 973;
49
+ localparam a_coeff_denom_pow2 = 10;
50
+
51
+
52
+ logic signed [DATA_WIDTH-1:0] x_data;
53
+ logic signed [DATA_WIDTH-1:0] y_data;
54
+ logic signed [DATA_WIDTH-1:0] f_data;
55
+ logic signed [DATA_WIDTH-1:0] f_data_q;
56
+ logic signed [DATA_WIDTH-1:0] f_data_q_multa;
57
+
58
+ // drive input signal
59
+ assign x_data = s_axis_data_tdata;
60
+
61
+ // f = x(n) + f_q*a
62
+ assign f_data = x_data + f_data_q_multa;
63
+
64
+ // fq*a = fq*a
65
+ assign f_data_q_multa = f_data_q*a_coeff_num >>> a_coeff_denom_pow2;
66
+
67
+ // y = f - f_q
68
+ assign y_data = f_data - f_data_q;
69
+
70
+ // f_q
71
+ always_ff@(posedge clk) begin
72
+ if (rst) begin
73
+ f_data_q <= 0;
74
+
75
+ end
76
+ else if (clk_en) begin
77
+ f_data_q <= f_data;
78
+
79
+ end
80
+ end
81
+
82
+ assign m_axis_data_tdata = y_data;
83
+
84
+
85
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/endian_switch.sv ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // HDLbits example excercise "vector2"
2
+ // https://hdlbits.01xz.net/wiki/Vector2
3
+
4
+
5
+ module endian_switch
6
+ #(
7
+ parameter BYTE_SIZE = 8,
8
+ parameter INPUT_BYTES = 4
9
+ )
10
+ (
11
+ input [INPUT_BYTES*BYTE_SIZE-1:0] in,
12
+
13
+ // both array and flat versions are driven
14
+ // connect up as required
15
+ output [INPUT_BYTES*BYTE_SIZE-1:0] out,
16
+ output [INPUT_BYTES-1:0][BYTE_SIZE-1:0] out_array
17
+
18
+ );//
19
+
20
+
21
+ // $size gives number of bits in a vector
22
+ localparam NUM_BYTES = INPUT_BYTES;
23
+
24
+ // generate variable
25
+ genvar i;
26
+ generate
27
+ for (i = 1;i<=NUM_BYTES;i++) begin : endian_switch_for // loop name
28
+ // mimics the same format as intermediate, but this just automatically expands based on the constants
29
+ assign out[i*BYTE_SIZE-1 -: BYTE_SIZE] = in[(NUM_BYTES-i+1)*BYTE_SIZE-1 -: BYTE_SIZE];
30
+
31
+ // Array driven too
32
+ // for arrays, they are indexed in the same order as declared
33
+ // out_array is declared as [INPUT_BYTES-1:0][BYTE_SIZE-1:0]
34
+ // so assign out_array[x][y]
35
+ // x -> INPUT_BYTES dimension
36
+ // y -> BYTE_SIZE dimension.
37
+ // right-side dimensions can be left off
38
+ // assign out_array[x] is OK (as seen below), but there is no way to index [y] on its own
39
+ // so be careful to get the order right according to the application.
40
+ // else manual dimension switch is required
41
+ assign out_array[i-1] = in[(NUM_BYTES-i+1)*BYTE_SIZE-1 -: BYTE_SIZE];
42
+ end
43
+ endgenerate
44
+
45
+
46
+
47
+
48
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/eth_header_gen.sv ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 13:55:40
7
+ // Design Name:eth_header_gen
8
+ // Module Name:
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // Creates an ethernet header object based on supplied parameters
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+ import ethernet_header_pkg::*;
23
+
24
+ module eth_header_gen
25
+ #(
26
+ parameter [47:0] SOURCE_MAC = 48'he86a64e7e830,
27
+ parameter [47:0] DEST_MAC = 48'he86a64e7e829,
28
+ parameter [15:0] PACKET_PAYLOAD_BYTES = 128
29
+
30
+ )
31
+ (
32
+
33
+ output ethernet_header output_header
34
+
35
+ );
36
+
37
+
38
+ ethernet_header header;
39
+
40
+ // Endian switch parameters
41
+ endian_switch #( .BYTE_SIZE(8), .INPUT_BYTES(6) ) endian_switch_src_mac ( .in(SOURCE_MAC), .out_array(header.mac_source) );
42
+ endian_switch #( .BYTE_SIZE(8), .INPUT_BYTES(6) ) endian_switch_dest_mac ( .in(DEST_MAC), .out_array(header.mac_destination) );
43
+ endian_switch #( .BYTE_SIZE(8), .INPUT_BYTES(2) ) endian_switch_ipv4_length ( .in(PACKET_PAYLOAD_BYTES), .out_array(header.eth_type_length));
44
+
45
+ assign output_header = header;
46
+
47
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/eth_rst_gen.sv ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: eth_rst_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module eth_rst_gen(
24
+ input clk,
25
+ input rst,
26
+ output eth_clk_out,
27
+ output eth_rst_out,
28
+ output ETH_REFCLK,
29
+ output ETH_RSTN
30
+ );
31
+
32
+ logic locked;
33
+ logic eth_rst;
34
+ logic eth_clk;
35
+
36
+
37
+ // 50M clk gen
38
+ clk_wiz_0 gen_50M
39
+ (
40
+ .clk_out1(eth_clk), // output clk_out1
41
+ .clk_out2(ETH_REFCLK), // output clk_out2
42
+ .reset(rst), // input reset
43
+ .locked(locked), // output locked
44
+ .clk_in1(clk)); // input clk_in1
45
+
46
+
47
+ `ifdef XILINX_SIMULATOR
48
+ // So simulation doesn't have to wait so long to come out of reset
49
+ localparam WAIT_CYCLES_50M = 20;
50
+ `else
51
+ // synthesis uses full 40ms
52
+ localparam WAIT_CYCLES_50M = 2000000; // 40ms
53
+ `endif
54
+ logic [31:0] wait_counter_50M;
55
+
56
+ // Generate output reset signals in 50M domain
57
+ always_ff@(posedge eth_clk) begin
58
+ // remain in reset until global reset is released
59
+ if (rst) begin
60
+ eth_rst <= 1;
61
+ wait_counter_50M <= 0;
62
+ end
63
+ else begin
64
+ // PLL locked
65
+ if (locked) begin
66
+ // remain in rst till counter is done
67
+ if (wait_counter_50M < WAIT_CYCLES_50M-1) begin
68
+ eth_rst <= 1;
69
+ wait_counter_50M <= wait_counter_50M + 1;
70
+ end
71
+ else begin
72
+ eth_rst <= 0;
73
+ end
74
+ end
75
+ // PLL not locked. Remain in reset until locked
76
+ else begin
77
+ eth_rst <= 1;
78
+ wait_counter_50M <= 0;
79
+
80
+
81
+ end
82
+ end
83
+ end
84
+
85
+ assign ETH_RSTN = ~eth_rst;
86
+ assign eth_clk_out = eth_clk;
87
+ assign eth_rst_out = eth_rst;
88
+
89
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/ethernet_header_pkg.sv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //////////////////////////////////////////////////////////////////////////////////
2
+ // Company: HDLForBeginners
3
+ // Engineer: Stacey
4
+ //
5
+ //////////////////////////////////////////////////////////////////////////////////
6
+
7
+ package ethernet_header_pkg;
8
+
9
+ // Order matters
10
+ // Must be defined in the file before being used.
11
+
12
+ typedef struct packed {
13
+ // Ethernet Frame Header
14
+ // no FCS, added later
15
+ logic [1:0][7:0] eth_type_length;
16
+ logic [5:0][7:0] mac_source;
17
+ logic [5:0][7:0] mac_destination;
18
+ } ethernet_header;
19
+
20
+
21
+
22
+ endpackage
HDLForBeginners_Examples/30092022_testbench_start_finish/src/ethernet_top.sv ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 12.11.2021 22:54:19
7
+ // Design Name:
8
+ // Module Name: ethernet_top
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module ethernet_top
24
+ (
25
+ input CLK,
26
+ input RST_N,
27
+
28
+ // Microphone
29
+ output M_CLK,
30
+ input M_DATA,
31
+ output M_LRSEL,
32
+
33
+
34
+ output ETH_MDC,
35
+ inout ETH_MDIO,
36
+ output ETH_RSTN,
37
+ inout ETH_CRSDV,
38
+ input ETH_RXERR,
39
+ inout [1:0] ETH_RXD,
40
+ output ETH_TXEN,
41
+ output [1:0] ETH_TXD,
42
+ output ETH_REFCLK,
43
+ input ETH_INTN
44
+ );
45
+
46
+
47
+ logic rst;
48
+
49
+ rst_gen rst_gen_i
50
+ (
51
+ .clk_in(CLK),
52
+ .rst_in(~RST_N),
53
+ .rst_out(rst)
54
+
55
+ );
56
+
57
+ logic eth_clk;
58
+ logic eth_rst;
59
+
60
+ // Boot Mode config
61
+ // Mode 111
62
+ assign ETH_CRSDV = (eth_rst) ? 1 : 1'bz;
63
+ assign ETH_RXD[0] = (eth_rst) ? 1 : 1'bz;
64
+ assign ETH_RXD[1] = (eth_rst) ? 1 : 1'bz;
65
+
66
+ // No mdio interface
67
+ assign ETH_MDC = 0;
68
+
69
+ eth_rst_gen eth_rst_gen_i
70
+ (
71
+ .clk(CLK),
72
+ .rst(rst),
73
+ .eth_clk_out(eth_clk),
74
+ .eth_rst_out(eth_rst),
75
+ .ETH_REFCLK(ETH_REFCLK),
76
+ .ETH_RSTN(ETH_RSTN)
77
+ );
78
+
79
+ // Timer to generate a packet after every interval
80
+ logic [63:0] packet_timer;
81
+
82
+ // if simulating, send packets more often
83
+ `ifdef XILINX_SIMULATOR
84
+ localparam packet_max = 2_000;
85
+ `else
86
+ localparam packet_max = 600;
87
+ `endif
88
+
89
+ // PDM MICROPHONE
90
+
91
+ localparam MIC_DATA_INT = 1;
92
+ localparam MIC_DATA_FRAC = 31;
93
+
94
+ logic signed [MIC_DATA_INT-1:-MIC_DATA_FRAC] mic_data;
95
+ logic mic_data_valid;
96
+
97
+
98
+ // 2.4M out
99
+ pdm_microphone
100
+ #(
101
+ .INPUT_FREQ(50_000_000),
102
+ .PDM_FREQ(2_400_000) // 2.4M out
103
+
104
+ )
105
+ pdm_microphone_i
106
+ (
107
+ .clk(eth_clk),
108
+ .rst(eth_rst),
109
+
110
+ .mic_data(mic_data),
111
+ .mic_data_valid(mic_data_valid),
112
+
113
+
114
+ .M_CLK(M_CLK),
115
+ .M_DATA(M_DATA),
116
+ .M_LRSEL(M_LRSEL)
117
+
118
+ );
119
+
120
+
121
+
122
+ parameter PACKET_PAYLOAD_WORDS = 256;
123
+ parameter WORD_BYTES = 4;
124
+ localparam WINDOW_INT = 1;
125
+ localparam WINDOW_FRAC = 16;
126
+
127
+ logic signed [WINDOW_INT-1:-WINDOW_FRAC] window_out;
128
+ logic window_out_valid;
129
+ logic window_out_last;
130
+ logic window_out_ready;
131
+
132
+
133
+ parzen
134
+ #(
135
+ .WINDOW_SIZE_POW2($clog2(PACKET_PAYLOAD_WORDS)),
136
+ .INTERNAL_FRAC(16),
137
+ .OUTPUT_INT(WINDOW_INT),
138
+ .OUTPUT_FRAC(WINDOW_FRAC)
139
+ )
140
+ parzen_i
141
+ (
142
+ .clk(eth_clk),
143
+ .rst(eth_rst),
144
+
145
+ .window_out_ready(window_out_ready),
146
+ .window_out(window_out),
147
+ .window_out_valid(window_out_valid),
148
+ .window_out_last(window_out_last)
149
+
150
+ );
151
+
152
+ assign window_out_ready = windowed_data_ready & mic_data_valid;
153
+
154
+ // combined axi stream interface
155
+ // Apply window by multiplying mic data with parzen
156
+ localparam WINDOWED_DATA_INT = MIC_DATA_INT + WINDOW_INT;
157
+ localparam WINDOWED_DATA_FRAC = MIC_DATA_FRAC + WINDOW_FRAC;
158
+
159
+ logic signed [WINDOWED_DATA_INT-1:-WINDOWED_DATA_FRAC] windowed_data_fullscale;
160
+ logic signed [MIC_DATA_INT-1:-MIC_DATA_FRAC] windowed_data;
161
+ logic windowed_data_valid;
162
+ logic windowed_data_last;
163
+ logic windowed_data_ready;
164
+
165
+
166
+ assign windowed_data_valid = mic_data_valid & window_out_valid;
167
+ assign windowed_data_last = window_out_last;
168
+ //assign windowed_data_fullscale = mic_data*window_out[0:-WINDOW_FRAC];
169
+
170
+ window_multiplier window_multiplier_i
171
+ (
172
+ .A(mic_data), // input wire [28 : 0] A
173
+ .B(window_out), // input wire [15 : 0] B
174
+ .P(windowed_data_fullscale) // output wire [44 : 0] P
175
+ );
176
+
177
+
178
+ // reduce to MIC_DATA size
179
+ assign windowed_data = windowed_data_fullscale[MIC_DATA_INT-1:-MIC_DATA_FRAC];
180
+
181
+
182
+
183
+ localparam FFT_DATA_INT = 7;
184
+ localparam FFT_DATA_FRAC = MIC_DATA_FRAC;
185
+
186
+ logic signed [95:0] fft_data_fullscale;
187
+ logic signed [FFT_DATA_INT-1:-FFT_DATA_FRAC] fft_data_re;
188
+ logic signed [FFT_DATA_INT-1:-FFT_DATA_FRAC] fft_data_im;
189
+ logic signed [FFT_DATA_INT*2-1:-FFT_DATA_FRAC*2] fft_data_re_sq;
190
+ logic signed [FFT_DATA_INT*2-1:-FFT_DATA_FRAC*2] fft_data_im_sq;
191
+ logic [31:0] fft_data_byteswapped;
192
+ logic fft_data_valid;
193
+ logic fft_data_last;
194
+ logic fft_data_ready;
195
+ logic [FFT_DATA_INT*2:-FFT_DATA_FRAC*2] fft_data_sum_squares;
196
+
197
+
198
+ xfft_0 xfft_0_i
199
+ (
200
+ .aclk(eth_clk), // input wire aclk
201
+ .s_axis_config_tdata(1), // input wire [7 : 0] s_axis_config_tdata
202
+ .s_axis_config_tvalid(1), // input wire s_axis_config_tvalid
203
+ .s_axis_config_tready(s_axis_config_tready), // output wire s_axis_config_tready
204
+ .s_axis_data_tdata({32'b0,windowed_data}), // input wire [63 : 0] s_axis_data_tdata
205
+ .s_axis_data_tvalid(windowed_data_valid), // input wire s_axis_data_tvalid
206
+ .s_axis_data_tready(windowed_data_ready), // output wire s_axis_data_tready
207
+ .s_axis_data_tlast(windowed_data_last), // input wire s_axis_data_tlast
208
+ .m_axis_data_tdata(fft_data_fullscale), // output wire [95 : 0] m_axis_data_tdata
209
+ .m_axis_data_tvalid(fft_data_valid), // output wire m_axis_data_tvalid
210
+ .m_axis_data_tready(fft_data_ready), // input wire m_axis_data_tready
211
+ .m_axis_data_tlast(fft_data_last), // output wire m_axis_data_tlast
212
+ .event_frame_started(event_frame_started), // output wire event_frame_started
213
+ .event_tlast_unexpected(event_tlast_unexpected), // output wire event_tlast_unexpected
214
+ .event_tlast_missing(event_tlast_missing), // output wire event_tlast_missing
215
+ .event_status_channel_halt(event_status_channel_halt), // output wire event_status_channel_halt
216
+ .event_data_in_channel_halt(event_data_in_channel_halt), // output wire event_data_in_channel_halt
217
+ .event_data_out_channel_halt(event_data_out_channel_halt) // output wire event_data_out_channel_halt
218
+ );
219
+
220
+
221
+ assign fft_data_re = fft_data_fullscale[37:0];
222
+ assign fft_data_im = fft_data_fullscale[77:40];
223
+ assign fft_data_re_sq = fft_data_re*fft_data_re;
224
+ assign fft_data_im_sq = fft_data_im*fft_data_im;
225
+ assign fft_data_sum_squares = fft_data_re_sq + fft_data_im_sq;
226
+
227
+
228
+ endian_switch #( .BYTE_SIZE(8), .INPUT_BYTES(WORD_BYTES) ) endian_switch_data ( .in(fft_data_sum_squares[FFT_DATA_INT-1 -: 32]), .out(fft_data_byteswapped) );
229
+
230
+
231
+ packet_gen
232
+ #(
233
+ .PACKET_PAYLOAD_WORDS(PACKET_PAYLOAD_WORDS),
234
+ .WORD_BYTES(WORD_BYTES),
235
+ .DEST_MAC(48'h080027fbdd65)
236
+ )
237
+ packet_gen_i
238
+ (
239
+ .clk(eth_clk),
240
+ .rst(eth_rst),
241
+ .s_axis_tdata(fft_data_byteswapped),
242
+ .s_axis_tvalid(fft_data_valid),
243
+ .s_axis_tlast(fft_data_last),
244
+ .s_axis_tready(fft_data_ready),
245
+ .tx_en(ETH_TXEN),
246
+ .txd(ETH_TXD)
247
+ );
248
+
249
+
250
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/packet_gen.sv ADDED
@@ -0,0 +1,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HdlForBeginners
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 13:55:40
7
+ // Design Name:
8
+ // Module Name: packet_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+ import ethernet_header_pkg::*;
23
+
24
+ module packet_gen
25
+ #(
26
+ parameter SOURCE_MAC = 48'he86a64e7e830,
27
+ parameter DEST_MAC = 48'h080027fbdd65,
28
+ parameter MII_WIDTH = 2,
29
+ parameter PACKET_PAYLOAD_WORDS = 64,
30
+ parameter WORD_BYTES = 4
31
+
32
+ )
33
+ (
34
+ input clk,
35
+ input rst,
36
+
37
+ input [WORD_BYTES*8-1:0] s_axis_tdata,
38
+ input s_axis_tvalid,
39
+ input s_axis_tlast,
40
+ output s_axis_tready,
41
+
42
+
43
+ output logic tx_en,
44
+ output logic [MII_WIDTH-1:0] txd
45
+ );
46
+
47
+
48
+ localparam PACKET_PAYLOAD_BYTES = PACKET_PAYLOAD_WORDS*WORD_BYTES;
49
+
50
+ // create a first
51
+ logic s_axis_tfirst;
52
+
53
+
54
+ always_ff @(posedge clk)
55
+ begin
56
+ if(rst) begin
57
+ s_axis_tfirst <= 1;
58
+
59
+ end
60
+ else begin
61
+ if (s_axis_tvalid && s_axis_tready) begin
62
+ if (s_axis_tlast) begin
63
+ // After tlast pulse, drive first high
64
+ s_axis_tfirst <= 1;
65
+
66
+ end
67
+ else begin
68
+ // otherwise, drive it low on valid and ready
69
+ s_axis_tfirst <= 0;
70
+
71
+ end
72
+ end
73
+ end
74
+ end
75
+
76
+
77
+ // header and state buffers
78
+ ethernet_header header;
79
+ logic [$bits(ethernet_header)-1 : 0] header_buffer;
80
+ logic [WORD_BYTES*8-1:0] data_buffer;
81
+ logic [7*8-1:0] preamble_buffer;
82
+ logic [1*8-1:0] sfd_buffer;
83
+ logic [4*8-1:0] fcs;
84
+ logic [4*8-1:0] fcs_buffer;
85
+
86
+ // Number of bytes transferred in each stage
87
+ localparam HEADER_BYTES = $bits(ethernet_header)/8;
88
+ localparam DATA_BYTES = PACKET_PAYLOAD_BYTES;
89
+ localparam WAIT_BYTES = 12;
90
+ localparam SFD_BYTES = 1;
91
+ localparam PREAMBLE_BYTES = 7;
92
+ localparam FCS_BYTES = 4;
93
+
94
+ // RMII interface is MII_WIDTH bits wide, so divide by MII_WIDTH to get the correct
95
+ // number of iterations per each stage
96
+ localparam HEADER_LENGTH = HEADER_BYTES*8/MII_WIDTH;
97
+ localparam WAIT_LENGTH = WAIT_BYTES*8/MII_WIDTH;
98
+ localparam SFD_LENGTH = SFD_BYTES*8/MII_WIDTH;
99
+ localparam PREAMBLE_LENGTH = PREAMBLE_BYTES*8/MII_WIDTH;
100
+ localparam FCS_LENGTH = FCS_BYTES*8/MII_WIDTH;
101
+ localparam DATA_LENGTH = DATA_BYTES*8/MII_WIDTH;
102
+ localparam DATA_COUNTER_BITS = $clog2(WORD_BYTES*8/MII_WIDTH);
103
+
104
+
105
+
106
+ // State machine
107
+ typedef enum {IDLE, PREAMBLE, SFD, HEADER, DATA, FCS, WAIT} state_type;
108
+
109
+ state_type current_state = IDLE;
110
+ state_type next_state = IDLE;
111
+
112
+ // Data fifo
113
+ logic fifo_full;
114
+ logic fifo_empty;
115
+ logic [11:0] fifo_count;
116
+ logic [WORD_BYTES*8-1:0] fifo_out;
117
+ logic fifo_rd_en;
118
+ logic fifo_wr_en;
119
+ logic packet_start_valid;
120
+ logic packet_valid;
121
+ logic fifo_has_space;
122
+
123
+ localparam FIFO_DEPTH = 2048;
124
+
125
+ assign fifo_has_space = (fifo_count < FIFO_DEPTH-PACKET_PAYLOAD_BYTES ) ? 1 : 0;
126
+
127
+ // Packet start is only valid when
128
+ // First beat of axi stream and
129
+ // Axis Stream is valid and
130
+ // Axis Stream is ready and
131
+ // Space in FIFO
132
+ // This indicates that this packet has space to go into the fifo
133
+ // Otherwise, it is skipped
134
+ assign packet_start_valid = s_axis_tvalid && s_axis_tready && s_axis_tfirst && fifo_has_space;
135
+
136
+ // create packet_valid flag
137
+ always_ff @(posedge clk)
138
+ begin
139
+ if(rst) begin
140
+ packet_valid <= 0;
141
+
142
+ end
143
+ else begin
144
+ // If the start of this packet is valid
145
+ if (packet_start_valid) begin
146
+ // The entire packet is valid
147
+ packet_valid <= 1;
148
+
149
+ end
150
+
151
+ // If this is the end of a valid packet
152
+ if (packet_valid && s_axis_tvalid && s_axis_tready && s_axis_tlast) begin
153
+ // End of valid packet
154
+ packet_valid <= 0;
155
+ end
156
+ end
157
+ end
158
+
159
+ // only write a valid packet
160
+ assign fifo_wr_en = s_axis_tvalid & s_axis_tready & (packet_start_valid || packet_valid);
161
+
162
+ // ready if fifo has space
163
+ assign s_axis_tready = (fifo_has_space & s_axis_tfirst) | packet_valid;
164
+
165
+ // Get header
166
+ eth_header_gen
167
+ #(
168
+ .SOURCE_MAC(SOURCE_MAC),
169
+ .DEST_MAC(DEST_MAC),
170
+ .PACKET_PAYLOAD_BYTES(PACKET_PAYLOAD_BYTES)
171
+ )
172
+ eth_header_gen
173
+ (
174
+ .output_header(header)
175
+
176
+ );
177
+
178
+ data_fifo data_fifo_i
179
+ (
180
+ .clk(clk),
181
+ .srst(rst),
182
+ .din(s_axis_tdata),
183
+ .wr_en(fifo_wr_en),
184
+ .rd_en(fifo_rd_en),
185
+ .dout(fifo_out),
186
+ .full(fifo_full),
187
+ .empty(fifo_empty),
188
+ .data_count(fifo_count)
189
+ );
190
+
191
+
192
+ // count the time spent in each state
193
+ logic [31:0] state_counter;
194
+
195
+ always @(posedge clk)
196
+ begin
197
+ if(rst) begin
198
+ state_counter <= '0;
199
+
200
+ end
201
+ else begin
202
+ if (current_state != next_state) begin
203
+ state_counter <= '0;
204
+
205
+ end
206
+ else begin
207
+ // otherwise increment counter and shift buffer
208
+ state_counter <= state_counter + 'd1;
209
+ end
210
+ end
211
+ end
212
+
213
+ // 3 process state machine
214
+ // 1) decide which state to go into next
215
+ always @(*)
216
+ begin
217
+ case (current_state)
218
+ IDLE :
219
+ begin
220
+ // If there's enough data in fifo
221
+ if (fifo_count >= PACKET_PAYLOAD_WORDS) begin
222
+ next_state = PREAMBLE;
223
+
224
+ end
225
+ else begin
226
+ next_state = current_state;
227
+
228
+ end
229
+ end
230
+ PREAMBLE:
231
+ begin
232
+ if (state_counter == PREAMBLE_LENGTH-1) begin
233
+ next_state = SFD;
234
+ end
235
+ else begin
236
+ next_state = current_state;
237
+
238
+ end
239
+ end
240
+ SFD:
241
+ begin
242
+ if (state_counter == SFD_LENGTH-1) begin
243
+ next_state = HEADER;
244
+ end
245
+ else begin
246
+ next_state = current_state;
247
+
248
+ end
249
+ end
250
+ HEADER :
251
+ begin
252
+ if (state_counter == HEADER_LENGTH-1) begin
253
+ next_state = DATA;
254
+ end
255
+ else begin
256
+ next_state = current_state;
257
+
258
+ end
259
+ end
260
+ DATA :
261
+ begin
262
+ if (state_counter == DATA_LENGTH-1) begin
263
+ next_state = FCS;
264
+ end
265
+ else begin
266
+ next_state = current_state;
267
+
268
+ end
269
+ end
270
+ FCS :
271
+ begin
272
+ if (state_counter == FCS_LENGTH-1) begin
273
+ next_state = WAIT;
274
+ end
275
+ else begin
276
+ next_state = current_state;
277
+
278
+ end
279
+ end
280
+ WAIT :
281
+ begin
282
+ if (state_counter == WAIT_LENGTH-1) begin
283
+ next_state = IDLE;
284
+ end
285
+ else begin
286
+ next_state = current_state;
287
+
288
+ end
289
+ end
290
+ default:
291
+ next_state = current_state;
292
+ endcase
293
+ end
294
+
295
+ //2) register into that state
296
+ always @(posedge clk)
297
+ begin
298
+ if(rst) begin
299
+ current_state <= IDLE;
300
+ end
301
+ else begin
302
+ current_state <= next_state;
303
+ end
304
+
305
+ end
306
+
307
+
308
+ // state dependant variables
309
+ logic [MII_WIDTH-1:0] tx_data;
310
+ logic tx_valid;
311
+ logic fcs_en;
312
+ logic fcs_rst;
313
+
314
+ //3) drive output according to state
315
+ always @(*)
316
+ begin
317
+ case (current_state)
318
+ IDLE :
319
+ begin
320
+ tx_valid = 0;
321
+ tx_data = 0;
322
+ fcs_en = 0;
323
+ fcs_rst = 1;
324
+
325
+ end
326
+ PREAMBLE :
327
+ begin
328
+ tx_valid = 1;
329
+ tx_data = preamble_buffer[MII_WIDTH-1:0];
330
+ fcs_en = 0;
331
+ fcs_rst = 0;
332
+
333
+ end
334
+ SFD :
335
+ begin
336
+ tx_valid = 1;
337
+ tx_data = sfd_buffer[MII_WIDTH-1:0];
338
+ fcs_en = 0;
339
+ fcs_rst = 0;
340
+ end
341
+ HEADER :
342
+ begin
343
+ tx_valid = 1;
344
+ tx_data = header_buffer[MII_WIDTH-1:0];
345
+ fcs_en = 1;
346
+ fcs_rst = 0;
347
+
348
+ end
349
+ DATA :
350
+ begin
351
+ tx_valid = 1;
352
+ tx_data = data_buffer[MII_WIDTH-1:0];
353
+ fcs_en = 1;
354
+ fcs_rst = 0;
355
+
356
+ end
357
+ FCS:
358
+ begin
359
+ tx_valid = 1;
360
+ tx_data = fcs_buffer[MII_WIDTH-1:0];
361
+ fcs_en = 0;
362
+ fcs_rst = 0;
363
+
364
+ end
365
+ WAIT :
366
+ begin
367
+ tx_valid = 0;
368
+ tx_data = 0;
369
+ fcs_en = 0;
370
+ fcs_rst = 0;
371
+
372
+ end
373
+ default:
374
+ begin
375
+ tx_valid = 0;
376
+ tx_data = 0;
377
+ fcs_en = 0;
378
+ fcs_rst = 0;
379
+
380
+ end
381
+ endcase
382
+ end
383
+
384
+ logic [DATA_COUNTER_BITS-1:0] data_ones;
385
+ assign data_ones = '1;
386
+
387
+ // populate and shift buffers according to state
388
+ always_ff@(posedge clk) begin
389
+ if (rst == 1) begin
390
+ header_buffer <= 0;
391
+ preamble_buffer <= 0;
392
+ fifo_rd_en <= 0;
393
+
394
+ end
395
+ else begin
396
+ fifo_rd_en <= 0;
397
+
398
+ // buffer loading
399
+ if (current_state == IDLE) begin
400
+ header_buffer <= header;
401
+ preamble_buffer <= 56'h55555555555555;
402
+ sfd_buffer <= 8'hd5;
403
+ end
404
+ // and fcs when it's available
405
+ if (next_state == FCS && current_state != FCS) begin
406
+ fcs_buffer <= fcs;
407
+ end
408
+ // and fcs when it's available
409
+ if (next_state == DATA && current_state != DATA) begin
410
+ data_buffer <= fifo_out;
411
+ fifo_rd_en <= 1;
412
+
413
+ end
414
+
415
+ // shift buffers during those states
416
+ if (current_state == HEADER) begin
417
+ header_buffer <= header_buffer >> MII_WIDTH;
418
+ end
419
+ if (current_state == PREAMBLE) begin
420
+ preamble_buffer <= preamble_buffer >> MII_WIDTH;
421
+ end
422
+ if (current_state == SFD) begin
423
+ sfd_buffer <= sfd_buffer >> MII_WIDTH;
424
+ end
425
+ if (current_state == DATA && next_state == DATA ) begin
426
+ if (state_counter[DATA_COUNTER_BITS-1:0] == data_ones) begin
427
+ data_buffer <= fifo_out;
428
+ fifo_rd_en <= 1;
429
+
430
+ end
431
+ else begin
432
+ data_buffer <= data_buffer >> MII_WIDTH;
433
+ end
434
+ end
435
+ if (current_state == FCS) begin
436
+ fcs_buffer <= fcs_buffer >> MII_WIDTH;
437
+ end
438
+ end
439
+ end
440
+
441
+ // crc generator
442
+ crc_gen crc_gen_i
443
+ (
444
+ .clk(clk),
445
+ .rst(rst || fcs_rst),
446
+
447
+ .data_in(tx_data),
448
+ .crc_en(fcs_en),
449
+ .crc_out(fcs)
450
+
451
+ );
452
+
453
+ // Register outputs
454
+ //drive tx interfaces
455
+
456
+ always @(posedge clk)
457
+
458
+ begin
459
+ if(rst) begin
460
+ tx_en <= 0;
461
+
462
+ end
463
+ else begin
464
+ tx_en <= tx_valid;
465
+ txd <= tx_data;
466
+
467
+ end
468
+
469
+ end
470
+
471
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/parzen.sv ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: parzen
8
+ // Module Name: parzen
9
+ // Project Name: parzen
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module parzen
24
+ #(
25
+ parameter WINDOW_SIZE_POW2 = 10,
26
+ parameter INTERNAL_FRAC = 16,
27
+ parameter OUTPUT_INT = 1,
28
+ parameter OUTPUT_FRAC = 16
29
+ )
30
+ (
31
+ input clk,
32
+ input rst,
33
+
34
+ input window_out_ready,
35
+ output [OUTPUT_INT-1:-OUTPUT_FRAC] window_out,
36
+ output window_out_valid,
37
+ output window_out_last
38
+
39
+ );
40
+
41
+
42
+
43
+ // Sizes
44
+ // When multiplying, the sizes add.
45
+ // B * B is B_SIZE + B_SIZE
46
+ // B2 * B is B2_SIZE + B_SIZE;
47
+ localparam B_INT = WINDOW_SIZE_POW2;
48
+ localparam B2_INT = B_INT + B_INT;
49
+ localparam B3_INT = B2_INT + B_INT;
50
+ localparam B_SCALED_INT = B_INT + 3;
51
+
52
+ // When multiplying, the fractionals add with the same rules
53
+ localparam B_FRAC = INTERNAL_FRAC;
54
+ localparam B2_FRAC = B_FRAC + B_FRAC;
55
+ localparam B3_FRAC = B2_FRAC + B_FRAC;
56
+ localparam B_SCALED_FRAC = B_FRAC;
57
+
58
+ //Signals
59
+
60
+ logic [WINDOW_SIZE_POW2-1:0] triangle_q0;
61
+ logic triangle_valid_q0;
62
+ logic triangle_last_q0;
63
+ logic [WINDOW_SIZE_POW2-1:0] triangle_q1;
64
+ logic triangle_valid_q1;
65
+ logic triangle_last_q1;
66
+ logic [WINDOW_SIZE_POW2-1:0] triangle_q2;
67
+ logic triangle_valid_q2;
68
+ logic triangle_last_q2;
69
+ logic [WINDOW_SIZE_POW2-1:0] triangle_q3;
70
+ logic triangle_valid_q3;
71
+ logic triangle_last_q3;
72
+
73
+ // also could be
74
+ // logic [3:0][WINDOW_SIZE_POW2-1:0] triangle;
75
+ // logic [3:0] triangle_valid;
76
+ // And indexed with
77
+ // triangle[3] to indicate the q3 signal
78
+ // triangle[3][2:0] to bit-slice the 3 lsbs of the q3 signal
79
+
80
+
81
+ // I'm creating individual signals instead of using arrays
82
+ // to keep it simple
83
+ logic [B_INT-1:-B_FRAC] abs_n_q0;
84
+ logic abs_n_valid_q0;
85
+
86
+ logic [B_INT-1:-B_FRAC] b_q0;
87
+ logic b_valid_q0;
88
+
89
+ // Also need delayed versions of b
90
+ logic [B_INT-1:-B_FRAC] b_q1;
91
+ logic b_valid_q1;
92
+ logic [B_INT-1:-B_FRAC] b_q2;
93
+ logic b_valid_q2;
94
+
95
+ logic [B2_INT-1:-B2_FRAC] b2_q0;
96
+ logic b2_valid_q0;
97
+
98
+ // And Delayed version of b2
99
+ logic [B2_INT-1:-B2_FRAC] b2_q1;
100
+ logic b2_valid_q1;
101
+ logic [B2_INT-1:-B2_FRAC] b2_q2;
102
+ logic b2_valid_q2;
103
+
104
+ logic [B3_INT-1:-B3_FRAC] b3_q1;
105
+ logic b3_valid_q1;
106
+
107
+ logic [B3_INT-1:-B3_FRAC] b3_q2;
108
+ logic b3_valid_q2;
109
+
110
+ // create scaled values
111
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] c6b1_q2;
112
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] c6b2_q2;
113
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] c6b3_q2;
114
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] c2b3_q2;
115
+ logic cnbn_valid_q2;
116
+
117
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] f1_q2;
118
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] f2_q2;
119
+ logic fn_valid_q2;
120
+
121
+ logic signed [B_SCALED_INT-1:-B_SCALED_FRAC] f1_q3;
122
+ logic signed [B_SCALED_INT-1:-B_SCALED_FRAC] f2_q3;
123
+ logic fn_valid_q3;
124
+
125
+
126
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] one_const;
127
+ logic [B_SCALED_INT-1:-B_SCALED_FRAC] two_const;
128
+
129
+ // RULES FOR KEEPING SIGNALS IN SYNC
130
+ // assign, the q value stays the same
131
+ // always@(*) block, the q value stays the same
132
+ // always@(clk) block, the q value goes up by one.
133
+ // All operations must occur with the same q value signals!
134
+
135
+
136
+ // Stage 0
137
+ triangle_gen
138
+ #(
139
+ .WIDTH_POW2(WINDOW_SIZE_POW2)
140
+
141
+ )
142
+ triangle_gen_i
143
+ (
144
+ .clk(clk),
145
+ .rst(rst),
146
+
147
+ .triangle_out_ready(window_out_ready),
148
+ .triangle_out(triangle_q0),
149
+ .triangle_out_valid(triangle_valid_q0),
150
+ .triangle_out_last(triangle_last_q0)
151
+
152
+ );
153
+
154
+ // abs_n
155
+ assign abs_n_q0[B_INT-1:0] = triangle_q0;
156
+ assign abs_n_q0[-1:-B_FRAC] = '0;
157
+ assign abs_n_valid_q0 = triangle_valid_q0;
158
+
159
+
160
+ // b = {|n|}/{N/2} = |n| >> (N-1)
161
+ // |n| is abs_n
162
+ // N is WINDOW_SIZE_POW2
163
+ assign b_q0 = abs_n_q0 >>> (WINDOW_SIZE_POW2 - 1);
164
+ assign b_valid_q0 = abs_n_valid_q0;
165
+
166
+
167
+ assign b2_q0 = b_q0 * b_q0;
168
+ assign b2_valid_q0 = b_valid_q0;
169
+
170
+
171
+ // Stage 1
172
+ // Use registered versions of b and b2 for b3
173
+ assign b3_q1 = b_q1 * b2_q1;
174
+ assign b3_valid_q1 = b_valid_q1 * b2_valid_q1;
175
+
176
+
177
+ // Stage 2
178
+
179
+ // Up to now, I've been working with full-scale numbers to create my b values
180
+ // But I need to make them all B Size to combine
181
+
182
+ assign c6b1_q2 = b_q2[B_INT-1:-B_FRAC]*6;
183
+ assign c6b2_q2 = b2_q2[B_INT-1:-B_FRAC]*6;
184
+ assign c6b3_q2 = b3_q2[B_INT-1:-B_FRAC]*6;
185
+ assign c2b3_q2 = b3_q2[B_INT-1:-B_FRAC]*2;
186
+ assign cnbn_valid_q2 = b3_valid_q2;
187
+
188
+
189
+
190
+ // Polynomials
191
+
192
+ assign one_const[B_SCALED_INT-1:0] = 1;
193
+ assign one_const[-1:-B_SCALED_FRAC] = '0;
194
+
195
+ assign two_const[B_SCALED_INT-1:0] = 2;
196
+ assign two_const[-1:-B_SCALED_FRAC] = '0;
197
+
198
+ assign f1_q2 = one_const + c6b3_q2 - c6b2_q2 ;
199
+ assign f2_q2 = two_const + c6b2_q2 - c6b1_q2 - c2b3_q2 ;
200
+ assign fn_valid_q2 = cnbn_valid_q2;
201
+
202
+ // Stage 3
203
+ assign window_out = !window_out_valid ? '0 :
204
+ (triangle_q3[WINDOW_SIZE_POW2-1:WINDOW_SIZE_POW2-2] > 0) ? f2_q3 :
205
+ f1_q3;
206
+ assign window_out_valid = fn_valid_q3;
207
+ assign window_out_last = triangle_last_q3;
208
+
209
+
210
+
211
+ always_ff @(posedge clk)
212
+ begin
213
+ if(rst) begin
214
+ triangle_q1 <= '0;
215
+ triangle_q2 <= '0;
216
+ triangle_q3 <= '0;
217
+ triangle_last_q1 <= 0;
218
+ triangle_last_q2 <= 0;
219
+ triangle_last_q3 <= 0;
220
+
221
+ b_q1 <= '0;
222
+ b_valid_q1 <= '0;
223
+ b_q2 <= '0;
224
+ b_valid_q2 <= '0;
225
+ b2_q1 <= '0;
226
+ b2_valid_q1 <= '0;
227
+ b2_q2 <= '0;
228
+ b2_valid_q2 <= '0;
229
+ b3_q2 <= '0;
230
+ b3_valid_q2 <= '0;
231
+ f1_q3 <= '0;
232
+ f2_q3 <= '0;
233
+ fn_valid_q3 <= '0;
234
+
235
+
236
+ end
237
+ else if (window_out_ready) begin
238
+ triangle_q1 <= triangle_q0;
239
+ triangle_q2 <= triangle_q1;
240
+ triangle_q3 <= triangle_q2;
241
+ triangle_last_q1 <= triangle_last_q0;
242
+ triangle_last_q2 <= triangle_last_q1;
243
+ triangle_last_q3 <= triangle_last_q2;
244
+ b_q1 <= b_q0;
245
+ b_valid_q1 <= b_valid_q0;
246
+ b_q2 <= b_q1;
247
+ b_valid_q2 <= b_valid_q1;
248
+ b2_q1 <= b2_q0;
249
+ b2_valid_q1 <= b2_valid_q0;
250
+ b2_q2 <= b2_q1;
251
+ b2_valid_q2 <= b2_valid_q1;
252
+ b3_q2 <= b3_q1;
253
+ b3_valid_q2 <= b3_valid_q1;
254
+ f1_q3 <= f1_q2;
255
+ f2_q3 <= f2_q2;
256
+ fn_valid_q3 <= fn_valid_q2;
257
+
258
+ end
259
+ end
260
+
261
+
262
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/pdm_clk_gen.sv ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: pdm_microphone
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module pdm_clk_gen
24
+ #(
25
+ parameter INPUT_FREQ = 100000000,
26
+ parameter OUTPUT_FREQ = 2_500_000 // 2.5M out
27
+
28
+ )
29
+ (
30
+ input clk,
31
+ input rst,
32
+
33
+ output M_CLK,
34
+ output m_clk_rising
35
+
36
+ );
37
+
38
+ logic m_clk_rising_i;
39
+ logic m_clk_i;
40
+
41
+
42
+ // generate clock
43
+ // Clock wizard doesn't generate clocks < 5M.
44
+ // for clocks < 5M, anything higher use the clock wizard
45
+ // Why the clock wizard?
46
+ // - The FPGA has dedocated clock routes that are designed specifically for clock signals
47
+ // - These get the clocks where they need to go ASAP
48
+ // - The tool knows these signals are clocks because of a create_clock constraint
49
+ // - Or if the wizard was used to generate them
50
+ // - This way the timing analyzer tool knows about them and can use them in the timing analysis
51
+
52
+ // This clock is so slow that it doesn't need to be on the dedicated clock paths
53
+ // All I am doing here is creating an output pulse on the rising edge of the clock
54
+ // That is used in other logic. It behaves as an enable signal in the clk domain
55
+
56
+ // M_CLK is taken off chip to the PDM microphone IC and is not used on the FPGA anywhere.
57
+
58
+
59
+ localparam CLK_DIVIDE = INPUT_FREQ/OUTPUT_FREQ;
60
+
61
+ // count clock samples
62
+ logic [$clog2(CLK_DIVIDE)-1:0] clk_counter;
63
+
64
+ always_ff@(posedge clk) begin
65
+ if (rst) begin
66
+ clk_counter <= 0;
67
+ m_clk_i <= 0;
68
+ m_clk_rising_i <= 0;
69
+
70
+ end
71
+ else begin
72
+ m_clk_rising_i <= 0;
73
+
74
+ if (clk_counter < (CLK_DIVIDE/2)-1) begin
75
+ clk_counter <= clk_counter + 1;
76
+
77
+ end
78
+ else begin
79
+ clk_counter <= 0;
80
+ m_clk_i <= ~m_clk_i;
81
+ m_clk_rising_i <= ~m_clk_i;
82
+
83
+ end
84
+ end
85
+ end
86
+
87
+ assign M_CLK = m_clk_i;
88
+ assign m_clk_rising = m_clk_rising_i;
89
+
90
+
91
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/pdm_microphone.sv ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: pdm_microphone
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module pdm_microphone
24
+ #(
25
+ parameter INPUT_FREQ = 100000000,
26
+ parameter PDM_FREQ = 2400000
27
+
28
+ )
29
+ (
30
+ input clk,
31
+ input rst,
32
+
33
+ output [31:0] mic_data,
34
+ output mic_data_valid,
35
+
36
+
37
+ output M_CLK,
38
+ input M_DATA,
39
+ output M_LRSEL
40
+
41
+ );
42
+
43
+ logic [2:0] m_data_q;
44
+ logic m_clk_rising;
45
+
46
+ // triple register data into clk domain
47
+ always_ff@(posedge clk) begin
48
+ if (rst) begin
49
+ m_data_q <= 0;
50
+
51
+ end
52
+ else begin
53
+ m_data_q[0] <= M_DATA;
54
+ m_data_q[2:1] <= m_data_q[1:0];
55
+
56
+ end
57
+ end
58
+
59
+ // clock gen
60
+ pdm_clk_gen
61
+ #(
62
+ .INPUT_FREQ(INPUT_FREQ),
63
+ .OUTPUT_FREQ(PDM_FREQ)
64
+
65
+ )
66
+ pdm_clk_gen_i
67
+ (
68
+ .clk(clk),
69
+ .rst(rst),
70
+
71
+ .M_CLK(M_CLK),
72
+ .m_clk_rising(m_clk_rising)
73
+
74
+ );
75
+
76
+ logic [31:0] cic_out_data;
77
+ logic cic_out_valid;
78
+
79
+ cic_compiler_0 cic_compiler
80
+ (
81
+ .aclk(clk), // input wire aclk
82
+ .s_axis_data_tdata({{7{m_data_q[2]}},1'b1}), // input wire [7 : 0] s_axis_data_tdata
83
+ //.s_axis_data_tdata({7'b0,m_data_q[2]}), // input wire [7 : 0] s_axis_data_tdata
84
+ .s_axis_data_tvalid(m_clk_rising), // input wire s_axis_data_tvalid
85
+ .s_axis_data_tready(), // output wire s_axis_data_tready
86
+
87
+ .m_axis_data_tdata(cic_out_data), // output wire [39 : 0] m_axis_data_tdata
88
+ .m_axis_data_tvalid(cic_out_valid) // output wire m_axis_data_tvalid
89
+ );
90
+
91
+
92
+ assign M_LRSEL = 0;
93
+ assign mic_data = cic_out_data;
94
+ assign mic_data_valid = cic_out_valid;
95
+
96
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/rst_gen.sv ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: rst_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module rst_gen(
24
+ input clk_in,
25
+ input rst_in,
26
+ output rst_out
27
+
28
+ );
29
+
30
+ logic [2:0] rst_q;
31
+
32
+
33
+ // Triple Register into clk_in domain
34
+ always_ff@(posedge clk_in) begin
35
+ rst_q[0] <= rst_in;
36
+ rst_q[2:1] <= rst_q[1:0];
37
+
38
+ end
39
+
40
+ // internal reset
41
+ // only come out of reset when rst_q is all zeros
42
+ assign rst_out = (rst_q == 0) ? 0 : 1;
43
+
44
+
45
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/src/triangle_gen.sv ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: triangle_gen
8
+ // Module Name: triangle_gen
9
+ // Project Name: triangle_gen
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // Increments a counter and and drives an output gpio pin
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+
24
+ module triangle_gen
25
+ #(
26
+ parameter WIDTH_POW2 = 10
27
+
28
+ )
29
+ (
30
+ input clk,
31
+ input rst,
32
+
33
+ input triangle_out_ready,
34
+ output [WIDTH_POW2-1:0] triangle_out,
35
+ output triangle_out_valid,
36
+ output triangle_out_last
37
+
38
+ );
39
+
40
+ // Initial value for the window counter
41
+ localparam WINDOW_COUNTER_INITIAL = 2**(WIDTH_POW2-1);
42
+
43
+ logic [WIDTH_POW2-1:0] window_counter;
44
+ logic window_counter_valid;
45
+
46
+ // Flag to check if we are counting down or up
47
+ // This could be a state machine! But a flag will also do.
48
+ // It is also a state machine, just not an explicit one.
49
+ logic window_counter_down;
50
+ logic window_done;
51
+
52
+ assign window_done = ((window_counter == WINDOW_COUNTER_INITIAL) && ~window_counter_down) ? 1 : 0;
53
+
54
+ // Valid when not reset
55
+ assign window_counter_valid = ~rst;
56
+
57
+ always_ff @(posedge clk)
58
+ begin
59
+ if(rst) begin
60
+ window_counter <= WINDOW_COUNTER_INITIAL-1;
61
+ window_counter_down <= 1'b1;
62
+
63
+ end
64
+ else if (triangle_out_ready) begin
65
+ if (window_counter_down) begin
66
+ if (window_counter == 0) begin
67
+ // Done counting down, so switch direction
68
+ window_counter_down <= 0;
69
+ window_counter <= window_counter + 1;
70
+ end
71
+ else begin
72
+ // Otherwise, carry on down
73
+ window_counter <= window_counter - 1;
74
+ end
75
+ end
76
+ else begin
77
+ if (window_counter == WINDOW_COUNTER_INITIAL) begin
78
+ // Done counting up, so switch direction
79
+ window_counter_down <= 1;
80
+ window_counter <= window_counter - 1;
81
+
82
+ end
83
+ else begin
84
+ // Carry on up
85
+ window_counter <= window_counter + 1;
86
+
87
+ end
88
+ end
89
+
90
+
91
+ end
92
+ end
93
+
94
+
95
+ assign triangle_out = window_counter;
96
+ assign triangle_out_valid = window_counter_valid;
97
+ assign triangle_out_last = window_done;
98
+
99
+
100
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/tb/ethernet_tb.sv ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 15.11.2021 16:17:08
7
+ // Design Name:
8
+ // Module Name: ethernet_tb
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module ethernet_tb(
24
+
25
+ );
26
+
27
+
28
+ // Clock definition
29
+ localparam CLK_PERIOD = 10; // 50 Mhz (counter is in ns)
30
+ localparam RST_COUNT = 10; //Clock cycles that reset is high
31
+
32
+ logic clk = 0;
33
+ logic rst;
34
+
35
+ always begin
36
+ clk = #(CLK_PERIOD/2) ~clk;
37
+ end
38
+
39
+ // reset definition
40
+ initial begin
41
+ rst = 1;
42
+ #(RST_COUNT*CLK_PERIOD);
43
+ @(posedge clk);
44
+ rst = 0;
45
+ end
46
+
47
+ logic lsfr_data;
48
+ logic lsfr_clk;
49
+
50
+ /*
51
+ // Gen input data
52
+ lfsr_8bit lfsr_8bit_i
53
+ (
54
+ .clk(lsfr_clk),
55
+ .rst(1'b0),
56
+ .clk_en(1'b1),
57
+ .data(lsfr_data)
58
+
59
+ );*/
60
+
61
+ read_stim
62
+ #(
63
+ .FILENAME("../../../../../tb/pdm_stimulus.txt"),
64
+ .LENGTH(1)
65
+
66
+ )
67
+ read_stim_i
68
+ (
69
+ .clk(lsfr_clk),
70
+ .rst(~rst),
71
+ .data(lsfr_data),
72
+ .data_valid()
73
+
74
+ );
75
+
76
+
77
+ ethernet_top ethernet_top_i
78
+ (
79
+ .CLK(clk),
80
+ .RST_N(~rst),
81
+
82
+ .M_CLK(lsfr_clk),
83
+ .M_DATA(lsfr_data),
84
+ .M_LRSEL()
85
+
86
+ );
87
+
88
+
89
+ log_data
90
+ #(
91
+ .FILENAME("output_mic_data.log"),
92
+ .LENGTH(32)
93
+
94
+ )
95
+ log_data_mic_data
96
+ (
97
+ .clk(clk),
98
+ .rst(rst),
99
+ .data(ethernet_tb.ethernet_top_i.mic_data),
100
+ .data_valid(ethernet_tb.ethernet_top_i.mic_data_valid)
101
+
102
+ );
103
+
104
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/tb/lfsr_8bit.sv ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: lfsr_4bit
8
+ // Module Name: lfsr_4bit_top
9
+ // Project Name: lfsr_4bit
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // Increments a counter and and drives an output gpio pin
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+
24
+ module lfsr_8bit
25
+ (
26
+ input clk,
27
+ input rst,
28
+ input clk_en,
29
+ output [7:0] data
30
+ );
31
+
32
+
33
+ logic [8:0] lfsr = 8'b11111111;
34
+ logic [3:0] lfsr_feedback;
35
+ assign lfsr_feedback= {lfsr[7],lfsr[5:3]};
36
+
37
+ always @(posedge clk)
38
+ begin
39
+ if(rst) begin
40
+ lfsr <= 8'b11111111;
41
+
42
+ end
43
+ else if (clk_en) begin
44
+ lfsr[7:1] <= lfsr[6:0];
45
+ lfsr[0] <= ^lfsr_feedback;
46
+ end
47
+ end
48
+
49
+ assign data = lfsr;
50
+
51
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/tb/log_data.sv ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ps / 1ps
2
+
3
+
4
+ module log_data
5
+ #(
6
+ parameter FILENAME = "output.log",
7
+ parameter LENGTH = 29
8
+
9
+ )
10
+ (
11
+ input clk,
12
+ input rst,
13
+ input signed [LENGTH-1:0] data,
14
+ input data_valid
15
+
16
+ );
17
+
18
+
19
+ integer output_err_file;
20
+
21
+ initial begin
22
+ output_err_file = $fopen(FILENAME, "w");
23
+
24
+
25
+ end
26
+
27
+
28
+ always@(posedge clk) begin
29
+ if (rst) begin
30
+
31
+ end
32
+ else begin
33
+ if (data_valid) begin
34
+ $fwrite(output_err_file,"%d,",data);
35
+ end
36
+ end
37
+ end
38
+
39
+
40
+
41
+ endmodule
HDLForBeginners_Examples/30092022_testbench_start_finish/tb/read_stim.sv ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ps / 1ps
2
+
3
+
4
+ module read_stim
5
+ #(
6
+ parameter FILENAME = "output.log",
7
+ parameter LENGTH = 29
8
+
9
+ )
10
+ (
11
+ input clk,
12
+ input rst,
13
+ output signed [LENGTH-1:0] data,
14
+ output data_valid
15
+
16
+ );
17
+
18
+ integer input_file;
19
+ integer scan_file;
20
+
21
+ initial begin
22
+ input_file = $fopen(FILENAME, "r");
23
+ if (input_file == 0) begin
24
+ $display("ERROR opening file!!");
25
+ $finish;
26
+ end
27
+ end
28
+
29
+ logic [LENGTH-1:0] stim;
30
+ logic stim_valid;
31
+
32
+
33
+ initial begin
34
+ stim = 0;
35
+ stim_valid = 0;
36
+
37
+ wait(~rst);
38
+
39
+ while(!$feof(input_file)) begin
40
+ scan_file = $fscanf(input_file, "%d\n", stim);
41
+ stim_valid = 1;
42
+
43
+ @(posedge clk);
44
+
45
+ end
46
+ end
47
+
48
+ assign data = stim;
49
+ assign data_valid = stim_valid;
50
+
51
+
52
+
53
+ endmodule
HDLForBeginners_Examples/LED_Flash/src/led_flash.sv ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 18.09.2021 12:06:18
7
+ // Design Name:
8
+ // Module Name: led_flash
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module led_flash(
24
+ input clk,
25
+ input rst_n,
26
+ output led
27
+ );
28
+
29
+ parameter [63:0] CLK_RATE = 100000000;
30
+ parameter [63:0] FLASH_RATE_ON_MS = 1000;
31
+ parameter [63:0] FLASH_RATE_OFF_MS = 1000;
32
+
33
+ parameter [63:0] FLASH_RATE_ON_CYCLES = CLK_RATE*FLASH_RATE_ON_MS/1000;
34
+ parameter [63:0] FLASH_RATE_OFF_CYCLES = CLK_RATE*FLASH_RATE_OFF_MS/1000;
35
+
36
+ logic [31:0] flash_counter;
37
+ logic on_not_off_flag;
38
+
39
+
40
+
41
+ always_ff@(posedge clk, negedge rst_n) begin
42
+ if (rst_n == 0) begin
43
+ flash_counter <= 0;
44
+ on_not_off_flag <= 0;
45
+
46
+ end
47
+ else begin
48
+ if (on_not_off_flag) begin
49
+ if (flash_counter < FLASH_RATE_ON_CYCLES-1) begin
50
+ flash_counter <= flash_counter + 1;
51
+
52
+ end
53
+ else begin
54
+ flash_counter <= 0;
55
+ on_not_off_flag <= ~on_not_off_flag;
56
+
57
+ end
58
+ end
59
+ else begin
60
+ if (flash_counter < FLASH_RATE_OFF_CYCLES-1) begin
61
+ flash_counter <= flash_counter + 1;
62
+
63
+ end
64
+ else begin
65
+ flash_counter <= 0;
66
+ on_not_off_flag <= ~on_not_off_flag;
67
+
68
+ end
69
+ end
70
+ end
71
+ end
72
+
73
+ assign led = on_not_off_flag;
74
+
75
+
76
+
77
+
78
+ endmodule
HDLForBeginners_Examples/LED_Flash/tb/led_flash_tb.sv ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 18.09.2021 12:30:56
7
+ // Design Name:
8
+ // Module Name: led_flash_tb
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module led_flash_tb(
24
+
25
+ );
26
+
27
+ logic clk = 0;
28
+ logic rst = 1;
29
+
30
+ // Clock definition
31
+ localparam CLK_PERIOD = 10; // 100 Mhz (counter is in ns)
32
+ localparam RST_COUNT = 10; //Clock cycles that reset is high
33
+
34
+ always begin
35
+ clk = #(CLK_PERIOD/2) ~clk;
36
+ end
37
+
38
+ // reset definition
39
+ initial begin
40
+ rst = 1;
41
+ #(RST_COUNT*CLK_PERIOD);
42
+ @(posedge clk);
43
+ rst = 0;
44
+ end
45
+
46
+
47
+ led_flash
48
+ led_flash_i(
49
+ .clk(clk),
50
+ .rst_n(~rst),
51
+ .led()
52
+ );
53
+ endmodule
HDLForBeginners_Examples/LFSR4Bit/lfsr_4Bit.tcl ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #*****************************************************************************************
2
+ # Vivado (TM) v2020.2 (64-bit)
3
+ #
4
+ # lfsr_4Bit.tcl: Tcl script for re-creating project 'lfsr_4bit'
5
+ #
6
+ # Generated by Vivado on Fri Jul 23 22:17:45 SAST 2021
7
+ # IP Build 3064653 on Wed Nov 18 14:17:31 MST 2020
8
+ #
9
+ # This file contains the Vivado Tcl commands for re-creating the project to the state*
10
+ # when this script was generated. In order to re-create the project, please source this
11
+ # file in the Vivado Tcl Shell.
12
+ #
13
+ # * Note that the runs in the created project will be configured the same way as the
14
+ # original project, however they will not be launched automatically. To regenerate the
15
+ # run results please launch the synthesis/implementation runs as needed.
16
+ #
17
+ #*****************************************************************************************
18
+ # NOTE: In order to use this script for source control purposes, please make sure that the
19
+ # following files are added to the source control system:-
20
+ #
21
+ # 1. This project restoration tcl script (lfsr_4Bit.tcl) that was generated.
22
+ #
23
+ # 2. The following source(s) files that were local or imported into the original project.
24
+ # (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
25
+ #
26
+ # <none>
27
+ #
28
+ # 3. The following remote source files that were added to the original project:-
29
+ #
30
+ # "/home/stacey/git/Examples/LFSR4Bit/src/lfsr_4bit_top.sv"
31
+ # "/home/stacey/git/Examples/LFSR4Bit/xdc/constraints.xdc"
32
+ # "/home/stacey/git/Examples/LFSR4Bit/tb/lfsr_4bit_tb.sv"
33
+ # "/home/stacey/git/Examples/LFSR4Bit/lfsr_4bit_tb_behav.wcfg"
34
+ #
35
+ #*****************************************************************************************
36
+
37
+ # Check file required for this script exists
38
+ proc checkRequiredFiles { origin_dir} {
39
+ set status true
40
+ set files [list \
41
+ "src/lfsr_4bit_top.sv" \
42
+ "xdc/constraints.xdc" \
43
+ "tb/lfsr_4bit_tb.sv" \
44
+ "lfsr_4bit_tb_behav.wcfg" \
45
+ ]
46
+ foreach ifile $files {
47
+ if { ![file isfile $ifile] } {
48
+ puts " Could not find remote file $ifile "
49
+ set status false
50
+ }
51
+ }
52
+
53
+ return $status
54
+ }
55
+ # Set the reference directory for source file relative paths (by default the value is script directory path)
56
+ set origin_dir [file dirname [info script]]
57
+
58
+ # Use origin directory path location variable, if specified in the tcl shell
59
+ if { [info exists ::origin_dir_loc] } {
60
+ set origin_dir $::origin_dir_loc
61
+ }
62
+
63
+ # Set the project name
64
+ set _xil_proj_name_ "lfsr_4bit"
65
+
66
+ # Use project name variable, if specified in the tcl shell
67
+ if { [info exists ::user_project_name] } {
68
+ set _xil_proj_name_ $::user_project_name
69
+ }
70
+
71
+ variable script_file
72
+ set script_file "lfsr_4Bit.tcl"
73
+
74
+ # Help information for this script
75
+ proc print_help {} {
76
+ variable script_file
77
+ puts "\nDescription:"
78
+ puts "Recreate a Vivado project from this script. The created project will be"
79
+ puts "functionally equivalent to the original project for which this script was"
80
+ puts "generated. The script contains commands for creating a project, filesets,"
81
+ puts "runs, adding/importing sources and setting properties on various objects.\n"
82
+ puts "Syntax:"
83
+ puts "$script_file"
84
+ puts "$script_file -tclargs \[--origin_dir <path>\]"
85
+ puts "$script_file -tclargs \[--project_name <name>\]"
86
+ puts "$script_file -tclargs \[--help\]\n"
87
+ puts "Usage:"
88
+ puts "Name Description"
89
+ puts "-------------------------------------------------------------------------"
90
+ puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
91
+ puts " origin_dir path value is \".\", otherwise, the value"
92
+ puts " that was set with the \"-paths_relative_to\" switch"
93
+ puts " when this script was generated.\n"
94
+ puts "\[--project_name <name>\] Create project with the specified name. Default"
95
+ puts " name is the name of the project from where this"
96
+ puts " script was generated.\n"
97
+ puts "\[--help\] Print help information for this script"
98
+ puts "-------------------------------------------------------------------------\n"
99
+ exit 0
100
+ }
101
+
102
+ if { $::argc > 0 } {
103
+ for {set i 0} {$i < $::argc} {incr i} {
104
+ set option [string trim [lindex $::argv $i]]
105
+ switch -regexp -- $option {
106
+ "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
107
+ "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
108
+ "--help" { print_help }
109
+ default {
110
+ if { [regexp {^-} $option] } {
111
+ puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
112
+ return 1
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ # Set the directory path for the original project from where this script was exported
120
+ set orig_proj_dir "[file normalize "$origin_dir/lfsr_4bit"]"
121
+
122
+ # Check for paths and files needed for project creation
123
+ set validate_required 0
124
+ if { $validate_required } {
125
+ if { [checkRequiredFiles $origin_dir] } {
126
+ puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
127
+ } else {
128
+ puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
129
+ return
130
+ }
131
+ }
132
+
133
+ # Create project
134
+ create_project ${_xil_proj_name_} ${origin_dir}/${_xil_proj_name_} -part xc7z010clg400-1
135
+
136
+ # Set the directory path for the new project
137
+ set proj_dir [get_property directory [current_project]]
138
+
139
+ # Set project properties
140
+ set obj [current_project]
141
+ set_property -name "board_part" -value "digilentinc.com:zybo:part0:2.0" -objects $obj
142
+ set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
143
+ set_property -name "enable_vhdl_2008" -value "1" -objects $obj
144
+ set_property -name "ip_cache_permissions" -value "read write" -objects $obj
145
+ set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
146
+ set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
147
+ set_property -name "platform.board_id" -value "zybo" -objects $obj
148
+ set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
149
+ set_property -name "platform.emu_dir" -value "emu" -objects $obj
150
+ set_property -name "platform.uses_pr" -value "1" -objects $obj
151
+ set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
152
+ set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
153
+ set_property -name "simulator_language" -value "Mixed" -objects $obj
154
+ set_property -name "webtalk.xsim_launch_sim" -value "14" -objects $obj
155
+
156
+ # Create 'sources_1' fileset (if not found)
157
+ if {[string equal [get_filesets -quiet sources_1] ""]} {
158
+ create_fileset -srcset sources_1
159
+ }
160
+
161
+ # Set 'sources_1' fileset object
162
+ set obj [get_filesets sources_1]
163
+ set files [list \
164
+ [file normalize "${origin_dir}/src/lfsr_4bit_top.sv"] \
165
+ ]
166
+ add_files -norecurse -fileset $obj $files
167
+
168
+ # Set 'sources_1' fileset file properties for remote files
169
+ set file "$origin_dir/src/lfsr_4bit_top.sv"
170
+ set file [file normalize $file]
171
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
172
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
173
+
174
+
175
+ # Set 'sources_1' fileset file properties for local files
176
+ # None
177
+
178
+ # Set 'sources_1' fileset properties
179
+ set obj [get_filesets sources_1]
180
+ set_property -name "top" -value "lfsr_4bit_top" -objects $obj
181
+ set_property -name "top_auto_set" -value "0" -objects $obj
182
+
183
+ # Create 'constrs_1' fileset (if not found)
184
+ if {[string equal [get_filesets -quiet constrs_1] ""]} {
185
+ create_fileset -constrset constrs_1
186
+ }
187
+
188
+ # Set 'constrs_1' fileset object
189
+ set obj [get_filesets constrs_1]
190
+
191
+ # Add/Import constrs file and set constrs file properties
192
+ set file "[file normalize "$origin_dir/xdc/constraints.xdc"]"
193
+ set file_added [add_files -norecurse -fileset $obj [list $file]]
194
+ set file "$origin_dir/xdc/constraints.xdc"
195
+ set file [file normalize $file]
196
+ set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
197
+ set_property -name "file_type" -value "XDC" -objects $file_obj
198
+
199
+ # Set 'constrs_1' fileset properties
200
+ set obj [get_filesets constrs_1]
201
+
202
+ # Create 'sim_1' fileset (if not found)
203
+ if {[string equal [get_filesets -quiet sim_1] ""]} {
204
+ create_fileset -simset sim_1
205
+ }
206
+
207
+ # Set 'sim_1' fileset object
208
+ set obj [get_filesets sim_1]
209
+ set files [list \
210
+ [file normalize "${origin_dir}/tb/lfsr_4bit_tb.sv"] \
211
+ [file normalize "${origin_dir}/lfsr_4bit_tb_behav.wcfg"] \
212
+ ]
213
+ add_files -norecurse -fileset $obj $files
214
+
215
+ # Set 'sim_1' fileset file properties for remote files
216
+ set file "$origin_dir/tb/lfsr_4bit_tb.sv"
217
+ set file [file normalize $file]
218
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
219
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
220
+
221
+
222
+ # Set 'sim_1' fileset file properties for local files
223
+ # None
224
+
225
+ # Set 'sim_1' fileset properties
226
+ set obj [get_filesets sim_1]
227
+ set_property -name "hbs.configure_design_for_hier_access" -value "1" -objects $obj
228
+ set_property -name "top" -value "lfsr_4bit_tb" -objects $obj
229
+ set_property -name "top_auto_set" -value "0" -objects $obj
230
+ set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
231
+
232
+ # Set 'utils_1' fileset object
233
+ set obj [get_filesets utils_1]
234
+ # Empty (no sources present)
235
+
236
+ # Set 'utils_1' fileset properties
237
+ set obj [get_filesets utils_1]
238
+
239
+ # Create 'synth_1' run (if not found)
240
+ if {[string equal [get_runs -quiet synth_1] ""]} {
241
+ create_run -name synth_1 -part xc7z010clg400-1 -flow {Vivado Synthesis 2018} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
242
+ } else {
243
+ set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
244
+ set_property flow "Vivado Synthesis 2018" [get_runs synth_1]
245
+ }
246
+ set obj [get_runs synth_1]
247
+ set_property set_report_strategy_name 1 $obj
248
+ set_property report_strategy {Vivado Synthesis Default Reports} $obj
249
+ set_property set_report_strategy_name 0 $obj
250
+ # Create 'synth_1_synth_report_utilization_0' report (if not found)
251
+ if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
252
+ create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
253
+ }
254
+ set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
255
+ if { $obj != "" } {
256
+
257
+ }
258
+ set obj [get_runs synth_1]
259
+ set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
260
+
261
+ # set the current synth run
262
+ current_run -synthesis [get_runs synth_1]
263
+
264
+ # Create 'impl_1' run (if not found)
265
+ if {[string equal [get_runs -quiet impl_1] ""]} {
266
+ create_run -name impl_1 -part xc7z010clg400-1 -flow {Vivado Implementation 2018} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
267
+ } else {
268
+ set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
269
+ set_property flow "Vivado Implementation 2018" [get_runs impl_1]
270
+ }
271
+ set obj [get_runs impl_1]
272
+ set_property set_report_strategy_name 1 $obj
273
+ set_property report_strategy {Vivado Implementation Default Reports} $obj
274
+ set_property set_report_strategy_name 0 $obj
275
+ # Create 'impl_1_init_report_timing_summary_0' report (if not found)
276
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
277
+ create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
278
+ }
279
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
280
+ if { $obj != "" } {
281
+ set_property -name "is_enabled" -value "0" -objects $obj
282
+ set_property -name "options.max_paths" -value "10" -objects $obj
283
+
284
+ }
285
+ # Create 'impl_1_opt_report_drc_0' report (if not found)
286
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
287
+ create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
288
+ }
289
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
290
+ if { $obj != "" } {
291
+
292
+ }
293
+ # Create 'impl_1_opt_report_timing_summary_0' report (if not found)
294
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
295
+ create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
296
+ }
297
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
298
+ if { $obj != "" } {
299
+ set_property -name "is_enabled" -value "0" -objects $obj
300
+ set_property -name "options.max_paths" -value "10" -objects $obj
301
+
302
+ }
303
+ # Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
304
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
305
+ create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
306
+ }
307
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
308
+ if { $obj != "" } {
309
+ set_property -name "is_enabled" -value "0" -objects $obj
310
+ set_property -name "options.max_paths" -value "10" -objects $obj
311
+
312
+ }
313
+ # Create 'impl_1_place_report_io_0' report (if not found)
314
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
315
+ create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
316
+ }
317
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
318
+ if { $obj != "" } {
319
+
320
+ }
321
+ # Create 'impl_1_place_report_utilization_0' report (if not found)
322
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
323
+ create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
324
+ }
325
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
326
+ if { $obj != "" } {
327
+
328
+ }
329
+ # Create 'impl_1_place_report_control_sets_0' report (if not found)
330
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
331
+ create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
332
+ }
333
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
334
+ if { $obj != "" } {
335
+ set_property -name "options.verbose" -value "1" -objects $obj
336
+
337
+ }
338
+ # Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
339
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
340
+ create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
341
+ }
342
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
343
+ if { $obj != "" } {
344
+ set_property -name "is_enabled" -value "0" -objects $obj
345
+
346
+ }
347
+ # Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
348
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
349
+ create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
350
+ }
351
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
352
+ if { $obj != "" } {
353
+ set_property -name "is_enabled" -value "0" -objects $obj
354
+
355
+ }
356
+ # Create 'impl_1_place_report_timing_summary_0' report (if not found)
357
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
358
+ create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
359
+ }
360
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
361
+ if { $obj != "" } {
362
+ set_property -name "is_enabled" -value "0" -objects $obj
363
+ set_property -name "options.max_paths" -value "10" -objects $obj
364
+
365
+ }
366
+ # Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
367
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
368
+ create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
369
+ }
370
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
371
+ if { $obj != "" } {
372
+ set_property -name "is_enabled" -value "0" -objects $obj
373
+ set_property -name "options.max_paths" -value "10" -objects $obj
374
+
375
+ }
376
+ # Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
377
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
378
+ create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
379
+ }
380
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
381
+ if { $obj != "" } {
382
+ set_property -name "is_enabled" -value "0" -objects $obj
383
+ set_property -name "options.max_paths" -value "10" -objects $obj
384
+
385
+ }
386
+ # Create 'impl_1_route_report_drc_0' report (if not found)
387
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
388
+ create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
389
+ }
390
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
391
+ if { $obj != "" } {
392
+
393
+ }
394
+ # Create 'impl_1_route_report_methodology_0' report (if not found)
395
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
396
+ create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
397
+ }
398
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
399
+ if { $obj != "" } {
400
+
401
+ }
402
+ # Create 'impl_1_route_report_power_0' report (if not found)
403
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
404
+ create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
405
+ }
406
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
407
+ if { $obj != "" } {
408
+
409
+ }
410
+ # Create 'impl_1_route_report_route_status_0' report (if not found)
411
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
412
+ create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
413
+ }
414
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
415
+ if { $obj != "" } {
416
+
417
+ }
418
+ # Create 'impl_1_route_report_timing_summary_0' report (if not found)
419
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
420
+ create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
421
+ }
422
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
423
+ if { $obj != "" } {
424
+ set_property -name "options.max_paths" -value "10" -objects $obj
425
+
426
+ }
427
+ # Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
428
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
429
+ create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
430
+ }
431
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
432
+ if { $obj != "" } {
433
+
434
+ }
435
+ # Create 'impl_1_route_report_clock_utilization_0' report (if not found)
436
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
437
+ create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
438
+ }
439
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
440
+ if { $obj != "" } {
441
+
442
+ }
443
+ # Create 'impl_1_route_report_bus_skew_0' report (if not found)
444
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
445
+ create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
446
+ }
447
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
448
+ if { $obj != "" } {
449
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
450
+
451
+ }
452
+ # Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
453
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
454
+ create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
455
+ }
456
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
457
+ if { $obj != "" } {
458
+ set_property -name "options.max_paths" -value "10" -objects $obj
459
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
460
+
461
+ }
462
+ # Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
463
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
464
+ create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
465
+ }
466
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
467
+ if { $obj != "" } {
468
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
469
+
470
+ }
471
+ set obj [get_runs impl_1]
472
+ set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
473
+ set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
474
+ set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
475
+
476
+ # set the current impl run
477
+ current_run -implementation [get_runs impl_1]
478
+
479
+ puts "INFO: Project created:${_xil_proj_name_}"
480
+ # Create 'drc_1' gadget (if not found)
481
+ if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
482
+ create_dashboard_gadget -name {drc_1} -type drc
483
+ }
484
+ set obj [get_dashboard_gadgets [ list "drc_1" ] ]
485
+ set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
486
+
487
+ # Create 'methodology_1' gadget (if not found)
488
+ if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
489
+ create_dashboard_gadget -name {methodology_1} -type methodology
490
+ }
491
+ set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
492
+ set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
493
+
494
+ # Create 'power_1' gadget (if not found)
495
+ if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
496
+ create_dashboard_gadget -name {power_1} -type power
497
+ }
498
+ set obj [get_dashboard_gadgets [ list "power_1" ] ]
499
+ set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
500
+
501
+ # Create 'timing_1' gadget (if not found)
502
+ if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
503
+ create_dashboard_gadget -name {timing_1} -type timing
504
+ }
505
+ set obj [get_dashboard_gadgets [ list "timing_1" ] ]
506
+ set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
507
+
508
+ # Create 'utilization_1' gadget (if not found)
509
+ if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
510
+ create_dashboard_gadget -name {utilization_1} -type utilization
511
+ }
512
+ set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
513
+ set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
514
+ set_property -name "run.step" -value "synth_design" -objects $obj
515
+ set_property -name "run.type" -value "synthesis" -objects $obj
516
+
517
+ # Create 'utilization_2' gadget (if not found)
518
+ if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
519
+ create_dashboard_gadget -name {utilization_2} -type utilization
520
+ }
521
+ set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
522
+ set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
523
+
524
+ move_dashboard_gadget -name {utilization_1} -row 0 -col 0
525
+ move_dashboard_gadget -name {power_1} -row 1 -col 0
526
+ move_dashboard_gadget -name {drc_1} -row 2 -col 0
527
+ move_dashboard_gadget -name {timing_1} -row 0 -col 1
528
+ move_dashboard_gadget -name {utilization_2} -row 1 -col 1
529
+ move_dashboard_gadget -name {methodology_1} -row 2 -col 1
HDLForBeginners_Examples/LFSR4Bit/src/lfsr_4bit_top.sv ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: lfsr_4bit
8
+ // Module Name: lfsr_4bit_top
9
+ // Project Name: lfsr_4bit
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // Increments a counter and and drives an output gpio pin
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+
24
+ module lfsr_4bit_top(
25
+ input clk,
26
+ input rst,
27
+ output logic led
28
+ );
29
+
30
+
31
+ logic [3:0] lfsr;
32
+
33
+ always @(posedge clk)
34
+ begin
35
+ if(rst) begin
36
+ lfsr <= 4'b1111;
37
+
38
+ end
39
+ else begin
40
+ lfsr[3] <= lfsr[2];
41
+ lfsr[2] <= lfsr[1];
42
+ lfsr[1] <= lfsr[0];
43
+ lfsr[0] <= lfsr[2]^lfsr[3];
44
+ end
45
+ end
46
+
47
+
48
+ assign led = (lfsr > 4'd10) ? 1'b1 : 1'b0;
49
+
50
+ endmodule
HDLForBeginners_Examples/LFSR4Bit/tb/lfsr_4bit_tb.sv ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 14.07.2021 18:18:52
7
+ // Design Name:
8
+ // Module Name: simple_increment_tb
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+ module lfsr_4bit_tb(
23
+
24
+ );
25
+
26
+ logic clk = 0;
27
+ logic rst = 1;
28
+ logic led;
29
+
30
+
31
+ // Clock definition
32
+ localparam CLK_PERIOD = 20000; // 50 Mhz (counter is in ps)
33
+ localparam RST_COUNT = 10; //Clock cycles that reset is high
34
+
35
+ always begin
36
+ clk = #(CLK_PERIOD/2) ~clk;
37
+ end
38
+
39
+ // reset definition
40
+ initial begin
41
+ rst = 1;
42
+ #(RST_COUNT*CLK_PERIOD);
43
+ @(posedge clk);
44
+ rst = 0;
45
+ end
46
+
47
+ lfsr_4bit_top
48
+ lfsr_4bit_top_i
49
+ (
50
+ .clk(clk),
51
+ .rst(rst),
52
+ .led(led)
53
+
54
+ );
55
+
56
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/NexysBaseProject.tcl ADDED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #*****************************************************************************************
2
+ # Vivado (TM) v2020.2 (64-bit)
3
+ #
4
+ # NexysBaseProject.tcl: Tcl script for re-creating project 'NexysBaseProject'
5
+ #
6
+ # Generated by Vivado on Sat Nov 20 12:22:43 SAST 2021
7
+ # IP Build 3064653 on Wed Nov 18 14:17:31 MST 2020
8
+ #
9
+ # This file contains the Vivado Tcl commands for re-creating the project to the state*
10
+ # when this script was generated. In order to re-create the project, please source this
11
+ # file in the Vivado Tcl Shell.
12
+ #
13
+ # * Note that the runs in the created project will be configured the same way as the
14
+ # original project, however they will not be launched automatically. To regenerate the
15
+ # run results please launch the synthesis/implementation runs as needed.
16
+ #
17
+ #*****************************************************************************************
18
+ # NOTE: In order to use this script for source control purposes, please make sure that the
19
+ # following files are added to the source control system:-
20
+ #
21
+ # 1. This project restoration tcl script (NexysBaseProject.tcl) that was generated.
22
+ #
23
+ # 2. The following source(s) files that were local or imported into the original project.
24
+ # (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
25
+ #
26
+ # <none>
27
+ #
28
+ # 3. The following remote source files that were added to the original project:-
29
+ #
30
+ # "ip/clk_wiz_0/clk_wiz_0.xci"
31
+ # "src/debounce.sv"
32
+ # "src/edge_detect.sv"
33
+ # "src/eth_rst_gen.sv"
34
+ # "src/rst_gen.sv"
35
+ # "src/NexysBaseProject_top.sv"
36
+ # "xdc/Nexys-A7-100T-Master.xdc"
37
+ # "tb/NexysBaseProject_tb.sv"
38
+ #
39
+ #*****************************************************************************************
40
+
41
+ # Check file required for this script exists
42
+ proc checkRequiredFiles { origin_dir} {
43
+ set status true
44
+ set files [list \
45
+ "ip/clk_wiz_0/clk_wiz_0.xci" \
46
+ "src/debounce.sv" \
47
+ "src/edge_detect.sv" \
48
+ "src/eth_rst_gen.sv" \
49
+ "src/rst_gen.sv" \
50
+ "src/NexysBaseProject_top.sv" \
51
+ "xdc/Nexys-A7-100T-Master.xdc" \
52
+ "tb/NexysBaseProject_tb.sv" \
53
+ ]
54
+ foreach ifile $files {
55
+ if { ![file isfile $ifile] } {
56
+ puts " Could not find remote file $ifile "
57
+ set status false
58
+ }
59
+ }
60
+
61
+ return $status
62
+ }
63
+ # Set the reference directory for source file relative paths (by default the value is script directory path)
64
+ set origin_dir [file dirname [info script]]
65
+
66
+ # Use origin directory path location variable, if specified in the tcl shell
67
+ if { [info exists ::origin_dir_loc] } {
68
+ set origin_dir $::origin_dir_loc
69
+ }
70
+
71
+ # Set the project name
72
+ set _xil_proj_name_ "NexysBaseProject"
73
+
74
+ # Use project name variable, if specified in the tcl shell
75
+ if { [info exists ::user_project_name] } {
76
+ set _xil_proj_name_ $::user_project_name
77
+ }
78
+
79
+ variable script_file
80
+ set script_file "NexysBaseProject.tcl"
81
+
82
+ # Help information for this script
83
+ proc print_help {} {
84
+ variable script_file
85
+ puts "\nDescription:"
86
+ puts "Recreate a Vivado project from this script. The created project will be"
87
+ puts "functionally equivalent to the original project for which this script was"
88
+ puts "generated. The script contains commands for creating a project, filesets,"
89
+ puts "runs, adding/importing sources and setting properties on various objects.\n"
90
+ puts "Syntax:"
91
+ puts "$script_file"
92
+ puts "$script_file -tclargs \[--origin_dir <path>\]"
93
+ puts "$script_file -tclargs \[--project_name <name>\]"
94
+ puts "$script_file -tclargs \[--help\]\n"
95
+ puts "Usage:"
96
+ puts "Name Description"
97
+ puts "-------------------------------------------------------------------------"
98
+ puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
99
+ puts " origin_dir path value is \".\", otherwise, the value"
100
+ puts " that was set with the \"-paths_relative_to\" switch"
101
+ puts " when this script was generated.\n"
102
+ puts "\[--project_name <name>\] Create project with the specified name. Default"
103
+ puts " name is the name of the project from where this"
104
+ puts " script was generated.\n"
105
+ puts "\[--help\] Print help information for this script"
106
+ puts "-------------------------------------------------------------------------\n"
107
+ exit 0
108
+ }
109
+
110
+ if { $::argc > 0 } {
111
+ for {set i 0} {$i < $::argc} {incr i} {
112
+ set option [string trim [lindex $::argv $i]]
113
+ switch -regexp -- $option {
114
+ "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
115
+ "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
116
+ "--help" { print_help }
117
+ default {
118
+ if { [regexp {^-} $option] } {
119
+ puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
120
+ return 1
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ # Set the directory path for the original project from where this script was exported
128
+ set orig_proj_dir "[file normalize "$origin_dir/NexysBaseProject"]"
129
+
130
+ # Check for paths and files needed for project creation
131
+ set validate_required 0
132
+ if { $validate_required } {
133
+ if { [checkRequiredFiles $origin_dir] } {
134
+ puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
135
+ } else {
136
+ puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
137
+ return
138
+ }
139
+ }
140
+
141
+ # Create project
142
+ create_project ${_xil_proj_name_} ${origin_dir}/${_xil_proj_name_} -part xc7z010clg400-1
143
+
144
+ # Set the directory path for the new project
145
+ set proj_dir [get_property directory [current_project]]
146
+
147
+ # Set project properties
148
+ set obj [current_project]
149
+ set_property -name "board_part" -value "digilentinc.com:nexys-a7-100t:part0:1.0" -objects $obj
150
+ set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
151
+ set_property -name "enable_vhdl_2008" -value "1" -objects $obj
152
+ set_property -name "ip_cache_permissions" -value "read write" -objects $obj
153
+ set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
154
+ set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
155
+ set_property -name "platform.board_id" -value "nexys-a7-100t" -objects $obj
156
+ set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
157
+ set_property -name "platform.emu_dir" -value "emu" -objects $obj
158
+ set_property -name "platform.uses_pr" -value "1" -objects $obj
159
+ set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
160
+ set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
161
+ set_property -name "simulator_language" -value "Mixed" -objects $obj
162
+ set_property -name "webtalk.activehdl_export_sim" -value "8" -objects $obj
163
+ set_property -name "webtalk.ies_export_sim" -value "8" -objects $obj
164
+ set_property -name "webtalk.modelsim_export_sim" -value "8" -objects $obj
165
+ set_property -name "webtalk.questa_export_sim" -value "8" -objects $obj
166
+ set_property -name "webtalk.riviera_export_sim" -value "8" -objects $obj
167
+ set_property -name "webtalk.vcs_export_sim" -value "8" -objects $obj
168
+ set_property -name "webtalk.xcelium_export_sim" -value "6" -objects $obj
169
+ set_property -name "webtalk.xsim_export_sim" -value "8" -objects $obj
170
+ set_property -name "webtalk.xsim_launch_sim" -value "42" -objects $obj
171
+ set_property -name "xpm_libraries" -value "XPM_CDC" -objects $obj
172
+
173
+ # Create 'sources_1' fileset (if not found)
174
+ if {[string equal [get_filesets -quiet sources_1] ""]} {
175
+ create_fileset -srcset sources_1
176
+ }
177
+
178
+ # Set 'sources_1' fileset object
179
+ set obj [get_filesets sources_1]
180
+ set files [list \
181
+ [file normalize "${origin_dir}/ip/clk_wiz_0/clk_wiz_0.xci"] \
182
+ [file normalize "${origin_dir}/src/debounce.sv"] \
183
+ [file normalize "${origin_dir}/src/edge_detect.sv"] \
184
+ [file normalize "${origin_dir}/src/eth_rst_gen.sv"] \
185
+ [file normalize "${origin_dir}/src/rst_gen.sv"] \
186
+ [file normalize "${origin_dir}/src/NexysBaseProject_top.sv"] \
187
+ ]
188
+ add_files -norecurse -fileset $obj $files
189
+
190
+ # Set 'sources_1' fileset file properties for remote files
191
+ set file "$origin_dir/ip/clk_wiz_0/clk_wiz_0.xci"
192
+ set file [file normalize $file]
193
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
194
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
195
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
196
+ if { ![get_property "is_locked" $file_obj] } {
197
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
198
+ }
199
+
200
+ set file "$origin_dir/src/debounce.sv"
201
+ set file [file normalize $file]
202
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
203
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
204
+
205
+ set file "$origin_dir/src/edge_detect.sv"
206
+ set file [file normalize $file]
207
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
208
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
209
+
210
+ set file "$origin_dir/src/eth_rst_gen.sv"
211
+ set file [file normalize $file]
212
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
213
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
214
+
215
+ set file "$origin_dir/src/rst_gen.sv"
216
+ set file [file normalize $file]
217
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
218
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
219
+
220
+ set file "$origin_dir/src/NexysBaseProject_top.sv"
221
+ set file [file normalize $file]
222
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
223
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
224
+
225
+
226
+ # Set 'sources_1' fileset file properties for local files
227
+ # None
228
+
229
+ # Set 'sources_1' fileset properties
230
+ set obj [get_filesets sources_1]
231
+ set_property -name "top" -value "NexysBaseProject_top" -objects $obj
232
+ set_property -name "top_auto_set" -value "0" -objects $obj
233
+
234
+ # Create 'constrs_1' fileset (if not found)
235
+ if {[string equal [get_filesets -quiet constrs_1] ""]} {
236
+ create_fileset -constrset constrs_1
237
+ }
238
+
239
+ # Set 'constrs_1' fileset object
240
+ set obj [get_filesets constrs_1]
241
+
242
+ # Add/Import constrs file and set constrs file properties
243
+ set file "[file normalize "$origin_dir/xdc/Nexys-A7-100T-Master.xdc"]"
244
+ set file_added [add_files -norecurse -fileset $obj [list $file]]
245
+ set file "$origin_dir/xdc/Nexys-A7-100T-Master.xdc"
246
+ set file [file normalize $file]
247
+ set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
248
+ set_property -name "file_type" -value "XDC" -objects $file_obj
249
+
250
+ # Set 'constrs_1' fileset properties
251
+ set obj [get_filesets constrs_1]
252
+
253
+ # Create 'sim_1' fileset (if not found)
254
+ if {[string equal [get_filesets -quiet sim_1] ""]} {
255
+ create_fileset -simset sim_1
256
+ }
257
+
258
+ # Set 'sim_1' fileset object
259
+ set obj [get_filesets sim_1]
260
+ set files [list \
261
+ [file normalize "${origin_dir}/tb/NexysBaseProject_tb.sv"] \
262
+ ]
263
+ add_files -norecurse -fileset $obj $files
264
+
265
+ # Set 'sim_1' fileset file properties for remote files
266
+ set file "$origin_dir/tb/NexysBaseProject_tb.sv"
267
+ set file [file normalize $file]
268
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
269
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
270
+
271
+
272
+ # Set 'sim_1' fileset file properties for local files
273
+ # None
274
+
275
+ # Set 'sim_1' fileset properties
276
+ set obj [get_filesets sim_1]
277
+ set_property -name "hbs.configure_design_for_hier_access" -value "1" -objects $obj
278
+ set_property -name "top" -value "NexysBaseProject_tb" -objects $obj
279
+ set_property -name "top_auto_set" -value "0" -objects $obj
280
+ set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
281
+
282
+ # Set 'utils_1' fileset object
283
+ set obj [get_filesets utils_1]
284
+ # Empty (no sources present)
285
+
286
+ # Set 'utils_1' fileset properties
287
+ set obj [get_filesets utils_1]
288
+
289
+ # Create 'synth_1' run (if not found)
290
+ if {[string equal [get_runs -quiet synth_1] ""]} {
291
+ create_run -name synth_1 -part xc7a100tcsg324-1 -flow {Vivado Synthesis 2018} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
292
+ } else {
293
+ set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
294
+ set_property flow "Vivado Synthesis 2018" [get_runs synth_1]
295
+ }
296
+ set obj [get_runs synth_1]
297
+ set_property set_report_strategy_name 1 $obj
298
+ set_property report_strategy {Vivado Synthesis Default Reports} $obj
299
+ set_property set_report_strategy_name 0 $obj
300
+ # Create 'synth_1_synth_report_utilization_0' report (if not found)
301
+ if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
302
+ create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
303
+ }
304
+ set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
305
+ if { $obj != "" } {
306
+
307
+ }
308
+ set obj [get_runs synth_1]
309
+ set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
310
+
311
+ # set the current synth run
312
+ current_run -synthesis [get_runs synth_1]
313
+
314
+ # Create 'impl_1' run (if not found)
315
+ if {[string equal [get_runs -quiet impl_1] ""]} {
316
+ create_run -name impl_1 -part xc7a100tcsg324-1 -flow {Vivado Implementation 2018} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
317
+ } else {
318
+ set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
319
+ set_property flow "Vivado Implementation 2018" [get_runs impl_1]
320
+ }
321
+ set obj [get_runs impl_1]
322
+ set_property set_report_strategy_name 1 $obj
323
+ set_property report_strategy {Vivado Implementation Default Reports} $obj
324
+ set_property set_report_strategy_name 0 $obj
325
+ # Create 'impl_1_init_report_timing_summary_0' report (if not found)
326
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
327
+ create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
328
+ }
329
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
330
+ if { $obj != "" } {
331
+ set_property -name "is_enabled" -value "0" -objects $obj
332
+ set_property -name "options.max_paths" -value "10" -objects $obj
333
+
334
+ }
335
+ # Create 'impl_1_opt_report_drc_0' report (if not found)
336
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
337
+ create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
338
+ }
339
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
340
+ if { $obj != "" } {
341
+
342
+ }
343
+ # Create 'impl_1_opt_report_timing_summary_0' report (if not found)
344
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
345
+ create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
346
+ }
347
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
348
+ if { $obj != "" } {
349
+ set_property -name "is_enabled" -value "0" -objects $obj
350
+ set_property -name "options.max_paths" -value "10" -objects $obj
351
+
352
+ }
353
+ # Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
354
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
355
+ create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
356
+ }
357
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
358
+ if { $obj != "" } {
359
+ set_property -name "is_enabled" -value "0" -objects $obj
360
+ set_property -name "options.max_paths" -value "10" -objects $obj
361
+
362
+ }
363
+ # Create 'impl_1_place_report_io_0' report (if not found)
364
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
365
+ create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
366
+ }
367
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
368
+ if { $obj != "" } {
369
+
370
+ }
371
+ # Create 'impl_1_place_report_utilization_0' report (if not found)
372
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
373
+ create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
374
+ }
375
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
376
+ if { $obj != "" } {
377
+
378
+ }
379
+ # Create 'impl_1_place_report_control_sets_0' report (if not found)
380
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
381
+ create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
382
+ }
383
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
384
+ if { $obj != "" } {
385
+ set_property -name "options.verbose" -value "1" -objects $obj
386
+
387
+ }
388
+ # Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
389
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
390
+ create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
391
+ }
392
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
393
+ if { $obj != "" } {
394
+ set_property -name "is_enabled" -value "0" -objects $obj
395
+
396
+ }
397
+ # Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
398
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
399
+ create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
400
+ }
401
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
402
+ if { $obj != "" } {
403
+ set_property -name "is_enabled" -value "0" -objects $obj
404
+
405
+ }
406
+ # Create 'impl_1_place_report_timing_summary_0' report (if not found)
407
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
408
+ create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
409
+ }
410
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
411
+ if { $obj != "" } {
412
+ set_property -name "is_enabled" -value "0" -objects $obj
413
+ set_property -name "options.max_paths" -value "10" -objects $obj
414
+
415
+ }
416
+ # Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
417
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
418
+ create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
419
+ }
420
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
421
+ if { $obj != "" } {
422
+ set_property -name "is_enabled" -value "0" -objects $obj
423
+ set_property -name "options.max_paths" -value "10" -objects $obj
424
+
425
+ }
426
+ # Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
427
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
428
+ create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
429
+ }
430
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
431
+ if { $obj != "" } {
432
+ set_property -name "is_enabled" -value "0" -objects $obj
433
+ set_property -name "options.max_paths" -value "10" -objects $obj
434
+
435
+ }
436
+ # Create 'impl_1_route_report_drc_0' report (if not found)
437
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
438
+ create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
439
+ }
440
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
441
+ if { $obj != "" } {
442
+
443
+ }
444
+ # Create 'impl_1_route_report_methodology_0' report (if not found)
445
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
446
+ create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
447
+ }
448
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
449
+ if { $obj != "" } {
450
+
451
+ }
452
+ # Create 'impl_1_route_report_power_0' report (if not found)
453
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
454
+ create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
455
+ }
456
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
457
+ if { $obj != "" } {
458
+
459
+ }
460
+ # Create 'impl_1_route_report_route_status_0' report (if not found)
461
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
462
+ create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
463
+ }
464
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
465
+ if { $obj != "" } {
466
+
467
+ }
468
+ # Create 'impl_1_route_report_timing_summary_0' report (if not found)
469
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
470
+ create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
471
+ }
472
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
473
+ if { $obj != "" } {
474
+ set_property -name "options.max_paths" -value "10" -objects $obj
475
+
476
+ }
477
+ # Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
478
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
479
+ create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
480
+ }
481
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
482
+ if { $obj != "" } {
483
+
484
+ }
485
+ # Create 'impl_1_route_report_clock_utilization_0' report (if not found)
486
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
487
+ create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
488
+ }
489
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
490
+ if { $obj != "" } {
491
+
492
+ }
493
+ # Create 'impl_1_route_report_bus_skew_0' report (if not found)
494
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
495
+ create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
496
+ }
497
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
498
+ if { $obj != "" } {
499
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
500
+
501
+ }
502
+ # Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
503
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
504
+ create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
505
+ }
506
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
507
+ if { $obj != "" } {
508
+ set_property -name "options.max_paths" -value "10" -objects $obj
509
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
510
+
511
+ }
512
+ # Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
513
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
514
+ create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
515
+ }
516
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
517
+ if { $obj != "" } {
518
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
519
+
520
+ }
521
+ set obj [get_runs impl_1]
522
+ set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
523
+ set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
524
+ set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
525
+
526
+ # set the current impl run
527
+ current_run -implementation [get_runs impl_1]
528
+
529
+ puts "INFO: Project created:${_xil_proj_name_}"
530
+ # Create 'drc_1' gadget (if not found)
531
+ if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
532
+ create_dashboard_gadget -name {drc_1} -type drc
533
+ }
534
+ set obj [get_dashboard_gadgets [ list "drc_1" ] ]
535
+ set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
536
+
537
+ # Create 'methodology_1' gadget (if not found)
538
+ if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
539
+ create_dashboard_gadget -name {methodology_1} -type methodology
540
+ }
541
+ set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
542
+ set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
543
+
544
+ # Create 'power_1' gadget (if not found)
545
+ if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
546
+ create_dashboard_gadget -name {power_1} -type power
547
+ }
548
+ set obj [get_dashboard_gadgets [ list "power_1" ] ]
549
+ set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
550
+
551
+ # Create 'timing_1' gadget (if not found)
552
+ if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
553
+ create_dashboard_gadget -name {timing_1} -type timing
554
+ }
555
+ set obj [get_dashboard_gadgets [ list "timing_1" ] ]
556
+ set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
557
+
558
+ # Create 'utilization_1' gadget (if not found)
559
+ if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
560
+ create_dashboard_gadget -name {utilization_1} -type utilization
561
+ }
562
+ set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
563
+ set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
564
+ set_property -name "run.step" -value "synth_design" -objects $obj
565
+ set_property -name "run.type" -value "synthesis" -objects $obj
566
+
567
+ # Create 'utilization_2' gadget (if not found)
568
+ if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
569
+ create_dashboard_gadget -name {utilization_2} -type utilization
570
+ }
571
+ set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
572
+ set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
573
+
574
+ move_dashboard_gadget -name {utilization_1} -row 0 -col 0
575
+ move_dashboard_gadget -name {power_1} -row 1 -col 0
576
+ move_dashboard_gadget -name {drc_1} -row 2 -col 0
577
+ move_dashboard_gadget -name {timing_1} -row 0 -col 1
578
+ move_dashboard_gadget -name {utilization_2} -row 1 -col 1
579
+ move_dashboard_gadget -name {methodology_1} -row 2 -col 1
HDLForBeginners_Examples/NexysBaseProject/src/NexysBaseProject_top.sv ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //////////////////////////////////////////////////////////////////////////////////
2
+ // Company:
3
+ // Engineer:
4
+ //
5
+ // Create Date: 14.07.2021 18:18:52
6
+ // Design Name:
7
+ // Module Name: NexysBaseProject_top
8
+ // Project Name:
9
+ // Target Devices:
10
+ // Tool Versions:
11
+ // Description:
12
+ //
13
+ // Dependencies:
14
+ //
15
+ // Revision:
16
+ // Revision 0.01 - File Created
17
+ // Additional Comments:
18
+ //
19
+ //////////////////////////////////////////////////////////////////////////////////
20
+
21
+ `include "../src/version.vh"
22
+
23
+ module NexysBaseProject_top
24
+ (
25
+ input CLK,
26
+ input RST_N,
27
+
28
+ // // Switches
29
+ // input [15:0] SW,
30
+ input BTNC,
31
+ // input BTNU,
32
+ // input BTNL,
33
+ // input BTNR,
34
+ // input BTND,
35
+
36
+ // // PMOD headers
37
+ // // Can be both inputs and outputs
38
+ // // Set to input to be safe
39
+ // input [10:1] JA,
40
+ // input [10:1] JB,
41
+ // input [10:1] JC,
42
+ // input [10:1] JD,
43
+ // input [4:1] XA_N,
44
+ // input [4:1] XA_P,
45
+
46
+ // // LEDs
47
+ // output [15:0] LED,
48
+ // output LED16_B,
49
+ // output LED16_G,
50
+ // output LED16_R,
51
+ // output LED17_B,
52
+ // output LED17_G,
53
+ // output LED17_R,
54
+
55
+ // //7 segment display
56
+ // output CA,
57
+ // output CB,
58
+ // output CC,
59
+ // output CD,
60
+ // output CE,
61
+ // output CF,
62
+ // output CG,
63
+ // output DP,
64
+ // output [7:0] AN,
65
+
66
+ // // VGA
67
+ // output [3:0] VGA_R,
68
+ // output [3:0] VGA_G,
69
+ // output [3:0] VGA_B,
70
+ // output VGA_HS,
71
+ // output VGA_VS,
72
+
73
+ // // SD Card
74
+ // output SD_RESET,
75
+ // input SD_CD,
76
+ // inout SD_SCK,
77
+ // inout SD_CMD,
78
+ // inout [3:0] SD_DAT,
79
+
80
+ // // Accelerometer
81
+ // input ACL_MISO,
82
+ // output ACL_MOSI,
83
+ // output ACL_SCLK,
84
+ // output ACL_CSN,
85
+ // input [2:1] ACL_INT,
86
+
87
+ // // Temperature Sensor
88
+ // output TMP_SCL,
89
+ // inout TMP_SDA,
90
+ // input TMP_INT,
91
+ // input TMP_CT,
92
+
93
+ // // Microphone
94
+ // output M_CLK,
95
+ // input M_DATA,
96
+ // output M_LRSEL,
97
+
98
+ // // PWM Audio Amplifier
99
+ // output AUD_PWM,
100
+ // output AUD_SD,
101
+
102
+ // // UART
103
+ // input UART_TXD_IN,
104
+ // input UART_RTS,
105
+ // output UART_RXD_OUT,
106
+ // output UART_CTS,
107
+
108
+ // // USB HID
109
+ // inout PS2_CLK,
110
+ // inout PS2_DATA,
111
+
112
+ // // Ethernet
113
+ // output ETH_MDC,
114
+ // inout ETH_MDIO,
115
+ output ETH_RSTN,
116
+ // inout ETH_CRSDV,
117
+ // input ETH_RXERR,
118
+ // inout [1:0] ETH_RXD,
119
+ // output ETH_TXEN,
120
+ // output [1:0] ETH_TXD,
121
+ output ETH_REFCLK
122
+ // input ETH_INTN
123
+
124
+ // // QSPI Flash
125
+ // output QSPI_CSN,
126
+ // inout [3:0] QSPI_DQ
127
+
128
+
129
+
130
+ );
131
+
132
+ // Reset Generate
133
+ logic rst;
134
+
135
+ rst_gen rst_gen_i
136
+ (
137
+ .clk_in(CLK),
138
+ .rst_in(~RST_N),
139
+ .rst_out(rst)
140
+
141
+ );
142
+
143
+ // Ethernet clk and reset generate
144
+ logic eth_clk;
145
+ logic eth_rst;
146
+
147
+ eth_rst_gen eth_rst_gen_i
148
+ (
149
+ .clk(CLK),
150
+ .rst(rst),
151
+ .eth_clk_out(eth_clk),
152
+ .eth_rst_out(eth_rst),
153
+ .ETH_REFCLK(ETH_REFCLK),
154
+ .ETH_RSTN(ETH_RSTN)
155
+ );
156
+
157
+ // Debounce on buttons
158
+ logic btn_c_debounce;
159
+ logic btn_c_i;
160
+ logic count_en;
161
+
162
+ debounce debounce_sw
163
+ (
164
+ .clk(clk),
165
+ .rst(~rst_n),
166
+ .sw_in(BTNC),
167
+ .sw_out(btn_c_debounce)
168
+ );
169
+
170
+ edge_detect edge_detect_i
171
+ (
172
+ .clk(clk),
173
+ .rst(~rst_n),
174
+ .data_in(btn_c_debounce),
175
+ .data_out(btn_c_i)
176
+ );
177
+
178
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/src/debounce.sv ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 13:30:52
7
+ // Design Name:
8
+ // Module Name: debounce
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module debounce
24
+ (
25
+ input clk,
26
+ input rst,
27
+ input sw_in,
28
+ output sw_out
29
+ );
30
+
31
+ localparam DEBOUNCE_LENGTH = 10;
32
+ logic [DEBOUNCE_LENGTH-1:0] sw_in_q;
33
+ logic sw_out_i;
34
+ logic [DEBOUNCE_LENGTH-1:0] ones;
35
+ assign ones = '1;
36
+
37
+ always_ff@(posedge clk) begin
38
+ if (rst==1) begin
39
+ sw_in_q <= 0;
40
+ sw_out_i <= 0;
41
+
42
+ end
43
+ else begin
44
+ sw_in_q[0] <= sw_in;
45
+ sw_in_q[DEBOUNCE_LENGTH-1:1] <= sw_in_q[DEBOUNCE_LENGTH-2:0];
46
+
47
+ // if history is all ones and previously off, turn on
48
+ if ((sw_in_q == ones) && (sw_out_i == 0)) begin
49
+ sw_out_i <= 1;
50
+
51
+ end
52
+
53
+ // if history is all 0s and previously on, turn off
54
+ if ((sw_in_q == 0) && (sw_out_i == 1)) begin
55
+ sw_out_i <= 0;
56
+
57
+ end
58
+
59
+ end
60
+ end
61
+
62
+ assign sw_out = sw_out_i;
63
+
64
+
65
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/src/edge_detect.sv ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:00:19
7
+ // Design Name:
8
+ // Module Name: edge_detect
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module edge_detect(
24
+ input clk,
25
+ input rst,
26
+ input data_in,
27
+ output data_out
28
+ );
29
+
30
+
31
+ logic data_in_q;
32
+
33
+ always_ff@(posedge clk) begin
34
+ if (rst) begin
35
+ data_in_q <= 0;
36
+ end
37
+ else begin
38
+ data_in_q <= data_in;
39
+
40
+ end
41
+ end
42
+
43
+ assign data_out = (data_in != data_in_q) ? data_in : 0;
44
+
45
+
46
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/src/eth_rst_gen.sv ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: eth_rst_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module eth_rst_gen(
24
+ input clk,
25
+ input rst,
26
+ output eth_clk_out,
27
+ output eth_rst_out,
28
+ output ETH_REFCLK,
29
+ output ETH_RSTN
30
+ );
31
+
32
+ logic locked;
33
+ logic eth_rst;
34
+ logic eth_clk;
35
+
36
+
37
+ // 50M clk gen
38
+ clk_wiz_0 gen_50M
39
+ (
40
+ .clk_out1(eth_clk), // output clk_out1
41
+ .clk_out2(ETH_REFCLK), // output clk_out2
42
+ .reset(rst), // input reset
43
+ .locked(locked), // output locked
44
+ .clk_in1(clk)); // input clk_in1
45
+
46
+
47
+ localparam WAIT_CYCLES_50M = 2000000; // 40ms
48
+ logic [31:0] wait_counter_50M;
49
+
50
+ // Generate output reset signals in 50M domain
51
+ always_ff@(posedge eth_clk) begin
52
+ // remain in reset until global reset is released
53
+ if (rst) begin
54
+ eth_rst <= 1;
55
+ wait_counter_50M <= 0;
56
+ end
57
+ else begin
58
+ // PLL locked
59
+ if (locked) begin
60
+ // remain in rst till counter is done
61
+ if (wait_counter_50M < WAIT_CYCLES_50M-1) begin
62
+ eth_rst <= 1;
63
+ wait_counter_50M <= wait_counter_50M + 1;
64
+ end
65
+ else begin
66
+ eth_rst <= 0;
67
+ end
68
+ end
69
+ // PLL not locked. Remain in reset until locked
70
+ else begin
71
+ eth_rst <= 1;
72
+ wait_counter_50M <= 0;
73
+
74
+
75
+ end
76
+ end
77
+ end
78
+
79
+ assign ETH_RSTN = ~eth_rst;
80
+ assign eth_clk_out = eth_clk;
81
+ assign eth_rst_out = eth_rst;
82
+
83
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/src/rst_gen.sv ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 13.11.2021 14:32:12
7
+ // Design Name:
8
+ // Module Name: rst_gen
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module rst_gen(
24
+ input clk_in,
25
+ input rst_in,
26
+ output rst_out
27
+
28
+ );
29
+
30
+ logic [2:0] rst_q;
31
+
32
+
33
+ // Triple Register into clk_in domain
34
+ always_ff@(posedge clk_in) begin
35
+ rst_q[0] <= rst_in;
36
+ rst_q[2:1] <= rst_q[1:0];
37
+
38
+ end
39
+
40
+ // internal reset
41
+ // only come out of reset when rst_q is all zeros
42
+ assign rst_out = (rst_q == 0) ? 0 : 1;
43
+
44
+
45
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/src/version.vh ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ `define VERSION_MAJOR 1
2
+ `define VERSION_MINOR 1
HDLForBeginners_Examples/NexysBaseProject/tb/NexysBaseProject_tb.sv ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 14.07.2021 18:18:52
7
+ // Design Name:
8
+ // Module Name: NexysBaseProject_tb
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+ module NexysBaseProject_tb
23
+ (
24
+
25
+ );
26
+
27
+ logic clk = 0;
28
+ logic rst = 1;
29
+
30
+ // Clock definition
31
+ localparam CLK_PERIOD = 10; // 100 Mhz (counter is in ns)
32
+ localparam RST_COUNT = 10; //Clock cycles that reset is high
33
+
34
+ always begin
35
+ clk = #(CLK_PERIOD/2) ~clk;
36
+ end
37
+
38
+ // reset definition
39
+ initial begin
40
+ rst = 1;
41
+ #(RST_COUNT*CLK_PERIOD);
42
+ @(posedge clk);
43
+ rst = 0;
44
+ end
45
+
46
+ // UUT
47
+ NexysBaseProject_top NexysBaseProject_top_i
48
+ (
49
+ .CLK(clk),
50
+ .RST_N(~rst)
51
+ );
52
+
53
+
54
+ endmodule
HDLForBeginners_Examples/NexysBaseProject/tcl/post-build.tcl ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # relative
3
+ # The dir the implementation is running from
4
+ set run_dir [pwd]
5
+ # This script dir
6
+ set script_path [ file dirname [ file normalize [ info script ] ] ]
7
+
8
+ # My version file
9
+ set filename "$script_path/../src/version.vh"
10
+
11
+ # Where the final binary should land
12
+ set build_final_dir "$script_path/../builds/"
13
+
14
+ # Slurp up the version data file
15
+ set fp [open $filename r]
16
+ set file_data [read $fp]
17
+ close $fp
18
+
19
+ # Extract the version data
20
+ set data [split $file_data "\n"]
21
+ foreach line $data {
22
+ if {[string first "VERSION_MAJOR" $line] != -1} {
23
+ set line_major [split $line " "]
24
+ }
25
+
26
+ if {[string first "VERSION_MINOR" $line] != -1} {
27
+ set line_minor [split $line " "]
28
+ }
29
+
30
+ }
31
+
32
+ # Get version numbers
33
+ set version_major [lindex $line_major 2]
34
+ set version_minor [lindex $line_minor 2]
35
+
36
+ # Vivado produced bitstream filename
37
+ set bitstream_filename "$run_dir/NexysBaseProject_top.bit"
38
+
39
+ # New bitstream filename
40
+ set new_bitstream_filename "$build_final_dir/NexysBaseProject_top_v${version_major}_${version_minor}.bit"
41
+
42
+ # Copy file to new location
43
+ puts "Build file v${version_major}.${version_minor} located in $new_bitstream_filename."
44
+ file mkdir "$build_final_dir/"
45
+ file copy -force $bitstream_filename $new_bitstream_filename
HDLForBeginners_Examples/UART/src/uart.sv ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: uart_tx
8
+ // Module Name:
9
+ // Project Name: uart_tx
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // transmits a supplied word over uart
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+
24
+ module uart
25
+ #(
26
+ parameter CLKRATE = 100000000,
27
+ parameter BAUD = 115200,
28
+ parameter WORD_LENGTH = 8
29
+ )
30
+ (
31
+ input clk,
32
+ input rst,
33
+ input [WORD_LENGTH-1:0] tx_data,
34
+ input tx_data_valid,
35
+ input tx_data_last,
36
+ output tx_data_ready,
37
+ output UART_TX
38
+ );
39
+
40
+ logic tx_data_fifo_m_axis_tlast;
41
+ logic tx_data_fifo_m_axis_tready;
42
+ logic tx_data_fifo_m_axis_tvalid;
43
+ logic [WORD_LENGTH-1:0] tx_data_fifo_m_axis_tdata;
44
+
45
+ tx_fifo
46
+ tx_data_fifo_i(
47
+ // unused
48
+ .wr_rst_busy(), // output wire wr_rst_busy
49
+ .rd_rst_busy(), // output wire rd_rst_busy
50
+ .s_aclk(clk), // input wire s_aclk
51
+ .s_aresetn(~rst), // input wire s_aresetn
52
+ // slave
53
+ .s_axis_tvalid(tx_data_valid), // input wire s_axis_tvalid
54
+ .s_axis_tready(tx_data_ready), // output wire s_axis_tready
55
+ .s_axis_tdata(tx_data), // input wire [7 : 0] s_axis_tdata
56
+ .s_axis_tlast(tx_data_last), // input wire s_axis_tlast
57
+ //master
58
+ .m_axis_tvalid(tx_data_fifo_m_axis_tvalid), // output wire m_axis_tvalid
59
+ .m_axis_tready(tx_data_fifo_m_axis_tready), // input wire m_axis_tready
60
+ .m_axis_tdata(tx_data_fifo_m_axis_tdata), // output wire [7 : 0] m_axis_tdata
61
+ .m_axis_tlast(tx_data_fifo_m_axis_tlast) // output wire m_axis_tlast
62
+ );
63
+
64
+ uart_tx
65
+ #(
66
+ .CLKRATE(CLKRATE),
67
+ .BAUD(BAUD),
68
+ .WORD_LENGTH(WORD_LENGTH)
69
+ )
70
+ uart_tx_i
71
+ (
72
+ .clk(clk),
73
+ .rst(rst),
74
+ .tx_data(tx_data_fifo_m_axis_tdata),
75
+ .tx_data_valid(tx_data_fifo_m_axis_tvalid),
76
+ .tx_data_ready(tx_data_fifo_m_axis_tready),
77
+ .UART_TX(UART_TX)
78
+ );
79
+
80
+ endmodule
HDLForBeginners_Examples/UART/src/uart_tx.sv ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: uart_tx
8
+ // Module Name:
9
+ // Project Name: uart_tx
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // transmits a supplied word over uart
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+ module uart_tx
24
+ #(
25
+ parameter CLKRATE = 100000000,
26
+ parameter BAUD = 115200,
27
+ parameter WORD_LENGTH = 8
28
+ )
29
+ (
30
+ input clk,
31
+ input rst,
32
+ input [WORD_LENGTH-1:0] tx_data,
33
+ input tx_data_valid,
34
+ output tx_data_ready,
35
+ output UART_TX
36
+ );
37
+
38
+ // internal signals
39
+ logic tx_data_ready_i;
40
+ logic uart_tx_i = 1'b0;
41
+ logic [WORD_LENGTH-1:0] tx_data_i;
42
+
43
+
44
+ // store tx_data_i when valid for use later
45
+ always @(posedge clk)
46
+ begin
47
+ if(rst) begin
48
+ tx_data_i <= '0;
49
+
50
+ end
51
+ else begin
52
+ // don't store the data unless we're ready
53
+ if (tx_data_valid & tx_data_ready_i) begin
54
+ tx_data_i <= tx_data;
55
+
56
+ end
57
+ end
58
+ end
59
+
60
+ // Define our states
61
+ typedef enum {IDLE, START, DATA, PARITY, STOP,WAIT} my_state;
62
+
63
+ my_state current_state = IDLE;
64
+ my_state next_state = IDLE;
65
+
66
+ // Define tx signal constants
67
+ localparam TX_IDLE = 1'b1;
68
+ localparam TX_START = 1'b0;
69
+ localparam TX_STOP = 1'b1;
70
+
71
+ // counter parameters
72
+ // count the baud
73
+ localparam BAUD_COUNTER_MAX = CLKRATE/BAUD;
74
+ localparam BAUD_COUNTER_SIZE = $clog2(BAUD_COUNTER_MAX);
75
+ // count the data
76
+ localparam DATA_COUNTER_MAX = WORD_LENGTH;
77
+ localparam DATA_COUNTER_SIZE = $clog2(DATA_COUNTER_MAX);
78
+
79
+ logic [BAUD_COUNTER_SIZE-1:0] uart_baud_counter;
80
+ logic [DATA_COUNTER_SIZE-1:0] uart_data_counter;
81
+ logic uart_baud_done;
82
+ logic uart_data_done;
83
+
84
+ // buffer to store tx data while shifting
85
+ logic [WORD_LENGTH-1:0] uart_data_shift_buffer;
86
+
87
+ // UART Baud Clock
88
+ always @(posedge clk)
89
+ begin
90
+ if(rst) begin
91
+ uart_baud_counter <= '0;
92
+ end
93
+ else begin
94
+ // Reset at state transition
95
+ if (uart_baud_done) begin
96
+ uart_baud_counter <= '0;
97
+
98
+ end
99
+ else begin
100
+ uart_baud_counter <= uart_baud_counter + 'd1;
101
+
102
+ end
103
+ end
104
+ end
105
+
106
+ // baud clock is done
107
+ assign uart_baud_done = (uart_baud_counter == BAUD_COUNTER_MAX-1) ? 1'b1 : 1'b0;
108
+
109
+ // data counting and shifting
110
+ always @(posedge clk)
111
+ begin
112
+ if(rst) begin
113
+ uart_data_counter <= '0;
114
+ uart_data_shift_buffer <= '0;
115
+
116
+ end
117
+ // note uart_baud_done is clk enable
118
+ else if (uart_baud_done) begin
119
+ // Reset at state transition
120
+ if (current_state != next_state) begin
121
+ uart_data_counter <= '0;
122
+ uart_data_shift_buffer <= tx_data_i;
123
+
124
+ end
125
+ else begin
126
+ // otherwise increment counter and shift buffer
127
+ uart_data_counter <= uart_data_counter + 'd1;
128
+ uart_data_shift_buffer <= uart_data_shift_buffer >> 1;
129
+ end
130
+ end
131
+ end
132
+ // uart_data_done indicates all bits are transmitted
133
+ assign uart_data_done = (uart_data_counter == DATA_COUNTER_MAX-1) ? 1'b1 : 1'b0;
134
+
135
+ // State Machine
136
+ always @(*)
137
+ begin
138
+ case (current_state)
139
+ IDLE :
140
+ begin
141
+ if (tx_data_valid) begin
142
+ next_state = START;
143
+
144
+ end
145
+ else begin
146
+ next_state = current_state;
147
+
148
+ end
149
+ end
150
+ START :
151
+ begin
152
+ if (uart_baud_done) begin
153
+ next_state = DATA;
154
+ end
155
+ else begin
156
+ next_state = current_state;
157
+
158
+ end
159
+ end
160
+ DATA :
161
+ begin
162
+ if (uart_data_done & uart_baud_done) begin
163
+ next_state = PARITY;
164
+
165
+ end
166
+ else begin
167
+ next_state = current_state;
168
+
169
+ end
170
+ end
171
+ PARITY :
172
+ begin
173
+ if (uart_baud_done) begin
174
+ next_state = STOP;
175
+ end
176
+ else begin
177
+ next_state = current_state;
178
+
179
+ end
180
+ end
181
+ STOP :
182
+ begin
183
+ if (uart_baud_done) begin
184
+ next_state = WAIT;
185
+ end
186
+ else begin
187
+ next_state = current_state;
188
+
189
+ end
190
+ end
191
+ WAIT :
192
+ begin
193
+ if (uart_baud_done) begin
194
+ next_state = IDLE;
195
+ end
196
+ else begin
197
+ next_state = current_state;
198
+
199
+ end
200
+ end
201
+ default:
202
+ next_state = current_state;
203
+ endcase
204
+ end
205
+
206
+
207
+ always @(posedge clk)
208
+ begin
209
+ if(rst) begin
210
+ current_state <= IDLE;
211
+ end
212
+ else begin
213
+ current_state <= next_state;
214
+ end
215
+
216
+ end
217
+
218
+ always @(*)
219
+ begin
220
+ case (current_state)
221
+ IDLE :
222
+ begin
223
+ uart_tx_i = TX_IDLE;
224
+ end
225
+ START :
226
+ begin
227
+ uart_tx_i = TX_START;
228
+ end
229
+ DATA :
230
+ begin
231
+ uart_tx_i = uart_data_shift_buffer[0];
232
+ end
233
+ PARITY :
234
+ begin
235
+ uart_tx_i = ^tx_data_i;
236
+ end
237
+ STOP :
238
+ begin
239
+ uart_tx_i = TX_STOP;
240
+
241
+ end
242
+ WAIT :
243
+ begin
244
+ uart_tx_i = TX_IDLE;
245
+
246
+ end
247
+ endcase
248
+ end
249
+
250
+ assign tx_data_ready_i = (current_state == IDLE) ? 1'b1 : 1'b0;
251
+ assign tx_data_ready = tx_data_ready_i;
252
+ assign UART_TX = uart_tx_i;
253
+
254
+
255
+ ////////////////////////////////////////////////////////////////////////////////
256
+ ////////////////////////////////////////////////////////////////////////////////
257
+ ////////////////////////////////////////////////////////////////////////////////
258
+ //
259
+ // Formal properties
260
+ // {{{
261
+ ////////////////////////////////////////////////////////////////////////////////
262
+ ////////////////////////////////////////////////////////////////////////////////
263
+ ////////////////////////////////////////////////////////////////////////////////
264
+ `ifdef FORMAL
265
+ // Register declarations, reset assertion
266
+ // {{{
267
+ reg f_past_valid;
268
+ reg [WORD_LENGTH-1:0] fv_data;
269
+
270
+ initial f_past_valid = 0;
271
+ always @(posedge clk)
272
+ f_past_valid <= 1;
273
+
274
+ always @(*)
275
+ if (!f_past_valid)
276
+ assume(rst);
277
+ // }}}
278
+ ////////////////////////////////////////////////////////////////////////
279
+ //
280
+ // Input AXI-stream assumptions
281
+ // {{{
282
+ ////////////////////////////////////////////////////////////////////////
283
+ //
284
+ //
285
+ always @(posedge clk)
286
+ if (!f_past_valid || $past(rst))
287
+ begin
288
+ assume(!tx_data_valid);
289
+ end
290
+ else if ($past(tx_data_valid && !tx_data_ready))
291
+ begin
292
+ assume(tx_data_valid);
293
+ assume($stable(tx_data));
294
+ end
295
+ // }}}
296
+
297
+ always @(*)
298
+ if (f_past_valid)
299
+ begin
300
+ assert(uart_data_counter < DATA_COUNTER_MAX);
301
+ assert(uart_baud_done == (uart_baud_counter == BAUD_COUNTER_MAX-1));
302
+ end
303
+
304
+ always @(*)
305
+ if (f_past_valid)
306
+ case(current_state)
307
+ IDLE: assert(UART_TX);
308
+ START: assert(!UART_TX);
309
+ DATA: begin
310
+ end
311
+ PARITY: assert(UART_TX == ^tx_data_i);
312
+ STOP: assert(UART_TX);
313
+ WAIT: assert(UART_TX);
314
+ default: assert(0);
315
+ endcase
316
+
317
+ always @(*)
318
+ if (f_past_valid)
319
+ case(current_state)
320
+ DATA: begin
321
+ assert(uart_data_counter < WORD_LENGTH);
322
+ assert(UART_TX == fv_data[uart_data_counter]);
323
+ end
324
+ default: begin end
325
+ endcase
326
+
327
+ always @(*)
328
+ if (f_past_valid)
329
+ assert(tx_data_ready == (current_state == IDLE));
330
+
331
+ always @(posedge clk)
332
+ if (tx_data_valid && tx_data_ready)
333
+ fv_data <= tx_data;
334
+
335
+ always @(*)
336
+ if (f_past_valid && current_state != IDLE)
337
+ assert(fv_data == tx_data_i);
338
+ ////////////////////////////////////////////////////////////////////////
339
+ //
340
+ // Cover checks
341
+ // {{{
342
+ ////////////////////////////////////////////////////////////////////////
343
+ //
344
+ //
345
+
346
+ reg [2:0] cvr_count;
347
+
348
+ always @(posedge clk)
349
+ if (rst)
350
+ cvr_count <= 0;
351
+ else if (tx_data_valid && tx_data_ready)
352
+ begin
353
+ if (cvr_count == 0 && tx_data == 8'h01)
354
+ cvr_count <= 1;
355
+ else if (cvr_count == 1 && tx_data == 8'h7e)
356
+ cvr_count <= 2;
357
+ else if (cvr_count >= 2 && !(&cvr_count))
358
+ cvr_count <= cvr_count + 1;
359
+ end
360
+
361
+ always @(*)
362
+ if (!rst)
363
+ begin
364
+ cover(cvr_count == 1);
365
+ cover(cvr_count == 1 && current_state == START);
366
+ cover(cvr_count == 1 && current_state == DATA);
367
+ cover(cvr_count == 1 && current_state == PARITY);
368
+ cover(cvr_count == 1 && current_state == STOP);
369
+ cover(cvr_count == 1 && current_state == WAIT);
370
+ cover(cvr_count == 1 && current_state == IDLE);
371
+ cover(cvr_count == 2);
372
+ cover(cvr_count == 2 && current_state == START);
373
+ cover(cvr_count == 2 && current_state == DATA); // @88
374
+ cover(cvr_count == 2 && current_state == PARITY); // @149
375
+ cover(cvr_count == 2 && current_state == STOP);
376
+ cover(cvr_count == 2 && current_state == WAIT);
377
+ cover(cvr_count == 2 && current_state == IDLE);
378
+ cover(cvr_count == 3);
379
+ cover(cvr_count == 4);
380
+ end
381
+ // }}}
382
+ // }}}
383
+ `endif
384
+ endmodule
HDLForBeginners_Examples/UART/tb/lfsr_8bit.sv ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company: HDLForBeginners
4
+ // Engineer: Stacey
5
+ //
6
+ // Create Date: 14.07.2021 13:47:50
7
+ // Design Name: lfsr_4bit
8
+ // Module Name: lfsr_4bit_top
9
+ // Project Name: lfsr_4bit
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ // Increments a counter and and drives an output gpio pin
14
+ //
15
+ // Dependencies:
16
+ //
17
+ // Revision:
18
+ // Revision 0.01 - File Created
19
+ // Additional Comments:
20
+ //
21
+ //////////////////////////////////////////////////////////////////////////////////
22
+
23
+
24
+ module lfsr_8bit
25
+ (
26
+ input clk,
27
+ input rst,
28
+ input clk_en,
29
+ output [7:0] data
30
+ );
31
+
32
+
33
+ logic [8:0] lfsr;
34
+ logic [3:0] lfsr_feedback;
35
+ assign lfsr_feedback= {lfsr[7],lfsr[5:3]};
36
+
37
+ always @(posedge clk)
38
+ begin
39
+ if(rst) begin
40
+ lfsr <= 8'b11111111;
41
+
42
+ end
43
+ else if (clk_en) begin
44
+ lfsr[7:1] <= lfsr[6:0];
45
+ lfsr[0] <= ^lfsr_feedback;
46
+ end
47
+ end
48
+
49
+ assign data = lfsr;
50
+
51
+ endmodule
HDLForBeginners_Examples/UART/tb/uart_tb.sv ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 14.07.2021 18:18:52
7
+ // Design Name:
8
+ // Module Name: simple_increment_tb
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+ module uart_tb(
23
+
24
+ );
25
+
26
+ logic clk = 0;
27
+ logic rst = 1;
28
+ logic [7:0] tx_data;
29
+ logic tx_ready;
30
+ logic tx_valid;
31
+ logic tx_last;
32
+ logic tx_out;
33
+
34
+
35
+ // Clock definition
36
+ localparam CLK_PERIOD = 20000; // 50 Mhz (counter is in ps)
37
+ localparam RST_COUNT = 10; //Clock cycles that reset is high
38
+
39
+ always begin
40
+ clk = #(CLK_PERIOD/2) ~clk;
41
+ end
42
+
43
+ // reset definition
44
+ initial begin
45
+ rst = 1;
46
+ #(RST_COUNT*CLK_PERIOD);
47
+ @(posedge clk);
48
+ rst = 0;
49
+ end
50
+
51
+ localparam PACKET_COUNTER_MAX = 10;
52
+ localparam PACKET_COUNTER_SIZE = $clog2(PACKET_COUNTER_MAX);
53
+
54
+ logic [PACKET_COUNTER_SIZE-1:0] packet_counter;
55
+
56
+ always @(posedge clk)
57
+ begin
58
+ if(rst) begin
59
+ packet_counter <= '0;
60
+
61
+ end
62
+ else begin
63
+ // don't store the data unless we're ready
64
+ if (tx_last & tx_valid & tx_ready) begin
65
+ packet_counter <= '0;
66
+ end
67
+ else if (tx_valid & tx_ready) begin
68
+ packet_counter <= packet_counter + 'd1;;
69
+
70
+ end
71
+ end
72
+ end
73
+
74
+ assign tx_last = (packet_counter == PACKET_COUNTER_MAX-1) ? 1'b1 : 1'b0;
75
+ // UUT
76
+ uart uart_i
77
+ (
78
+ .clk(clk),
79
+ .rst(rst),
80
+ .tx_data(tx_data),
81
+ .tx_data_valid(tx_valid),
82
+ .tx_data_ready(tx_ready),
83
+ .tx_data_last(tx_last),
84
+ .UART_TX(tx_out)
85
+ );
86
+
87
+ // Gen input tx data
88
+ lfsr_8bit lfsr_8bit_i
89
+ (
90
+ .clk(clk),
91
+ .rst(rst),
92
+ .clk_en(tx_ready),
93
+ .data(tx_data)
94
+
95
+ );
96
+
97
+ assign tx_valid = ~rst;
98
+
99
+ endmodule
HDLForBeginners_Examples/UART/uart.tcl ADDED
@@ -0,0 +1,569 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #*****************************************************************************************
2
+ # Vivado (TM) v2020.2 (64-bit)
3
+ #
4
+ # uart.tcl: Tcl script for re-creating project 'uart'
5
+ #
6
+ # Generated by Vivado on Sat Jul 31 13:11:31 SAST 2021
7
+ # IP Build 3064653 on Wed Nov 18 14:17:31 MST 2020
8
+ #
9
+ # This file contains the Vivado Tcl commands for re-creating the project to the state*
10
+ # when this script was generated. In order to re-create the project, please source this
11
+ # file in the Vivado Tcl Shell.
12
+ #
13
+ # * Note that the runs in the created project will be configured the same way as the
14
+ # original project, however they will not be launched automatically. To regenerate the
15
+ # run results please launch the synthesis/implementation runs as needed.
16
+ #
17
+ #*****************************************************************************************
18
+ # NOTE: In order to use this script for source control purposes, please make sure that the
19
+ # following files are added to the source control system:-
20
+ #
21
+ # 1. This project restoration tcl script (uart.tcl) that was generated.
22
+ #
23
+ # 2. The following source(s) files that were local or imported into the original project.
24
+ # (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)
25
+ #
26
+ # <none>
27
+ #
28
+ # 3. The following remote source files that were added to the original project:-
29
+ #
30
+ # "src/uart_tx.sv"
31
+ # "tb/lfsr_8bit.sv"
32
+ # "src/uart.sv"
33
+ # "ip/tx_fifo/tx_fifo.xci"
34
+ # "xdc/constraints.xdc"
35
+ # "tb/uart_tb.sv"
36
+ # "uart_tb_behav.wcfg"
37
+ #
38
+ #*****************************************************************************************
39
+
40
+ # Check file required for this script exists
41
+ proc checkRequiredFiles { origin_dir} {
42
+ set status true
43
+ set files [list \
44
+ "src/uart_tx.sv" \
45
+ "tb/lfsr_8bit.sv" \
46
+ "src/uart.sv" \
47
+ "ip/tx_fifo/tx_fifo.xci" \
48
+ "xdc/constraints.xdc" \
49
+ "tb/uart_tb.sv" \
50
+ "uart_tb_behav.wcfg" \
51
+ ]
52
+ foreach ifile $files {
53
+ if { ![file isfile $ifile] } {
54
+ puts " Could not find remote file $ifile "
55
+ set status false
56
+ }
57
+ }
58
+
59
+ return $status
60
+ }
61
+ # Set the reference directory for source file relative paths (by default the value is script directory path)
62
+ set origin_dir [file dirname [info script]]
63
+
64
+ # Use origin directory path location variable, if specified in the tcl shell
65
+ if { [info exists ::origin_dir_loc] } {
66
+ set origin_dir $::origin_dir_loc
67
+ }
68
+
69
+ # Set the project name
70
+ set _xil_proj_name_ "uart"
71
+
72
+ # Use project name variable, if specified in the tcl shell
73
+ if { [info exists ::user_project_name] } {
74
+ set _xil_proj_name_ $::user_project_name
75
+ }
76
+
77
+ variable script_file
78
+ set script_file "uart.tcl"
79
+
80
+ # Help information for this script
81
+ proc print_help {} {
82
+ variable script_file
83
+ puts "\nDescription:"
84
+ puts "Recreate a Vivado project from this script. The created project will be"
85
+ puts "functionally equivalent to the original project for which this script was"
86
+ puts "generated. The script contains commands for creating a project, filesets,"
87
+ puts "runs, adding/importing sources and setting properties on various objects.\n"
88
+ puts "Syntax:"
89
+ puts "$script_file"
90
+ puts "$script_file -tclargs \[--origin_dir <path>\]"
91
+ puts "$script_file -tclargs \[--project_name <name>\]"
92
+ puts "$script_file -tclargs \[--help\]\n"
93
+ puts "Usage:"
94
+ puts "Name Description"
95
+ puts "-------------------------------------------------------------------------"
96
+ puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
97
+ puts " origin_dir path value is \".\", otherwise, the value"
98
+ puts " that was set with the \"-paths_relative_to\" switch"
99
+ puts " when this script was generated.\n"
100
+ puts "\[--project_name <name>\] Create project with the specified name. Default"
101
+ puts " name is the name of the project from where this"
102
+ puts " script was generated.\n"
103
+ puts "\[--help\] Print help information for this script"
104
+ puts "-------------------------------------------------------------------------\n"
105
+ exit 0
106
+ }
107
+
108
+ if { $::argc > 0 } {
109
+ for {set i 0} {$i < $::argc} {incr i} {
110
+ set option [string trim [lindex $::argv $i]]
111
+ switch -regexp -- $option {
112
+ "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
113
+ "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
114
+ "--help" { print_help }
115
+ default {
116
+ if { [regexp {^-} $option] } {
117
+ puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
118
+ return 1
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ # Set the directory path for the original project from where this script was exported
126
+ set orig_proj_dir "[file normalize "$origin_dir/uart"]"
127
+
128
+ # Check for paths and files needed for project creation
129
+ set validate_required 0
130
+ if { $validate_required } {
131
+ if { [checkRequiredFiles $origin_dir] } {
132
+ puts "Tcl file $script_file is valid. All files required for project creation is accesable. "
133
+ } else {
134
+ puts "Tcl file $script_file is not valid. Not all files required for project creation is accesable. "
135
+ return
136
+ }
137
+ }
138
+
139
+ # Create project
140
+ create_project ${_xil_proj_name_} ${origin_dir}/${_xil_proj_name_} -part xc7z010clg400-1
141
+
142
+ # Set the directory path for the new project
143
+ set proj_dir [get_property directory [current_project]]
144
+
145
+ # Set project properties
146
+ set obj [current_project]
147
+ set_property -name "board_part" -value "digilentinc.com:zybo:part0:2.0" -objects $obj
148
+ set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
149
+ set_property -name "enable_vhdl_2008" -value "1" -objects $obj
150
+ set_property -name "ip_cache_permissions" -value "read write" -objects $obj
151
+ set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
152
+ set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
153
+ set_property -name "platform.board_id" -value "zybo" -objects $obj
154
+ set_property -name "platform.description" -value "Vivado generated DSA" -objects $obj
155
+ set_property -name "platform.emu_dir" -value "emu" -objects $obj
156
+ set_property -name "platform.uses_pr" -value "1" -objects $obj
157
+ set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
158
+ set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
159
+ set_property -name "simulator_language" -value "Mixed" -objects $obj
160
+ set_property -name "webtalk.activehdl_export_sim" -value "7" -objects $obj
161
+ set_property -name "webtalk.ies_export_sim" -value "7" -objects $obj
162
+ set_property -name "webtalk.modelsim_export_sim" -value "7" -objects $obj
163
+ set_property -name "webtalk.questa_export_sim" -value "7" -objects $obj
164
+ set_property -name "webtalk.riviera_export_sim" -value "7" -objects $obj
165
+ set_property -name "webtalk.vcs_export_sim" -value "7" -objects $obj
166
+ set_property -name "webtalk.xcelium_export_sim" -value "5" -objects $obj
167
+ set_property -name "webtalk.xsim_export_sim" -value "7" -objects $obj
168
+ set_property -name "webtalk.xsim_launch_sim" -value "42" -objects $obj
169
+
170
+ # Create 'sources_1' fileset (if not found)
171
+ if {[string equal [get_filesets -quiet sources_1] ""]} {
172
+ create_fileset -srcset sources_1
173
+ }
174
+
175
+ # Set 'sources_1' fileset object
176
+ set obj [get_filesets sources_1]
177
+ set files [list \
178
+ [file normalize "${origin_dir}/src/uart_tx.sv"] \
179
+ [file normalize "${origin_dir}/tb/lfsr_8bit.sv"] \
180
+ [file normalize "${origin_dir}/src/uart.sv"] \
181
+ [file normalize "${origin_dir}/ip/tx_fifo/tx_fifo.xci"] \
182
+ ]
183
+ add_files -norecurse -fileset $obj $files
184
+
185
+ # Set 'sources_1' fileset file properties for remote files
186
+ set file "$origin_dir/src/uart_tx.sv"
187
+ set file [file normalize $file]
188
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
189
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
190
+
191
+ set file "$origin_dir/tb/lfsr_8bit.sv"
192
+ set file [file normalize $file]
193
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
194
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
195
+ set_property -name "used_in" -value "simulation" -objects $file_obj
196
+ set_property -name "used_in_implementation" -value "0" -objects $file_obj
197
+ set_property -name "used_in_synthesis" -value "0" -objects $file_obj
198
+
199
+ set file "$origin_dir/src/uart.sv"
200
+ set file [file normalize $file]
201
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
202
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
203
+
204
+ set file "$origin_dir/ip/tx_fifo/tx_fifo.xci"
205
+ set file [file normalize $file]
206
+ set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
207
+ set_property -name "generate_files_for_reference" -value "0" -objects $file_obj
208
+ set_property -name "registered_with_manager" -value "1" -objects $file_obj
209
+ if { ![get_property "is_locked" $file_obj] } {
210
+ set_property -name "synth_checkpoint_mode" -value "Singular" -objects $file_obj
211
+ }
212
+
213
+
214
+ # Set 'sources_1' fileset file properties for local files
215
+ # None
216
+
217
+ # Set 'sources_1' fileset properties
218
+ set obj [get_filesets sources_1]
219
+ set_property -name "top" -value "uart_tx" -objects $obj
220
+ set_property -name "top_auto_set" -value "0" -objects $obj
221
+
222
+ # Create 'constrs_1' fileset (if not found)
223
+ if {[string equal [get_filesets -quiet constrs_1] ""]} {
224
+ create_fileset -constrset constrs_1
225
+ }
226
+
227
+ # Set 'constrs_1' fileset object
228
+ set obj [get_filesets constrs_1]
229
+
230
+ # Add/Import constrs file and set constrs file properties
231
+ set file "[file normalize "$origin_dir/xdc/constraints.xdc"]"
232
+ set file_added [add_files -norecurse -fileset $obj [list $file]]
233
+ set file "$origin_dir/xdc/constraints.xdc"
234
+ set file [file normalize $file]
235
+ set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
236
+ set_property -name "file_type" -value "XDC" -objects $file_obj
237
+
238
+ # Set 'constrs_1' fileset properties
239
+ set obj [get_filesets constrs_1]
240
+
241
+ # Create 'sim_1' fileset (if not found)
242
+ if {[string equal [get_filesets -quiet sim_1] ""]} {
243
+ create_fileset -simset sim_1
244
+ }
245
+
246
+ # Set 'sim_1' fileset object
247
+ set obj [get_filesets sim_1]
248
+ set files [list \
249
+ [file normalize "${origin_dir}/tb/uart_tb.sv"] \
250
+ [file normalize "${origin_dir}/uart_tb_behav.wcfg"] \
251
+ ]
252
+ add_files -norecurse -fileset $obj $files
253
+
254
+ # Set 'sim_1' fileset file properties for remote files
255
+ set file "$origin_dir/tb/uart_tb.sv"
256
+ set file [file normalize $file]
257
+ set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
258
+ set_property -name "file_type" -value "SystemVerilog" -objects $file_obj
259
+
260
+
261
+ # Set 'sim_1' fileset file properties for local files
262
+ # None
263
+
264
+ # Set 'sim_1' fileset properties
265
+ set obj [get_filesets sim_1]
266
+ set_property -name "hbs.configure_design_for_hier_access" -value "1" -objects $obj
267
+ set_property -name "top" -value "uart_tb" -objects $obj
268
+ set_property -name "top_auto_set" -value "0" -objects $obj
269
+ set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
270
+
271
+ # Set 'utils_1' fileset object
272
+ set obj [get_filesets utils_1]
273
+ # Empty (no sources present)
274
+
275
+ # Set 'utils_1' fileset properties
276
+ set obj [get_filesets utils_1]
277
+
278
+ # Create 'synth_1' run (if not found)
279
+ if {[string equal [get_runs -quiet synth_1] ""]} {
280
+ create_run -name synth_1 -part xc7z010clg400-1 -flow {Vivado Synthesis 2018} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
281
+ } else {
282
+ set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
283
+ set_property flow "Vivado Synthesis 2018" [get_runs synth_1]
284
+ }
285
+ set obj [get_runs synth_1]
286
+ set_property set_report_strategy_name 1 $obj
287
+ set_property report_strategy {Vivado Synthesis Default Reports} $obj
288
+ set_property set_report_strategy_name 0 $obj
289
+ # Create 'synth_1_synth_report_utilization_0' report (if not found)
290
+ if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
291
+ create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
292
+ }
293
+ set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
294
+ if { $obj != "" } {
295
+
296
+ }
297
+ set obj [get_runs synth_1]
298
+ set_property -name "needs_refresh" -value "1" -objects $obj
299
+ set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
300
+
301
+ # set the current synth run
302
+ current_run -synthesis [get_runs synth_1]
303
+
304
+ # Create 'impl_1' run (if not found)
305
+ if {[string equal [get_runs -quiet impl_1] ""]} {
306
+ create_run -name impl_1 -part xc7z010clg400-1 -flow {Vivado Implementation 2018} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
307
+ } else {
308
+ set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
309
+ set_property flow "Vivado Implementation 2018" [get_runs impl_1]
310
+ }
311
+ set obj [get_runs impl_1]
312
+ set_property set_report_strategy_name 1 $obj
313
+ set_property report_strategy {Vivado Implementation Default Reports} $obj
314
+ set_property set_report_strategy_name 0 $obj
315
+ # Create 'impl_1_init_report_timing_summary_0' report (if not found)
316
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
317
+ create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
318
+ }
319
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
320
+ if { $obj != "" } {
321
+ set_property -name "is_enabled" -value "0" -objects $obj
322
+ set_property -name "options.max_paths" -value "10" -objects $obj
323
+
324
+ }
325
+ # Create 'impl_1_opt_report_drc_0' report (if not found)
326
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
327
+ create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
328
+ }
329
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
330
+ if { $obj != "" } {
331
+
332
+ }
333
+ # Create 'impl_1_opt_report_timing_summary_0' report (if not found)
334
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
335
+ create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
336
+ }
337
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
338
+ if { $obj != "" } {
339
+ set_property -name "is_enabled" -value "0" -objects $obj
340
+ set_property -name "options.max_paths" -value "10" -objects $obj
341
+
342
+ }
343
+ # Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
344
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
345
+ create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
346
+ }
347
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
348
+ if { $obj != "" } {
349
+ set_property -name "is_enabled" -value "0" -objects $obj
350
+ set_property -name "options.max_paths" -value "10" -objects $obj
351
+
352
+ }
353
+ # Create 'impl_1_place_report_io_0' report (if not found)
354
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
355
+ create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
356
+ }
357
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
358
+ if { $obj != "" } {
359
+
360
+ }
361
+ # Create 'impl_1_place_report_utilization_0' report (if not found)
362
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
363
+ create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
364
+ }
365
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
366
+ if { $obj != "" } {
367
+
368
+ }
369
+ # Create 'impl_1_place_report_control_sets_0' report (if not found)
370
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
371
+ create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
372
+ }
373
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
374
+ if { $obj != "" } {
375
+ set_property -name "options.verbose" -value "1" -objects $obj
376
+
377
+ }
378
+ # Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
379
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
380
+ create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
381
+ }
382
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
383
+ if { $obj != "" } {
384
+ set_property -name "is_enabled" -value "0" -objects $obj
385
+
386
+ }
387
+ # Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
388
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
389
+ create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
390
+ }
391
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
392
+ if { $obj != "" } {
393
+ set_property -name "is_enabled" -value "0" -objects $obj
394
+
395
+ }
396
+ # Create 'impl_1_place_report_timing_summary_0' report (if not found)
397
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
398
+ create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
399
+ }
400
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
401
+ if { $obj != "" } {
402
+ set_property -name "is_enabled" -value "0" -objects $obj
403
+ set_property -name "options.max_paths" -value "10" -objects $obj
404
+
405
+ }
406
+ # Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
407
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
408
+ create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
409
+ }
410
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
411
+ if { $obj != "" } {
412
+ set_property -name "is_enabled" -value "0" -objects $obj
413
+ set_property -name "options.max_paths" -value "10" -objects $obj
414
+
415
+ }
416
+ # Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
417
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
418
+ create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
419
+ }
420
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
421
+ if { $obj != "" } {
422
+ set_property -name "is_enabled" -value "0" -objects $obj
423
+ set_property -name "options.max_paths" -value "10" -objects $obj
424
+
425
+ }
426
+ # Create 'impl_1_route_report_drc_0' report (if not found)
427
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
428
+ create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
429
+ }
430
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
431
+ if { $obj != "" } {
432
+
433
+ }
434
+ # Create 'impl_1_route_report_methodology_0' report (if not found)
435
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
436
+ create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
437
+ }
438
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
439
+ if { $obj != "" } {
440
+
441
+ }
442
+ # Create 'impl_1_route_report_power_0' report (if not found)
443
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
444
+ create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
445
+ }
446
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
447
+ if { $obj != "" } {
448
+
449
+ }
450
+ # Create 'impl_1_route_report_route_status_0' report (if not found)
451
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
452
+ create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
453
+ }
454
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
455
+ if { $obj != "" } {
456
+
457
+ }
458
+ # Create 'impl_1_route_report_timing_summary_0' report (if not found)
459
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
460
+ create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
461
+ }
462
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
463
+ if { $obj != "" } {
464
+ set_property -name "options.max_paths" -value "10" -objects $obj
465
+
466
+ }
467
+ # Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
468
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
469
+ create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
470
+ }
471
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
472
+ if { $obj != "" } {
473
+
474
+ }
475
+ # Create 'impl_1_route_report_clock_utilization_0' report (if not found)
476
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
477
+ create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
478
+ }
479
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
480
+ if { $obj != "" } {
481
+
482
+ }
483
+ # Create 'impl_1_route_report_bus_skew_0' report (if not found)
484
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
485
+ create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
486
+ }
487
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
488
+ if { $obj != "" } {
489
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
490
+
491
+ }
492
+ # Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
493
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
494
+ create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
495
+ }
496
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
497
+ if { $obj != "" } {
498
+ set_property -name "options.max_paths" -value "10" -objects $obj
499
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
500
+
501
+ }
502
+ # Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
503
+ if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
504
+ create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
505
+ }
506
+ set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
507
+ if { $obj != "" } {
508
+ set_property -name "options.warn_on_violation" -value "1" -objects $obj
509
+
510
+ }
511
+ set obj [get_runs impl_1]
512
+ set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
513
+ set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
514
+ set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
515
+
516
+ # set the current impl run
517
+ current_run -implementation [get_runs impl_1]
518
+
519
+ puts "INFO: Project created:${_xil_proj_name_}"
520
+ # Create 'drc_1' gadget (if not found)
521
+ if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
522
+ create_dashboard_gadget -name {drc_1} -type drc
523
+ }
524
+ set obj [get_dashboard_gadgets [ list "drc_1" ] ]
525
+ set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
526
+
527
+ # Create 'methodology_1' gadget (if not found)
528
+ if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
529
+ create_dashboard_gadget -name {methodology_1} -type methodology
530
+ }
531
+ set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
532
+ set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
533
+
534
+ # Create 'power_1' gadget (if not found)
535
+ if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
536
+ create_dashboard_gadget -name {power_1} -type power
537
+ }
538
+ set obj [get_dashboard_gadgets [ list "power_1" ] ]
539
+ set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
540
+
541
+ # Create 'timing_1' gadget (if not found)
542
+ if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
543
+ create_dashboard_gadget -name {timing_1} -type timing
544
+ }
545
+ set obj [get_dashboard_gadgets [ list "timing_1" ] ]
546
+ set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
547
+
548
+ # Create 'utilization_1' gadget (if not found)
549
+ if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
550
+ create_dashboard_gadget -name {utilization_1} -type utilization
551
+ }
552
+ set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
553
+ set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
554
+ set_property -name "run.step" -value "synth_design" -objects $obj
555
+ set_property -name "run.type" -value "synthesis" -objects $obj
556
+
557
+ # Create 'utilization_2' gadget (if not found)
558
+ if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
559
+ create_dashboard_gadget -name {utilization_2} -type utilization
560
+ }
561
+ set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
562
+ set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
563
+
564
+ move_dashboard_gadget -name {utilization_1} -row 0 -col 0
565
+ move_dashboard_gadget -name {power_1} -row 1 -col 0
566
+ move_dashboard_gadget -name {drc_1} -row 2 -col 0
567
+ move_dashboard_gadget -name {timing_1} -row 0 -col 1
568
+ move_dashboard_gadget -name {utilization_2} -row 1 -col 1
569
+ move_dashboard_gadget -name {methodology_1} -row 2 -col 1
HDLForBeginners_Examples/ZynqSeries/fibonacci.sv ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 08/08/2023 10:01:25 PM
7
+ // Design Name:
8
+ // Module Name: fibonacci
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module fibonacci
24
+ #(
25
+ parameter SEQ_BITS = 32
26
+ )
27
+ (
28
+
29
+ input clk,
30
+ input rst,
31
+
32
+ input get_next_number,
33
+
34
+ output [SEQ_BITS-1:0] seq,
35
+ output seq_valid
36
+
37
+ );
38
+
39
+ // calculates the next number in the fibonacci series
40
+
41
+ // initial values in sequence
42
+ // _i indicates an internal value
43
+ logic [1:0][SEQ_BITS-1:0] seq_i;
44
+ logic seq_valid_i;
45
+
46
+
47
+
48
+ always_ff @(posedge clk) begin
49
+ if (rst) begin
50
+ seq_i[0] <= 0;
51
+ seq_i[1] <= 1;
52
+ seq_valid_i <= 0;
53
+
54
+ end
55
+ else begin
56
+ seq_valid_i <= 0;
57
+ if (get_next_number) begin
58
+ seq_valid_i <= 1;
59
+ seq_i[1] <= seq_i[0];
60
+ seq_i[0] <= seq_i[0] + seq_i[1];
61
+ end
62
+ end
63
+ end
64
+
65
+
66
+ assign seq = seq_i[1];
67
+ assign seq_valid = seq_valid_i;
68
+
69
+
70
+ endmodule
HDLForBeginners_Examples/ZynqSeries/fibonacci_bram.sv ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ `timescale 1ns / 1ps
2
+ //////////////////////////////////////////////////////////////////////////////////
3
+ // Company:
4
+ // Engineer:
5
+ //
6
+ // Create Date: 08/08/2023 10:01:25 PM
7
+ // Design Name:
8
+ // Module Name: fibonacci_bram
9
+ // Project Name:
10
+ // Target Devices:
11
+ // Tool Versions:
12
+ // Description:
13
+ //
14
+ // Dependencies:
15
+ //
16
+ // Revision:
17
+ // Revision 0.01 - File Created
18
+ // Additional Comments:
19
+ //
20
+ //////////////////////////////////////////////////////////////////////////////////
21
+
22
+
23
+ module fibonacci_bram
24
+ (
25
+
26
+ input clk,
27
+ input rst,
28
+
29
+ output [31:0] BRAM_addr,
30
+ output BRAM_clk,
31
+ output [31:0] BRAM_din,
32
+ input [31:0] BRAM_dout,
33
+ output BRAM_en,
34
+ output BRAM_rst,
35
+ output [3:0] BRAM_we
36
+
37
+ );
38
+
39
+ localparam BRAM_DEPTH = 2048;
40
+ localparam SEQ_BITS = 32;
41
+ localparam CLK_MHZ = 100;
42
+
43
+ logic [SEQ_BITS-1:0] seq_num;
44
+ logic seq_valid;
45
+
46
+ logic [31:0] address;
47
+ logic [31:0] counter;
48
+
49
+ logic get_next_number;
50
+ assign get_next_number = (counter == 1) ? 1 : 0;
51
+
52
+ localparam COUNTER_MAX = CLK_MHZ*500000;
53
+
54
+ fibonacci
55
+ #(
56
+ .SEQ_BITS(SEQ_BITS)
57
+ )
58
+ fibonacci_i
59
+ (
60
+ .clk(clk),
61
+ .rst(rst | address == BRAM_DEPTH-1),
62
+
63
+ .get_next_number(get_next_number),
64
+ .seq(seq_num),
65
+ .seq_valid(seq_valid)
66
+
67
+ );
68
+
69
+
70
+ always_ff @(posedge clk) begin
71
+ if (rst) begin
72
+ address <= 0;
73
+
74
+ end
75
+ else begin
76
+ if (seq_valid) begin
77
+ if (address < BRAM_DEPTH-1) begin
78
+ address <= address + 1;
79
+ end
80
+ else begin
81
+ address <= 0;
82
+
83
+ end
84
+ end
85
+ end
86
+ end
87
+
88
+ always_ff @(posedge clk) begin
89
+ if (rst) begin
90
+ counter <= 0;
91
+
92
+ end
93
+ else begin
94
+ if (counter < COUNTER_MAX-1) begin
95
+ counter <= counter + 1;
96
+ end
97
+ else begin
98
+ counter <= 0;
99
+ end
100
+ end
101
+ end
102
+
103
+
104
+ assign BRAM_addr = address << 2;
105
+ assign BRAM_clk = clk;
106
+ assign BRAM_din = seq_num;
107
+ assign BRAM_en = 1;
108
+ assign BRAM_rst = rst;
109
+ assign BRAM_we = {4{seq_valid}};
110
+
111
+
112
+ endmodule