mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Changed names of fpga IP modules to match textbook. Updated boot.h to
use the correct clock speed for #DEFINE for UART in the zero stage bootloader.
This commit is contained in:
parent
b4bcd7b0b1
commit
8d40a0a092
@ -27,19 +27,15 @@ FPGA_VCU: PreProcessFiles IP_VCU
|
||||
|
||||
# Generate IP Blocks
|
||||
.PHONY: IP_Arty IP_VCU
|
||||
IP_VCU: $(dst)/xlnx_proc_sys_reset.log \
|
||||
IP_VCU: $(dst)/sysrst.log \
|
||||
MEM_VCU \
|
||||
$(dst)/xlnx_axi_clock_converter.log \
|
||||
$(dst)/xlnx_ahblite_axi_bridge.log \
|
||||
$(dst)/xlnx_axi_crossbar.log \
|
||||
$(dst)/xlnx_axi_dwidth_conv_32to64.log \
|
||||
$(dst)/xlnx_axi_dwidth_conv_64to32.log \
|
||||
$(dst)/xlnx_axi_prtcl_conv.log
|
||||
IP_Arty: $(dst)/xlnx_proc_sys_reset.log \
|
||||
$(dst)/clkconverter.log \
|
||||
$(dst)/ahbaxibridge.log
|
||||
IP_Arty: $(dst)/sysrst.log \
|
||||
MEM_Arty \
|
||||
$(dst)/xlnx_mmcm.log \
|
||||
$(dst)/xlnx_axi_clock_converter.log \
|
||||
$(dst)/xlnx_ahblite_axi_bridge.log
|
||||
$(dst)/mmcm.log \
|
||||
$(dst)/clkconverter.log \
|
||||
$(dst)/ahbaxibridge.log
|
||||
#$(dst)/xlnx_axi_crossbar.log \
|
||||
#$(dst)/xlnx_axi_dwidth_conv_32to64.log \
|
||||
#$(dst)/xlnx_axi_dwidth_conv_64to32.log \
|
||||
|
||||
@ -89,10 +89,11 @@ report_clock_interaction -file re
|
||||
write_verilog -force -mode funcsim sim/syn-funcsim.v
|
||||
|
||||
if {$board=="ArtyA7"} {
|
||||
source ../constraints/small-debug.xdc
|
||||
#source ../constraints/small-debug.xdc
|
||||
#source ../constraints/small-debug-rvvi.xdc
|
||||
} else {
|
||||
source ../constraints/vcu-small-debug.xdc
|
||||
#source ../constraints/vcu-small-debug.xdc
|
||||
source ../constraints/small-debug.xdc
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_ahblite_axi_bridge
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
if {$boardName!="ArtyA7"} {
|
||||
set_property board_part $boardName [current_project]
|
||||
}
|
||||
|
||||
# really just these two lines which change
|
||||
create_ip -name ahblite_axi_bridge -vendor xilinx.com -library ip -module_name $ipName
|
||||
set_property -dict [list CONFIG.C_M_AXI_DATA_WIDTH {64} CONFIG.C_S_AHB_DATA_WIDTH {64} CONFIG.C_M_AXI_THREAD_ID_WIDTH {4}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,28 +0,0 @@
|
||||
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
set ipName xlnx_axi_clock_converter
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
if {$boardName!="ArtyA7"} {
|
||||
set_property board_part $boardName [current_project]
|
||||
}
|
||||
|
||||
create_ip -name axi_clock_converter -vendor xilinx.com -library ip -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.ACLK_ASYNC {1} \
|
||||
CONFIG.PROTOCOL {AXI4} \
|
||||
CONFIG.ADDR_WIDTH {32} \
|
||||
CONFIG.DATA_WIDTH {64} \
|
||||
CONFIG.ID_WIDTH {4} \
|
||||
CONFIG.MI_CLK.FREQ_HZ {208333333} \
|
||||
CONFIG.SI_CLK.FREQ_HZ {10000000}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,32 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_axi_crossbar
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name axi_crossbar -vendor xilinx.com -library ip -version 2.1 -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.NUM_SI {2} \
|
||||
CONFIG.DATA_WIDTH {64} \
|
||||
CONFIG.ID_WIDTH {4} \
|
||||
CONFIG.M01_S01_READ_CONNECTIVITY {0} \
|
||||
CONFIG.M01_S01_WRITE_CONNECTIVITY {0} \
|
||||
CONFIG.M00_A00_BASE_ADDR {0x0000000080000000} \
|
||||
CONFIG.M01_A00_BASE_ADDR {0x0000000000013000} \
|
||||
CONFIG.M00_A00_ADDR_WIDTH {31}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,25 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_axi_dwidth_conv_32to64
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name axi_dwidth_converter -vendor xilinx.com -library ip -version 2.1 -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.Component_Name {axi_dwidth_conv_32to64}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,27 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_axi_dwidth_conv_64to32
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name axi_dwidth_converter -vendor xilinx.com -library ip -version 2.1 -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.Component_Name {axi_dwidth_conv_64to32} \
|
||||
CONFIG.SI_DATA_WIDTH {64} \
|
||||
CONFIG.MI_DATA_WIDTH {32}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,25 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_axi_dwidth_converter
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name axi_dwidth_converter -vendor xilinx.com -library ip -version 2.1 -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.Component_Name {axi_dwidth_converter}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,23 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
# vcu118 board
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
# kcu105 board
|
||||
#set partNumber xcku040-ffva1156-2-e
|
||||
#set boardName xilinx.com:kcu105:part0:1.7
|
||||
|
||||
set ipName xlnx_axi_prtcl_conv
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name axi_protocol_converter -vendor xilinx.com -library ip -version 2.1 -module_name $ipName
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,27 +0,0 @@
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
|
||||
set ipName xlnx_mmcm
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
set_property board_part $boardName [current_project]
|
||||
|
||||
create_ip -name clk_wiz -vendor xilinx.com -library ip -module_name $ipName
|
||||
|
||||
set_property -dict [list CONFIG.PRIM_IN_FREQ {100.000} \
|
||||
CONFIG.NUM_OUT_CLKS {3} \
|
||||
CONFIG.CLKOUT2_USED {true} \
|
||||
CONFIG.CLKOUT3_USED {true} \
|
||||
CONFIG.CLKOUT4_USED {true} \
|
||||
CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {166.66667} \
|
||||
CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {200} \
|
||||
CONFIG.CLKOUT3_REQUESTED_OUT_FREQ {20} \
|
||||
CONFIG.CLKOUT4_REQUESTED_OUT_FREQ {25} \
|
||||
CONFIG.CLKIN1_JITTER_PS {10.0} \
|
||||
] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -1,26 +0,0 @@
|
||||
|
||||
set partNumber $::env(XILINX_PART)
|
||||
set boardName $::env(XILINX_BOARD)
|
||||
#set partNumber xcvu9p-flga2104-2L-e
|
||||
#set boardName xilinx.com:vcu118:part0:2.4
|
||||
|
||||
set ipName xlnx_proc_sys_reset
|
||||
|
||||
create_project $ipName . -force -part $partNumber
|
||||
if {$boardName!="ArtyA7"} {
|
||||
set_property board_part $boardName [current_project]
|
||||
}
|
||||
|
||||
# really just these two lines which change
|
||||
create_ip -name proc_sys_reset -vendor xilinx.com -library ip -module_name $ipName
|
||||
set_property -dict [list CONFIG.C_AUX_RESET_HIGH {1} \
|
||||
CONFIG.C_AUX_RST_WIDTH {1} \
|
||||
CONFIG.C_EXT_RESET_HIGH {1} \
|
||||
CONFIG.C_EXT_RST_WIDTH {1} \
|
||||
CONFIG.C_NUM_BUS_RST {1}] [get_ips $ipName]
|
||||
|
||||
generate_target {instantiation_template} [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
generate_target all [get_files ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
create_ip_run [get_files -of_objects [get_fileset sources_1] ./$ipName.srcs/sources_1/ip/$ipName/$ipName.xci]
|
||||
launch_run -jobs 8 ${ipName}_synth_1
|
||||
wait_on_run ${ipName}_synth_1
|
||||
@ -225,7 +225,7 @@ module fpgaTop #(parameter logic RVVI_SYNTH_SUPPORTED = 0)
|
||||
// 2. a second clock which is 200 MHz
|
||||
// Wally requires a slower clock. At this point I don't know what speed the atrix 7 will run so I'm initially targetting 25Mhz.
|
||||
// the mig will output a clock at 1/4 the sys clock or 41Mhz which might work with wally so we may be able to simplify the logic a lot.
|
||||
xlnx_mmcm xln_mmcm(.clk_out1(clk167),
|
||||
mmcm mmcm(.clk_out1(clk167),
|
||||
.clk_out2(clk200),
|
||||
.clk_out3(CPUCLK),
|
||||
.clk_out4(phy_ref_clk),
|
||||
@ -236,7 +236,7 @@ module fpgaTop #(parameter logic RVVI_SYNTH_SUPPORTED = 0)
|
||||
|
||||
|
||||
// reset controller XILINX IP
|
||||
xlnx_proc_sys_reset xlnx_proc_sys_reset_0
|
||||
sysrst sysrst
|
||||
(.slowest_sync_clk(CPUCLK),
|
||||
.ext_reset_in(1'b0),
|
||||
.aux_reset_in(south_reset),
|
||||
@ -262,7 +262,7 @@ module fpgaTop #(parameter logic RVVI_SYNTH_SUPPORTED = 0)
|
||||
|
||||
|
||||
// ahb lite to axi bridge
|
||||
xlnx_ahblite_axi_bridge xlnx_ahblite_axi_bridge_0
|
||||
ahbaxibridge ahbaxibridge
|
||||
(.s_ahb_hclk(CPUCLK),
|
||||
.s_ahb_hresetn(peripheral_aresetn),
|
||||
.s_ahb_hsel(HSELEXT),
|
||||
@ -314,7 +314,7 @@ module fpgaTop #(parameter logic RVVI_SYNTH_SUPPORTED = 0)
|
||||
.m_axi_rready(m_axi_rready));
|
||||
|
||||
// AXI Clock Converter
|
||||
xlnx_axi_clock_converter xlnx_axi_clock_converter_0
|
||||
clkconverter clkconverter
|
||||
(.s_axi_aclk(CPUCLK),
|
||||
.s_axi_aresetn(peripheral_aresetn),
|
||||
.s_axi_awid(m_axi_awid),
|
||||
|
||||
@ -153,7 +153,7 @@ void copyFlash(QWORD address, QWORD * Dst, DWORD numBlocks) {
|
||||
int ret = 0;
|
||||
|
||||
// Initialize UART for messages
|
||||
init_uart(20000000, 115200);
|
||||
init_uart(SYSTEMCLOCK, 115200);
|
||||
|
||||
// Print the wally banner
|
||||
print_uart(BANNER);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user