s10soc:ad_cpu_interconnect: Add an avl_address_width attribute

The default address space for a new bridge is 256 Kbytes. Add an
avl_address_width attribute to the ad_cpu_interoconnect porecess to
define other address space sizes if needed.

The avl_peripheral_mm_bridge will have an 128 Kbyte address space from
address 0x0000.
main
Istvan Csomortani 2020-04-24 07:42:05 +01:00 committed by Adrian Costina
parent edd2956d58
commit 8acf0296af
1 changed files with 3 additions and 4 deletions

View File

@ -228,7 +228,7 @@ proc ad_cpu_interrupt {m_irq m_port} {
set_connection_parameter_value sys_hps.f2h_irq0/${m_port} irqNumber ${m_irq} set_connection_parameter_value sys_hps.f2h_irq0/${m_port} irqNumber ${m_irq}
} }
proc ad_cpu_interconnect {m_base m_port {avl_bridge ""} {avl_bridge_base 0x00000000}} { proc ad_cpu_interconnect {m_base m_port {avl_bridge ""} {avl_bridge_base 0x00000000} {avl_address_width 18}} {
if {[string equal ${avl_bridge} ""]} { if {[string equal ${avl_bridge} ""]} {
add_connection sys_hps.h2f_lw_axi_master ${m_port} add_connection sys_hps.h2f_lw_axi_master ${m_port}
@ -237,8 +237,7 @@ proc ad_cpu_interconnect {m_base m_port {avl_bridge ""} {avl_bridge_base 0x00000
if {[lsearch -exact [get_instances] ${avl_bridge}] == -1} { if {[lsearch -exact [get_instances] ${avl_bridge}] == -1} {
## Instantiate the bridge and connect the interfaces ## Instantiate the bridge and connect the interfaces
add_instance ${avl_bridge} altera_avalon_mm_bridge add_instance ${avl_bridge} altera_avalon_mm_bridge
set_instance_parameter_value ${avl_bridge} {USE_AUTO_ADDRESS_WIDTH} {1} set_instance_parameter_value ${avl_bridge} {ADDRESS_WIDTH} $avl_address_width
##set_instance_parameter_value ${avl_bridge} {ADDRESS_WIDTH} {17}
set_instance_parameter_value ${avl_bridge} {SYNC_RESET} {1} set_instance_parameter_value ${avl_bridge} {SYNC_RESET} {1}
add_connection sys_hps.h2f_lw_axi_master ${avl_bridge}.s0 add_connection sys_hps.h2f_lw_axi_master ${avl_bridge}.s0
set_connection_parameter_value sys_hps.h2f_lw_axi_master/${avl_bridge}.s0 baseAddress ${avl_bridge_base} set_connection_parameter_value sys_hps.h2f_lw_axi_master/${avl_bridge}.s0 baseAddress ${avl_bridge_base}
@ -350,7 +349,7 @@ set_interface_property sys_spi EXPORT_OF sys_spi.external
# base-addresses # base-addresses
ad_cpu_interconnect 0x000000e0 sys_id.control_slave "avl_peripheral_mm_bridge" ad_cpu_interconnect 0x000000e0 sys_id.control_slave "avl_peripheral_mm_bridge" 0x0000 17
ad_cpu_interconnect 0x000000d0 sys_gpio_bd.s1 "avl_peripheral_mm_bridge" ad_cpu_interconnect 0x000000d0 sys_gpio_bd.s1 "avl_peripheral_mm_bridge"
ad_cpu_interconnect 0x00000000 sys_gpio_in.s1 "avl_peripheral_mm_bridge" ad_cpu_interconnect 0x00000000 sys_gpio_in.s1 "avl_peripheral_mm_bridge"
ad_cpu_interconnect 0x00000020 sys_gpio_out.s1 "avl_peripheral_mm_bridge" ad_cpu_interconnect 0x00000020 sys_gpio_out.s1 "avl_peripheral_mm_bridge"