Skip to content

Commit

Permalink
axi_dmac: List valid store-and-forward memory sizes
Browse files Browse the repository at this point in the history
For correct operation the store-and-forward memory size must be a
power-of-two in the range of 2 to 32.

This is simple enough so we can list all values and let the IP Integrator
and QSYS perform proper validation of the parameter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
  • Loading branch information
larsclausen authored and Lars-Peter Clausen committed Jun 5, 2018
1 parent 682895c commit 15b0e38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/axi_dmac/axi_dmac_hw.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ set_parameter_property DMA_LENGTH_WIDTH GROUP $group
add_parameter FIFO_SIZE INTEGER 4
set_parameter_property FIFO_SIZE DISPLAY_NAME "FIFO Size (In Bursts)"
set_parameter_property FIFO_SIZE HDL_PARAMETER true
set_parameter_property FIFO_SIZE ALLOWED_RANGES {2 4 8 16 32}
set_parameter_property FIFO_SIZE GROUP $group

add_parameter MAX_BYTES_PER_BURST INTEGER 128
Expand Down
7 changes: 7 additions & 0 deletions library/axi_dmac/axi_dmac_ip.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ foreach intf [ipx::get_bus_interfaces m_*_axi -of_objects $cc] {
set_property "VALUE" "0" $para
}

set_property -dict [list \
"value_validation_type" "list" \
"value_validation_list" "2 4 8 16 32" \
] \
[ipx::get_user_parameters FIFO_SIZE -of_objects $cc]

set_property -dict [list \
"value_validation_type" "range_long" \
"value_validation_range_minimum" "8" \
Expand Down Expand Up @@ -311,6 +317,7 @@ set_property -dict [list \
set p [ipgui::get_guiparamspec -name "FIFO_SIZE" -component $cc]
ipgui::move_param -component $cc -order 2 $p -parent $general_group
set_property -dict [list \
"widget" "comboBox" \
"display_name" "FIFO Size (In Bursts)" \
] $p

Expand Down

0 comments on commit 15b0e38

Please sign in to comment.