Skip to content

Commit

Permalink
Update makefile scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dnorthcote committed Mar 31, 2022
1 parent 9aa0880 commit f0c19f7
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 69 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all: rfsoc2x2 zcu111

rfsoc2x2:
$(MAKE) -C boards/RFSoC2x2/rfsoc_radio/

zcu111:
$(MAKE) -C boards/ZCU111/rfsoc_radio/
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ cd /<repository-location>/boards/<board-name>/rfsoc_radio/
Now that we have moved into the correct directory, make the Vivado project by running the make commands below sequentially.

```sh
make project
make block_design
make bitstream_file
make bitstream
```

Alternatively, you can run the entire project build by executing the following into the tcl console:
Expand Down
15 changes: 6 additions & 9 deletions boards/RFSoC2x2/rfsoc_radio/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
overlay_name := rfsoc_radio
design_name := block_design

all: project block_design bitstream_file

project:
vivado -mode batch -source make_project.tcl -notrace
all: block_design bitstream clean

block_design:
vivado -mode batch -source make_block_design.tcl -notrace

bitstream_file:
vivado -mode batch -source make_bitstream.tcl -notrace
bitstream:
vivado -mode batch -source make_bitstream.tcl -notrace

clean:
rm -rf block_design *.jou *.log NA .Xil
10 changes: 5 additions & 5 deletions boards/RFSoC2x2/rfsoc_radio/make_bitstream.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set overlay_name "rfsoc_radio"
set design_name "block_design"
set overlay_name "block_design"
set design_name "rfsoc_radio"

# Open project
open_project ./${overlay_name}/${overlay_name}.xpr
Expand All @@ -12,11 +12,11 @@ set_property top ${design_name}_wrapper [current_fileset]
update_compile_order -fileset sources_1

# Call implement
launch_runs impl_1 -to_step write_bitstream -jobs 4
launch_runs impl_1 -to_step write_bitstream -jobs 12
wait_on_run impl_1

# Move and rename bitstream to final location
file copy -force ./${overlay_name}/${overlay_name}.runs/impl_1/${design_name}_wrapper.bit ./bitstream/${overlay_name}.bit
file copy -force ./${overlay_name}/${overlay_name}.runs/impl_1/${design_name}_wrapper.bit ./bitstream/${design_name}.bit

# copy hwh files
file copy -force ./${overlay_name}/${overlay_name}.gen/sources_1/bd/${design_name}/hw_handoff/${design_name}.hwh ./bitstream/${overlay_name}.hwh
file copy -force ./${overlay_name}/${overlay_name}.gen/sources_1/bd/${design_name}/hw_handoff/${design_name}.hwh ./bitstream/${design_name}.hwh
19 changes: 14 additions & 5 deletions boards/RFSoC2x2/rfsoc_radio/make_block_design.tcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
set overlay_name "rfsoc_radio"
set design_name "block_design"
set overlay_name "block_design"
set design_name "rfsoc_radio"
set iprepo_dir ./../../ip/iprepo

# Open project
open_project ./${overlay_name}/${overlay_name}.xpr
# Create project
create_project ${overlay_name} ./${overlay_name} -part xczu28dr-ffvg1517-2-e
set_property target_language VHDL [current_project]

# Set IP repository paths
set_property ip_repo_paths $iprepo_dir [current_project]
update_ip_catalog

# Add constraints
add_files -fileset constrs_1 -norecurse ./constraints.xdc

# Make block design
source ./${design_name}.tcl
source ./${design_name}.tcl
14 changes: 0 additions & 14 deletions boards/RFSoC2x2/rfsoc_radio/make_project.tcl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if { $list_projs eq "" } {

# CHANGE DESIGN NAME HERE
variable design_name
set design_name block_design
set design_name rfsoc_radio

# If you do not already have an existing IP Integrator design open,
# you can create a design using the following command:
Expand Down
15 changes: 6 additions & 9 deletions boards/ZCU111/rfsoc_radio/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
overlay_name := rfsoc_radio
design_name := block_design

all: project block_design bitstream_file

project:
vivado -mode batch -source make_project.tcl -notrace
all: block_design bitstream clean

block_design:
vivado -mode batch -source make_block_design.tcl -notrace

bitstream_file:
vivado -mode batch -source make_bitstream.tcl -notrace
bitstream:
vivado -mode batch -source make_bitstream.tcl -notrace

clean:
rm -rf block_design *.jou *.log NA .Xil
10 changes: 5 additions & 5 deletions boards/ZCU111/rfsoc_radio/make_bitstream.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set overlay_name "rfsoc_radio"
set design_name "block_design"
set overlay_name "block_design"
set design_name "rfsoc_radio"

# Open project
open_project ./${overlay_name}/${overlay_name}.xpr
Expand All @@ -12,11 +12,11 @@ set_property top ${design_name}_wrapper [current_fileset]
update_compile_order -fileset sources_1

# Call implement
launch_runs impl_1 -to_step write_bitstream -jobs 4
launch_runs impl_1 -to_step write_bitstream -jobs 12
wait_on_run impl_1

# Move and rename bitstream to final location
file copy -force ./${overlay_name}/${overlay_name}.runs/impl_1/${design_name}_wrapper.bit ./bitstream/${overlay_name}.bit
file copy -force ./${overlay_name}/${overlay_name}.runs/impl_1/${design_name}_wrapper.bit ./bitstream/${design_name}.bit

# copy hwh files
file copy -force ./${overlay_name}/${overlay_name}.gen/sources_1/bd/${design_name}/hw_handoff/${design_name}.hwh ./bitstream/${overlay_name}.hwh
file copy -force ./${overlay_name}/${overlay_name}.gen/sources_1/bd/${design_name}/hw_handoff/${design_name}.hwh ./bitstream/${design_name}.hwh
19 changes: 14 additions & 5 deletions boards/ZCU111/rfsoc_radio/make_block_design.tcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
set overlay_name "rfsoc_radio"
set design_name "block_design"
set overlay_name "block_design"
set design_name "rfsoc_radio"
set iprepo_dir ./../../ip/iprepo

# Open project
open_project ./${overlay_name}/${overlay_name}.xpr
# Create project
create_project ${overlay_name} ./${overlay_name} -part xczu28dr-ffvg1517-2-e
set_property target_language VHDL [current_project]

# Set IP repository paths
set_property ip_repo_paths $iprepo_dir [current_project]
update_ip_catalog

# Add constraints
add_files -fileset constrs_1 -norecurse ./constraints.xdc

# Make block design
source ./${design_name}.tcl
source ./${design_name}.tcl
14 changes: 0 additions & 14 deletions boards/ZCU111/rfsoc_radio/make_project.tcl

This file was deleted.

File renamed without changes.

0 comments on commit f0c19f7

Please sign in to comment.