Skip to content

Commit

Permalink
ad7606: Fix critical warnings for base addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
StancaPop committed Aug 7, 2024
1 parent 2fe62be commit 8cd7e11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions ad7606x/system_bd.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@ create_bd_port -dir O sys_clk

ad_connect sys_clk sys_cpu_clk

if {$INTF == 0} {
set BA_AD7606X 0x44A00000
adi_sim_add_define "AXI_AD7606X_BA=[format "%d" ${BA_AD7606X}]"

set BA_SPI_REGMAP 0x44A00000
adi_sim_add_define "SPI_AD7606_REGMAP_BA=[format "%d" ${BA_SPI_REGMAP}]"

if {$INTF == 0} {
create_bd_port -dir O spi_clk
ad_connect spi_clk sys_cpu_clk

set BA_AD7606X 0x44A00000
set_property offset $BA_AD7606X [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_ad7606x}]
adi_sim_add_define "AXI_AD7606X_BA=[format "%d" ${BA_AD7606X}]"

} else {

set BA_SPI_REGMAP 0x44A00000
} else {
set_property offset $BA_SPI_REGMAP [get_bd_addr_segs {mng_axi_vip/Master_AXI/spi_ad7606_axi_regmap}]
adi_sim_add_define "SPI_AD7606_REGMAP_BA=[format "%d" ${BA_SPI_REGMAP}]"

}

set BA_DMA 0x44A30000
Expand Down
2 changes: 1 addition & 1 deletion ad7606x/tests/test_program_si.sv
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ task sanity_test();
bit [31:0] pcore_version = (`DEFAULT_AXI_SPI_ENGINE_VERSION_VERSION_PATCH)
| (`DEFAULT_AXI_SPI_ENGINE_VERSION_VERSION_MINOR)<<8
| (`DEFAULT_AXI_SPI_ENGINE_VERSION_VERSION_MAJOR)<<16;
axi_read_v (`PULSAR_ADC_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_VERSION), pcore_version);
axi_read_v (`SPI_AD7606_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_VERSION), pcore_version);
axi_write (`SPI_AD7606_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_SCRATCH), 32'hDEADBEEF);
axi_read_v (`SPI_AD7606_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_SCRATCH), 32'hDEADBEEF);
`INFO(("Sanity Test Done"));
Expand Down

0 comments on commit 8cd7e11

Please sign in to comment.