Add AXI4-Stream UART IP and associated files
- Created board.xit for physical constraints related to UART interface. - Added vv_index.xml to define the AXI4-Stream UART IP with relevant metadata. - Implemented GUI for AXI4-Stream UART parameters in AXI4Stream_UART_v1_0.tcl and AXI4Stream_UART_v1_1.tcl. - Initialized Vivado project files for diligent_jstk and loopback_I2S designs, including synthesis and implementation settings. - Configured file sets and simulation options for both projects.
This commit is contained in:
89
LAB3/ip/AXI4-Stream_UART/bd/bd.tcl
Normal file
89
LAB3/ip/AXI4-Stream_UART/bd/bd.tcl
Normal file
@@ -0,0 +1,89 @@
|
||||
|
||||
proc init { cellpath otherInfo } {
|
||||
|
||||
set cell_handle [get_bd_cells $cellpath]
|
||||
set all_busif [get_bd_intf_pins $cellpath/*]
|
||||
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]
|
||||
set full_sbusif_list [list ]
|
||||
|
||||
foreach busif $all_busif {
|
||||
if { [string equal -nocase [get_property MODE $busif] "slave"] == 1 } {
|
||||
set busif_param_list [list]
|
||||
set busif_name [get_property NAME $busif]
|
||||
if { [lsearch -exact -nocase $full_sbusif_list $busif_name ] == -1 } {
|
||||
continue
|
||||
}
|
||||
foreach tparam $axi_standard_param_list {
|
||||
lappend busif_param_list "C_${busif_name}_${tparam}"
|
||||
}
|
||||
bd::mark_propagate_only $cell_handle $busif_param_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc pre_propagate {cellpath otherInfo } {
|
||||
|
||||
set cell_handle [get_bd_cells $cellpath]
|
||||
set all_busif [get_bd_intf_pins $cellpath/*]
|
||||
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]
|
||||
|
||||
foreach busif $all_busif {
|
||||
if { [string equal -nocase [get_property CONFIG.PROTOCOL $busif] "AXI4"] != 1 } {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [get_property MODE $busif] "master"] != 1 } {
|
||||
continue
|
||||
}
|
||||
|
||||
set busif_name [get_property NAME $busif]
|
||||
foreach tparam $axi_standard_param_list {
|
||||
set busif_param_name "C_${busif_name}_${tparam}"
|
||||
|
||||
set val_on_cell_intf_pin [get_property CONFIG.${tparam} $busif]
|
||||
set val_on_cell [get_property CONFIG.${busif_param_name} $cell_handle]
|
||||
|
||||
if { [string equal -nocase $val_on_cell_intf_pin $val_on_cell] != 1 } {
|
||||
if { $val_on_cell != "" } {
|
||||
set_property CONFIG.${tparam} $val_on_cell $busif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc propagate {cellpath otherInfo } {
|
||||
|
||||
set cell_handle [get_bd_cells $cellpath]
|
||||
set all_busif [get_bd_intf_pins $cellpath/*]
|
||||
set axi_standard_param_list [list ID_WIDTH AWUSER_WIDTH ARUSER_WIDTH WUSER_WIDTH RUSER_WIDTH BUSER_WIDTH]
|
||||
|
||||
# Set module clock frequency reference to be equal to the input clock.
|
||||
set_property CONFIG.UART_CLOCK_FREQUENCY [format %d [get_property CONFIG.FREQ_HZ [get_bd_pins $cellpath/clk_uart]]] $cell_handle
|
||||
|
||||
foreach busif $all_busif {
|
||||
if { [string equal -nocase [get_property CONFIG.PROTOCOL $busif] "AXI4"] != 1 } {
|
||||
continue
|
||||
}
|
||||
if { [string equal -nocase [get_property MODE $busif] "slave"] != 1 } {
|
||||
continue
|
||||
}
|
||||
|
||||
set busif_name [get_property NAME $busif]
|
||||
foreach tparam $axi_standard_param_list {
|
||||
set busif_param_name "C_${busif_name}_${tparam}"
|
||||
|
||||
set val_on_cell_intf_pin [get_property CONFIG.${tparam} $busif]
|
||||
set val_on_cell [get_property CONFIG.${busif_param_name} $cell_handle]
|
||||
|
||||
if { [string equal -nocase $val_on_cell_intf_pin $val_on_cell] != 1 } {
|
||||
#override property of bd_interface_net to bd_cell -- only for slaves. May check for supported values..
|
||||
if { $val_on_cell_intf_pin != "" } {
|
||||
set_property CONFIG.${busif_param_name} $val_on_cell_intf_pin $cell_handle
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user