From d8beb37f015b525857d374cf27ecf31f5e167c6d Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 3 Jun 2021 17:01:55 +0300 Subject: [PATCH] Added Vivado-specific scripts --- scripts/allow_wors.tcl | 10 ++++++++++ scripts/jtag_to_axi_master.tcl | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 scripts/allow_wors.tcl create mode 100644 scripts/jtag_to_axi_master.tcl diff --git a/scripts/allow_wors.tcl b/scripts/allow_wors.tcl new file mode 100644 index 0000000..cad69ea --- /dev/null +++ b/scripts/allow_wors.tcl @@ -0,0 +1,10 @@ +#------------------------------------------------------------------------------ +# allow_wors.tcl +# Konstantin Pavlov, pavlovconst@gmail.com +#------------------------------------------------------------------------------ + +# INFO ------------------------------------------------------------------------ +# Simple script to add wor type support in Vivado +# Add this script as a tcl.pre for the Synthesis step + +set_param synth.elaboration.rodinMoreOptions "rt::set_parameter compatibilityMode true" \ No newline at end of file diff --git a/scripts/jtag_to_axi_master.tcl b/scripts/jtag_to_axi_master.tcl new file mode 100644 index 0000000..581b99e --- /dev/null +++ b/scripts/jtag_to_axi_master.tcl @@ -0,0 +1,24 @@ +#------------------------------------------------------------------------------ +# jtag_to_axi_master.tcl +# Konstantin Pavlov, pavlovconst@gmail.com +#------------------------------------------------------------------------------ + +# INFO ------------------------------------------------------------------------ +# Use this script to read/write AXI bus through "JTAG to AXI Master" IP-core + +# value should be 8 HEX digits == 32bit +proc wr {address value} { + #set address [string range $address 2 [expr {[string length $address]-1}]] + create_hw_axi_txn -force wr_tx [get_hw_axis hw_axi_1] \ + -address $address -data $value -len 1 -type write + run_hw_axi -quiet wr_tx +} + +proc rd {address} { + #set address [string range $address 2 [expr {[string length $address]-1}]] + create_hw_axi_txn -force rd_tx [get_hw_axis hw_axi_1] \ + -address $address -len 1 -type read + run_hw_axi -quiet rd_tx + return 0x[get_property DATA [get_hw_axi_txn rd_tx]] +} +