├── .gitignore ├── Vivado ├── boards │ └── board_files │ │ ├── microzed_7010 │ │ └── 1.2 │ │ │ ├── microzed_7010.jpg │ │ │ ├── part0_pins.xml │ │ │ ├── board.xml │ │ │ └── preset.xml │ │ └── microzed_7020 │ │ └── 1.2 │ │ ├── microzed_7020.jpg │ │ ├── part0_pins.xml │ │ ├── board.xml │ │ └── preset.xml ├── build.bat ├── src │ └── bd │ │ └── design_1.tcl └── build.tcl └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Vivado/.Xil/ 2 | Vivado/*.log 3 | Vivado/*.jou 4 | Vivado/*_base/ 5 | -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7010/1.2/microzed_7010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpgadeveloper/microzed-base/HEAD/Vivado/boards/board_files/microzed_7010/1.2/microzed_7010.jpg -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7020/1.2/microzed_7020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fpgadeveloper/microzed-base/HEAD/Vivado/boards/board_files/microzed_7020/1.2/microzed_7020.jpg -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7010/1.2/part0_pins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7020/1.2/part0_pins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Vivado/build.bat: -------------------------------------------------------------------------------- 1 | SET vivado=C:\Xilinx\Vivado\2020.2\bin\vivado.bat 2 | @ECHO OFF 3 | if exist %vivado% ( 4 | %vivado% -mode batch -source build.tcl 5 | ) else ( 6 | ECHO. 7 | ECHO ############################### 8 | ECHO ### Failed to locate Vivado ### 9 | ECHO ############################### 10 | ECHO. 11 | ECHO This batch file "%~n0.bat" did not find Vivado installed in: 12 | ECHO. 13 | ECHO %vivado% 14 | ECHO. 15 | ECHO Fix the problem by doing one of the following: 16 | ECHO. 17 | ECHO 1. If you do not have this version of Vivado installed, 18 | ECHO please install it or download the project sources from 19 | ECHO a commit of the Git repository that was intended for 20 | ECHO your version of Vivado. 21 | ECHO. 22 | ECHO 2. If Vivado is installed in a different location on your 23 | ECHO PC, please modify the first line of this batch file 24 | ECHO to specify the correct location. 25 | ECHO. 26 | pause 27 | ) -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7010/1.2/board.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MicroZed 7010 Image File 6 | 7 | 8 | 9 | g 10 | 11 | 1.2 12 | MicroZed 7010 Board 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7020/1.2/board.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MicroZed 7020 Image File 6 | 7 | 8 | 9 | g 10 | 11 | 1.2 12 | MicroZed 7020 Board 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Vivado/src/bd/design_1.tcl: -------------------------------------------------------------------------------- 1 | ################################################################ 2 | # Block diagram build script 3 | ################################################################ 4 | 5 | # CHECKING IF PROJECT EXISTS 6 | if { [get_projects -quiet] eq "" } { 7 | puts "ERROR: Please open or create a project!" 8 | return 1 9 | } 10 | 11 | set cur_design [current_bd_design -quiet] 12 | set list_cells [get_bd_cells -quiet] 13 | 14 | create_bd_design $design_name 15 | 16 | current_bd_design $design_name 17 | 18 | set parentCell [get_bd_cells /] 19 | 20 | # Get object for parentCell 21 | set parentObj [get_bd_cells $parentCell] 22 | if { $parentObj == "" } { 23 | puts "ERROR: Unable to find parent cell <$parentCell>!" 24 | return 25 | } 26 | 27 | # Make sure parentObj is hier blk 28 | set parentType [get_property TYPE $parentObj] 29 | if { $parentType ne "hier" } { 30 | puts "ERROR: Parent <$parentObj> has TYPE = <$parentType>. Expected to be ." 31 | return 32 | } 33 | 34 | # Save current instance; Restore later 35 | set oldCurInst [current_bd_instance .] 36 | 37 | # Set parent object as current 38 | current_bd_instance $parentObj 39 | 40 | # Add the Processor System and apply board preset 41 | create_bd_cell -type ip -vlnv xilinx.com:ip:processing_system7 processing_system7_0 42 | apply_bd_automation -rule xilinx.com:bd_rule:processing_system7 -config {make_external "FIXED_IO, DDR" apply_board_preset "1" Master "Disable" Slave "Disable" } [get_bd_cells processing_system7_0] 43 | 44 | # Configure the PS: Generate 100MHz clock, Enable GP0 45 | set_property -dict [list CONFIG.PCW_USE_M_AXI_GP0 {1}] [get_bd_cells processing_system7_0] 46 | 47 | # Connect the FCLK_CLK0 to the PS GP0 48 | connect_bd_net [get_bd_pins processing_system7_0/FCLK_CLK0] [get_bd_pins processing_system7_0/M_AXI_GP0_ACLK] 49 | 50 | # Restore current instance 51 | current_bd_instance $oldCurInst 52 | 53 | save_bd_design 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | microzed-base 2 | ============= 3 | 4 | Base project for the MicroZed 5 | 6 | ## Requirements 7 | 8 | This project is designed for Vivado 2020.2. If you are using an older version of Vivado, then you *MUST* use an older version 9 | of this repository. Refer to the [list of commits](https://github.com/fpgadeveloper/microzed-base/commits/master "list of commits") 10 | to find links to the older versions of this repository. 11 | 12 | * Vivado 2020.2 13 | * [MicroZed 7Z010](http://microzed.org "MicroZed 7Z010") 14 | 15 | ## Description 16 | 17 | This project is a base system for the MicroZed. The design contains only 18 | the Zynq PS and is designed for and tested on the MicroZed. 19 | 20 | A tutorial for recreating this project in the Vivado GUI can be found here: 21 | 22 | http://www.fpgadeveloper.com/2014/07/creating-a-base-system-for-the-zynq-in-vivado.html 23 | 24 | ## Installation of MicroZed board definition files 25 | 26 | To use this project, you must first install the board definition files 27 | for the MicroZed into your Vivado installation. 28 | 29 | The following folders contain the board definition files and can be found in this project repository at this location: 30 | 31 | https://github.com/fpgadeveloper/microzed-base/tree/master/Vivado/boards/board_files 32 | 33 | * `microzed_7010` 34 | * `microzed_7020` 35 | 36 | Copy those folders and their contents into the `C:\Xilinx\Vivado\2020.2\data\boards\board_files` folder (this may 37 | be different on your machine, depending on your Vivado installation directory). 38 | 39 | ## Troubleshooting 40 | 41 | Check the following if the project fails to build or generate a bitstream: 42 | 43 | ### 1. Are you using the correct version of Vivado for this version of the repository? 44 | Check the version specified in the Requirements section of this readme file. Note that this project is regularly maintained to the latest 45 | version of Vivado and you may have to refer to an earlier commit of this repo if you are using an older version of Vivado. 46 | 47 | ### 2. Did you follow the Build instructions in this readme file? 48 | All the projects in the repo are built, synthesised and implemented to a bitstream before being committed, so if you follow the 49 | instructions, there should not be any build issues. 50 | 51 | ### 3. Did you copy/clone the repo into a short directory structure? 52 | Vivado doesn't cope well with long directory structures, so copy/clone the repo into a short directory structure such as 53 | `C:\projects\`. When working in long directory structures, you can get errors relating to missing files, particularly files 54 | that are normally generated by Vivado (FIFOs, etc). 55 | 56 | ## License 57 | 58 | Feel free to modify the code for your specific application. 59 | 60 | ## Fork and share 61 | 62 | If you port this project to another hardware platform, please send me the 63 | code or push it onto GitHub and send me the link so I can post it on my 64 | website. The more people that benefit, the better. 65 | 66 | ## About us 67 | 68 | This project was developed by [Opsero Inc.](http://opsero.com "Opsero Inc."), 69 | a tight-knit team of FPGA experts delivering FPGA products and design services to start-ups and tech companies. 70 | Follow our blog, [FPGA Developer](http://www.fpgadeveloper.com "FPGA Developer"), for news, tutorials and 71 | updates on the awesome projects we work on. -------------------------------------------------------------------------------- /Vivado/build.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # build.tcl: Tcl script for re-creating project 'microzed_base' 3 | # 4 | #***************************************************************************************** 5 | 6 | # Check the version of Vivado used 7 | set version_required "2020.2" 8 | set ver [lindex [split $::env(XILINX_VIVADO) /] 3] 9 | if {![string equal $ver $version_required]} { 10 | puts "###############################" 11 | puts "### Failed to build project ###" 12 | puts "###############################" 13 | puts "This project was designed for use with Vivado $version_required." 14 | puts "You are using Vivado $ver. Please install Vivado $version_required," 15 | puts "or download the project sources from a commit of the Git repository" 16 | puts "that was intended for your version of Vivado ($ver)." 17 | return 18 | } 19 | 20 | set design_name microzed_base 21 | 22 | # Set the reference directory for source file relative paths (by default the value is script directory path) 23 | set origin_dir "." 24 | 25 | # Set the directory path for the original project from where this script was exported 26 | set orig_proj_dir "[file normalize "$origin_dir/$design_name"]" 27 | 28 | # Create project 29 | create_project $design_name $origin_dir/$design_name -part xc7z010clg400-1 30 | 31 | # Set the directory path for the new project 32 | set proj_dir [get_property directory [current_project]] 33 | 34 | # Set project properties 35 | set obj [get_projects $design_name] 36 | set_property -name "board_part" -value "em.avnet.com:microzed_7010:part0:1.2" -objects $obj 37 | set_property -name "default_lib" -value "xil_defaultlib" -objects $obj 38 | set_property -name "ip_cache_permissions" -value "read write" -objects $obj 39 | set_property -name "ip_output_repo" -value "$proj_dir/$design_name.cache/ip" -objects $obj 40 | set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj 41 | set_property -name "simulator_language" -value "Mixed" -objects $obj 42 | 43 | # Create 'sources_1' fileset (if not found) 44 | if {[string equal [get_filesets -quiet sources_1] ""]} { 45 | create_fileset -srcset sources_1 46 | } 47 | 48 | 49 | # Set 'sources_1' fileset properties 50 | set obj [get_filesets sources_1] 51 | set_property "top" "${design_name}_wrapper" $obj 52 | 53 | # Create 'constrs_1' fileset (if not found) 54 | if {[string equal [get_filesets -quiet constrs_1] ""]} { 55 | create_fileset -constrset constrs_1 56 | } 57 | 58 | # Set 'constrs_1' fileset object 59 | set obj [get_filesets constrs_1] 60 | 61 | # Empty (no sources present) 62 | 63 | # Set 'constrs_1' fileset properties 64 | set obj [get_filesets constrs_1] 65 | 66 | # Create 'sim_1' fileset (if not found) 67 | if {[string equal [get_filesets -quiet sim_1] ""]} { 68 | create_fileset -simset sim_1 69 | } 70 | 71 | # Set 'sim_1' fileset object 72 | set obj [get_filesets sim_1] 73 | # Empty (no sources present) 74 | 75 | # Set 'sim_1' fileset properties 76 | set obj [get_filesets sim_1] 77 | set_property "top" "${design_name}_wrapper" $obj 78 | 79 | # Create 'synth_1' run (if not found) 80 | if {[string equal [get_runs -quiet synth_1] ""]} { 81 | create_run -name synth_1 -part xc7z010clg400-1 -flow {Vivado Synthesis 2020} -strategy "Vivado Synthesis Defaults" -constrset constrs_1 82 | } else { 83 | set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1] 84 | set_property flow "Vivado Synthesis 2020" [get_runs synth_1] 85 | } 86 | set obj [get_runs synth_1] 87 | 88 | # set the current synth run 89 | current_run -synthesis [get_runs synth_1] 90 | 91 | # Create 'impl_1' run (if not found) 92 | if {[string equal [get_runs -quiet impl_1] ""]} { 93 | create_run -name impl_1 -part xc7z010clg400-1 -flow {Vivado Implementation 2020} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1 94 | } else { 95 | set_property strategy "Vivado Implementation Defaults" [get_runs impl_1] 96 | set_property flow "Vivado Implementation 2020" [get_runs impl_1] 97 | } 98 | set obj [get_runs impl_1] 99 | set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj 100 | set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj 101 | 102 | # set the current impl run 103 | current_run -implementation [get_runs impl_1] 104 | 105 | puts "INFO: Project created:${design_name}" 106 | 107 | # Create block design 108 | source $origin_dir/src/bd/design_1.tcl 109 | 110 | # Generate the wrapper 111 | make_wrapper -files [get_files *${design_name}.bd] -top 112 | add_files -norecurse ${design_name}/${design_name}.srcs/sources_1/bd/${design_name}/hdl/${design_name}_wrapper.v 113 | 114 | # Update the compile order 115 | update_compile_order -fileset sources_1 116 | update_compile_order -fileset sim_1 117 | 118 | # Ensure parameter propagation has been performed 119 | close_bd_design [current_bd_design] 120 | open_bd_design [get_files ${design_name}.bd] 121 | validate_bd_design -force 122 | save_bd_design 123 | 124 | -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7010/1.2/preset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | -------------------------------------------------------------------------------- /Vivado/boards/board_files/microzed_7020/1.2/preset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | --------------------------------------------------------------------------------