<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Bozica (Posts about xilinx)</title><link>http://bozica.co/</link><description></description><atom:link rel="self" type="application/rss+xml" href="http://bozica.co/categories/xilinx.xml"></atom:link><language>en</language><lastBuildDate>Mon, 26 Jun 2017 13:31:06 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Comparison between model based approach and hdl approach for a DDR3 controller</title><link>http://bozica.co/posts/comparison-between-model-based-approach-and-hdl-approach-for-a-ddr3-controller/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;In an earlier &lt;a class="reference external" href="http://bozica.co/posts/fifo-like-controller-for-ddr3-memory/"&gt;post&lt;/a&gt; I described a
simple architecture for creating a FIFO-like DDR3 controller using Vivado's
block design integrator tool. This tool is of great use when interconnecting
various IP Cores with standard interfaces as it was the case. This however is
usually not the most optimal implementation for a given design.&lt;/p&gt;
&lt;p&gt;The usage of the DataMover in the architecture mentioned &lt;a class="reference external" href="http://bozica.co/posts/fifo-like-controller-for-ddr3-memory/"&gt;previously&lt;/a&gt; still required a FSM written in HDL
language to control the different commands and achive the desired behavior.
That FSM dealed with data sizes, addresses and status reports to move data from
the AXI-S to the AXI-MM domain and viceversa.&lt;/p&gt;
&lt;p&gt;After a more detailed review of the AXI-MM protocol the FSM used to issue
commands to the DataMover could be easily modified to instead handle the AXI-MM
interface of the Xilinx's DDR IP Core and therefore eliminating the need
of the DataMover, the AXI-Interconnect and the Block Design tool.&lt;/p&gt;
&lt;p&gt;The following image represents the resource utilization for both approaches.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/ddr-dm_ddr-axi.png"&gt;&lt;img alt="/images/ddr-dm_ddr-axi.thumbnail.png" src="http://bozica.co/images/ddr-dm_ddr-axi.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;Comparizon of resources utilization between both approaches&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;strong&gt;case a)&lt;/strong&gt; represents the utilization of the different blocks in the
&lt;a class="reference external" href="http://bozica.co/posts/fifo-like-controller-for-ddr3-memory/"&gt;model based approach&lt;/a&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Yellow: HDL Block to control the DataMover&lt;/li&gt;
&lt;li&gt;Purple: DDR Controller Block with AXI-MM Interface&lt;/li&gt;
&lt;li&gt;Red: DataMover Block&lt;/li&gt;
&lt;li&gt;Green: AXI-Interconnect Block&lt;/li&gt;
&lt;li&gt;Blue: Input and Output FIFOs for DDR Controller and extra logic for PCIe communication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;case b)&lt;/strong&gt; represents the utilization of the different blocks in the
HDL approach&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Yellow: HDL Block to control the DataMover&lt;/li&gt;
&lt;li&gt;Purple: DDR Controller Block with AXI-MM Interface&lt;/li&gt;
&lt;li&gt;Blue: Input and Output FIFOs for DDR Controller and extra logic for PCIe communication&lt;/li&gt;
&lt;/ul&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="63%"&gt;
&lt;col width="19%"&gt;
&lt;col width="19%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Resource&lt;/th&gt;
&lt;th class="head"&gt;&lt;ol class="first last loweralpha simple"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/th&gt;
&lt;th class="head"&gt;&lt;ol class="first last loweralpha simple" start="2"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;Slice LUTs&lt;/td&gt;
&lt;td&gt;19181&lt;/td&gt;
&lt;td&gt;12557&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Slice Registers&lt;/td&gt;
&lt;td&gt;19262&lt;/td&gt;
&lt;td&gt;10262&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Muxes&lt;/td&gt;
&lt;td&gt;421&lt;/td&gt;
&lt;td&gt;4134&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Slices&lt;/td&gt;
&lt;td&gt;8542&lt;/td&gt;
&lt;td&gt;5017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;LUT FF Pairs&lt;/td&gt;
&lt;td&gt;25096&lt;/td&gt;
&lt;td&gt;15534&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Block RAM tiles&lt;/td&gt;
&lt;td&gt;31.5&lt;/td&gt;
&lt;td&gt;15.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;% of Design&lt;/td&gt;
&lt;td&gt;80 %&lt;/td&gt;
&lt;td&gt;70 %&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;HDL approach (&lt;strong&gt;b&lt;/strong&gt;) uses in average only 70 % of the resources of the model based
approach (&lt;strong&gt;a&lt;/strong&gt;)&lt;/p&gt;&lt;/div&gt;</description><category>block design</category><category>xilinx</category><guid>http://bozica.co/posts/comparison-between-model-based-approach-and-hdl-approach-for-a-ddr3-controller/</guid><pubDate>Sun, 29 May 2016 17:59:05 GMT</pubDate></item><item><title>FIFO-like Controller for DDR3 Memory</title><link>http://bozica.co/posts/fifo-like-controller-for-ddr3-memory/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;In an earlier post &lt;a class="reference external" href="http://bozica.co/posts/correctly-matching-xilinx-native-fifos-to-streaming-axi-fifos/"&gt;Correctly Matching Xilinx Native FIFOs to Streaming AXI FIFOs&lt;/a&gt;,
I mentioned the advantages of interconnecting Xilinx's Native FIFOs to AXI-Streaming
FIFOs and some special considerations on how to do it. Now, I would like to show
a simple architecture to use the DDR3 memory as a Native FIFO.&lt;/p&gt;
&lt;p&gt;The intention of this post is to show a possible implementation for creating a
DDR3 Memory Controller which effectively remove from the end user the address
handling for read and write operations and simply delivers a FIFO behaviour to
the end user. There are many advantages on using a large DDR3 Memory (in the
range of 1 to 4 GB) as regular FIFO. RAM Memory blocks on FPGA devices are very
limited, therefore it is often required to use external devices for such purpose.&lt;/p&gt;
&lt;p&gt;FIFOs are tipically used in FPGA designs as temporal buffers to accomodate temporal
waiting states from the different logic blocks. It provides a great oportunity
to cross clock domains as well. But in general they are very useful when we would
like to buffer detector data which later will be used as part of an algorithm
calculation when all calculations have concluded and then it is required to
substract the original value from the calculated data several clock cycles after
the original value arrived.&lt;/p&gt;
&lt;p&gt;In this scenario, the limiting factor comes from the size of the FIFO that could
be implemented entirely inside an FPGA. Internal storage is very small (~tens of MB)
and therefore the need of designing a simple comtroller for encapsulating DDR3
transactions into input and output FIFO ports.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/s2mm_ddr_mm2s_general.png"&gt;&lt;img alt="/images/s2mm_ddr_mm2s_general.thumbnail.png" src="http://bozica.co/images/s2mm_ddr_mm2s_general.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;General architecture of the design&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Using the Xilinx IP integrator tool, the previours design was implemented along
with a custom FSM (represented by the DataMover Controller Block in the image)
to control the data flow written in Verilog and integrated
with the rest of the block design. The Verilog file contains two simple state
machines for writing and reading operations of the DDR considering the current
status of the input and output FIFOs.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/s2mm_fsm.png"&gt;&lt;img alt="/images/s2mm_fsm.thumbnail.png" src="http://bozica.co/images/s2mm_fsm.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;Finite state machine from streamming domain to DDR3 memory mapped domain.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The transfer of data from the input FIFO to the S2MM AXI-S port of the DataMover
is managed by the state machine mentioned above. When the input FIFO is empty the
FSM remains in the &lt;em&gt;IDLE&lt;/em&gt; state. Once some data has arrived it moves to the
&lt;em&gt;FILLING FIFO&lt;/em&gt; state where it waits until one of two conditions are met.
First the data size contained in the input FIFO has to be greater or equal to
4 kB or second the Timer signal has reached its maximum value.
If one of those two conditions are met, then the FSM proceeds to the &lt;em&gt;SEND CMD&lt;/em&gt;
and &lt;em&gt;SEND DATA&lt;/em&gt; states. The timer signal allows the system to not remain locked in
case that less than 4 kB of data have arrived. The filling level of the FIFO is
measured using the "More Accurate Data Counts" feature available in the
"First Word Fall Through" FIFO. In this way there is an accurate representation
of the data contained inside and therefore the size of the data to transfer can
be calculated appropriately.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;SEND DATA&lt;/em&gt; state the FSM issues read requests to the input FIFO and sends
the data to the AXI-S interface of the DataMover following the special
considerations mentioned in &lt;a class="reference external" href="http://bozica.co/posts/correctly-matching-xilinx-native-fifos-to-streaming-axi-fifos/"&gt;Correctly Matching Xilinx Native FIFOs to Streaming AXI FIFOs&lt;/a&gt;.
The FSM takes care that the exact size of data declared in the &lt;em&gt;SEND CMD&lt;/em&gt; state is
read from the FIFO and transfered to the DataMover. Once the data has been transfered
in its totality the state machine goes back to the initial IDLE state. It is also worth
mentioning that the FIFO can receive more data at the same time it is reading and
transferring to the DataMover. The state machine allows an accurate data size management
so that no data is repeated or lost during the transmission, accurate data counters
also provide a higher level of reliability to the overall transfer.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/mm2s_fsm.png"&gt;&lt;img alt="/images/mm2s_fsm.thumbnail.png" src="http://bozica.co/images/mm2s_fsm.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;Finite state machine from DDR3 memory mapped domain to streamming domain.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The state machine will remain in the &lt;em&gt;IDLE&lt;/em&gt; state until the writing address pointer
is different from the reading address pointer. When the FSM is in the &lt;em&gt;SEND CMD&lt;/em&gt;
state it sends a read request with the appropriate size, but if the data to be
read is larger than 8 MB, it is necessary to issue multiple commands with maximum
"bytes to transfer" (bbt) being 8 MB. This limitation comes from the DataMover itself,
the command have only 23 bits for the &lt;em&gt;bbt&lt;/em&gt; parameter.&lt;/p&gt;&lt;/div&gt;</description><category>block design</category><category>DataMover</category><category>ddr3</category><category>vivado</category><category>xilinx</category><guid>http://bozica.co/posts/fifo-like-controller-for-ddr3-memory/</guid><pubDate>Sun, 29 May 2016 15:59:02 GMT</pubDate></item><item><title>Configuring Xilinx FPGAs with impact in batch mode</title><link>http://bozica.co/posts/configuring-xilinx-fpgas-with-impact-in-batch-mode/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;There are times during the development phase of a project that it is necesary to
configure the FPGA with several different versions of the Firmware as new features
are added and tests with the hardware are required.&lt;/p&gt;
&lt;p&gt;To some designers the impact software have too many pop-out windows asking for
unrelevant information when all we want is to configure the device. By using the
batch mode all gets reduce to a single terminal instruction.&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_f9aace350b814bdfa8a884dc5f5d2c73-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;impact -batch script.cmd&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;I created a simple bash script which takes the .bit filename and replace it in a
general script template to allow configuration of the device with different filenames
without having to modify the script by hand every time.&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_2737887b46dc41a9b8cbd52fd96f386d-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;./fpga_config.sh -f FILENAME.bit&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;You can find the code and a sample batch script in
&lt;a class="reference external" href="https://github.com/leardilap/FPGA_Conf"&gt;github&lt;/a&gt;&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_451e0cdb1dfb4b0a92348a40176d3e6d-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;git clone https://github.com/leardilap/FPGA_Conf.git&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</description><category>impact</category><category>xilinx</category><guid>http://bozica.co/posts/configuring-xilinx-fpgas-with-impact-in-batch-mode/</guid><pubDate>Sat, 05 Mar 2016 23:12:22 GMT</pubDate></item><item><title>Installing Digilent USB-JTAG Programming Cable Drivers</title><link>http://bozica.co/posts/installing-digilent-usb-jtag-programming-cable-drivers/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;Installing impact and the Digilent configuration cable drivers are not always a
smooth task. The USB-JTAG cable is not supported directly with the driver provided
by Xilinx in the Lab Tools, therefore it is necesarry to install external drivers.&lt;/p&gt;
&lt;p&gt;In the Xilinx forums it is possible to find a great number of questions regarding
the installation of the cable drivers but most of those solutions do not really work.
The following is a proven simple set of instructions that will install correctly the
drivers.&lt;/p&gt;
&lt;p&gt;First you need to download the Lab Tools from the Xilinx website, then:&lt;/p&gt;
&lt;p&gt;Install libraries&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_6f380929bbd941a38bdcf596fd1c232c-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;zypper in fxload&lt;/span&gt;
&lt;a name="rest_code_6f380929bbd941a38bdcf596fd1c232c-2"&gt;&lt;/a&gt;&lt;span class="go"&gt;cnf fxload&lt;/span&gt;
&lt;a name="rest_code_6f380929bbd941a38bdcf596fd1c232c-3"&gt;&lt;/a&gt;&lt;span class="go"&gt;zypper in libusb-0_1-4 libusb-1_0-0 libusbmuxd-devel libusbmuxd2&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Install impact&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_cc543e23a1fe4e9aa7cc0e6764f8c7b4-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;tar -xvf Xilinx_LabTools_14.7_1015_1.tar&lt;/span&gt;
&lt;a name="rest_code_cc543e23a1fe4e9aa7cc0e6764f8c7b4-2"&gt;&lt;/a&gt;&lt;span class="go"&gt;cd Xilinx_LabTools_14.7_1015_1&lt;/span&gt;
&lt;a name="rest_code_cc543e23a1fe4e9aa7cc0e6764f8c7b4-3"&gt;&lt;/a&gt;&lt;span class="go"&gt;sudo ./xsetup&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Install official cable drivers&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_43d87426f490433096dbadca216764fd-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;cd /opt/Xilinx/14.7/LabTools/common/bin/lin64/digilent&lt;/span&gt;
&lt;a name="rest_code_43d87426f490433096dbadca216764fd-2"&gt;&lt;/a&gt;&lt;span class="go"&gt;sudo ./install_digilent.sh&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Install .hex and rules in correct locations&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;cd /opt/Xilinx/14.7/LabTools/common/bin/lin64&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-2"&gt;&lt;/a&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-3"&gt;&lt;/a&gt;&lt;span class="go"&gt;sed xusbdfwu.rules -e 's:TEMPNODE:tempnode:g&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-4"&gt;&lt;/a&gt;&lt;span class="go"&gt;s:SYSFS:ATTR:g&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-5"&gt;&lt;/a&gt;&lt;span class="go"&gt;s:BUS:SUBSYSTEM:g&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-6"&gt;&lt;/a&gt;&lt;span class="go"&gt;' &amp;gt; /etc/udev/rules.d/xusbdfwu.rules&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-7"&gt;&lt;/a&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-8"&gt;&lt;/a&gt;&lt;span class="go"&gt;cp xusb*.hex /usr/share&lt;/span&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-9"&gt;&lt;/a&gt;
&lt;a name="rest_code_39a742a4d55d4fd28ef9e0ce8fdbf528-10"&gt;&lt;/a&gt;&lt;span class="go"&gt;udevadm control --reload-rules&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Run impact&lt;/p&gt;
&lt;pre class="code console"&gt;&lt;a name="rest_code_934be86fc2744b6ebf5d97e46171abd1-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;source /opt/Xilinx/14.7/LabTools/settings64.sh&lt;/span&gt;
&lt;a name="rest_code_934be86fc2744b6ebf5d97e46171abd1-2"&gt;&lt;/a&gt;&lt;span class="go"&gt;impact &amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</description><category>digilent</category><category>driver</category><category>JTAG</category><category>programming cable</category><category>USB</category><category>xilinx</category><guid>http://bozica.co/posts/installing-digilent-usb-jtag-programming-cable-drivers/</guid><pubDate>Sat, 05 Mar 2016 22:33:47 GMT</pubDate></item><item><title>Correctly Matching Xilinx Native FIFOs to Streaming AXI FIFOs</title><link>http://bozica.co/posts/correctly-matching-xilinx-native-fifos-to-streaming-axi-fifos/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;It could be unusual to connect a Xilinx's Native FIFO interface to a
streaming AXI FIFO, but sometimes this small trick might be necessary. For instance,
the Native FIFOs can be configured with non-symmetric aspect ratios if the Independent
Clocks Block RAM configuration is selected. This feature is very useful to appropriately
cross different clock domains. For instance the input port of the FIFO could be at 100 MHz
with a data width of 256 bits and the output at 50 MHz with a data with of 512 bits.&lt;/p&gt;
&lt;p&gt;The AXI-Streaming FIFOs don't have the ability to configure different aspect ratios
between the input and output ports, but they are compatible with different AXI standard IP
blocks provided by Xilinx. The IP integrator tool of Vivado allows the easy interconnection
between IP Cores using a graphical interface.&lt;/p&gt;
&lt;p&gt;To demonstrate a case where this might be useful, a DDR3 controller is to be design
using the IP Cores provided by Xilinx. The idea is to achieve a behavior so that a
simple very large FIFO is instantiated instead of having to deal with addresses in
the DDR3 Memory. For this the DataMover IP Block is selected, effectively translating
the Address mapped domain (AXI-MM) into a streaming domain (AXI-S). This post will go
only in the detail of interconnecting two Native FIFOs with different aspect ratios
between input and output to the AXI-S interfaces of the DataMover which is the same
interface as if it was a AXI-Streaming FIFO.&lt;/p&gt;
&lt;p&gt;The Block Design tool of Vivado is not enough to implement some simple connections
containing some logic gates, therefore it is necessary to create a small Verilog
or VHDL file which do the connections for us.
Also, in the case of using the Datamover as in the image, it also issues the commands
and checks for the statuses.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/fifo_axis.png"&gt;&lt;img alt="/images/fifo_axis.thumbnail.png" src="http://bozica.co/images/fifo_axis.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;Block Design&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;For a simple Native FIFO to AXI FIFO these are the only connections we would need to
implement.&lt;/p&gt;
&lt;pre class="code verilog"&gt;&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-1"&gt;&lt;/a&gt;&lt;span class="k"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;s_axis_s2mm_tkeep&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mh"&gt;64'hFFFF&lt;/span&gt;&lt;span class="no"&gt;_FFFF_FFFF_FFFF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-2"&gt;&lt;/a&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-3"&gt;&lt;/a&gt;&lt;span class="k"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;s2mm_fifo_rd_en&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s_axis_s2mm_tready&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;s2mm_fifo_empty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-4"&gt;&lt;/a&gt;&lt;span class="k"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;s_axis_s2mm_tvalid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s_axis_s2mm_tready&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;s2mm_fifo_valid&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;s2mm_fifo_empty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-5"&gt;&lt;/a&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-6"&gt;&lt;/a&gt;&lt;span class="k"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;m_axis_mm2s_tready&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;mm2s_fifo_prog_full&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;a name="rest_code_2e2628c43aba4b51843ba4622e6a2503-7"&gt;&lt;/a&gt;&lt;span class="k"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;mm2s_fifo_wr_en&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m_axis_mm2s_tready&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;m_axis_mm2s_tvalid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;div class="figure"&gt;
&lt;a class="reference external image-reference" href="http://bozica.co/images/fifo_axis_wavedrom.png"&gt;&lt;img alt="/images/fifo_axis_wavedrom.thumbnail.png" src="http://bozica.co/images/fifo_axis_wavedrom.thumbnail.png"&gt;&lt;/a&gt;
&lt;p class="caption"&gt;Waveform of the involved signals created with &lt;a class="reference external" href="http://wavedrom.com/editor.html"&gt;Wavedrom&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;One final remark is that the input FIFO, to convert from Native to Streaming FIFO
it is necessary to be First Word Fall Through, this will correctly align the s_axis_s2mm_tready
signal to the s_axis_s2mm_tvalid. For the output FIFO from Streaming to Native it is not
required to have this feature, and probably we do not even want it, just by having the Valid
signal when data is available is sufficient for the subsequent stages.&lt;/p&gt;&lt;/div&gt;</description><category>axi</category><category>axi-streaming</category><category>block design</category><category>ddr3</category><category>vivado</category><category>wavedrom</category><category>xilinx</category><guid>http://bozica.co/posts/correctly-matching-xilinx-native-fifos-to-streaming-axi-fifos/</guid><pubDate>Thu, 28 Jan 2016 21:35:44 GMT</pubDate></item><item><title>Compiling xilinx simulation libraries for modelsim</title><link>http://bozica.co/posts/compiling-xilinx-simulation-libraries-for-modelsim/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;We will use Simulation Library Compilation Wizard for compiling the libraries,
this method is highly recommended because library compilation can be performed for more
than one device family and/or language.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Open the Simulation Library Compilation Wizard. This can be accessed from Start
Menu!Programs!Xilinx ISE Design Suite 13.x!ISE Design Tools!32-bit Tools.
Note: If you are using 64-bit version of ModelSim use the Simulation Library Compilation
Wizard from 64-bit Tools. ModelSim PE Student Version 10.x is only available in the
32-bit version.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The Select Simulator window opens up. Select the appropriate simulator (For Student
Edition select ModelSim PE), enter c:nmodeltech64 10.0cnwin64 for executable location,
compxlib.cfg for Compxlib Con guration File and compxlib.log for Compxlib Log File.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Next select the HDL used for simulation. If you are unsure select Both VHDL and Verilog.
However, this will increase the compilation time and the disk space required.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Then select all the device families that you will be working with. Again the more number
of devices, more the compilation time and the disk space required. Remember that you
can always run the compilation wizard at a later time for additional devices.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The next window is for Selecting libraries for Functional and Timing Simulation. Di erent
libraries are required for di erent types of simulation (behavioral, post-route, etc.). We
suggest that you select All Libraries as the default option. Interested users can refer to
Chapter 6 of the Xilinx Synthesis and Simulation Design Guide for additional information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Finally the window for Output directory for compiled libraries is shown. We suggest to
leave the default values that Xilinx picks. Then select Launch Compile Process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Be patient as the compilation can take a long time depending on the options that you
have chosen.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The compile process may have contain a lot of warnings but should be error-free. We
have not explored the reasons behind these warnings, but they do not appear to a ect
the simulation of any of our designs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Once the process is completed, open c:nmodeltech64 10.0cnmodelsim.ini and verify if there
are libraries pointing to the output directory entered in step 6. This will happen only if
you have set the environment variables.&lt;/p&gt;
&lt;p&gt;Library compilation is now complete. If you have not set the environment variables then
the wizard creates a modelsim.ini in the output directory entered in step 6. By default this
location is c:nXilinxn13.xnISE DSnISE. Open this le and verify that it contains the location of
the libraries that were just compiled. This le should be copied into every project you create.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For more info, take a look at this &lt;a class="reference external" href="http://bozica.co/docs/Xilinx_13x_Modelsim_10.pdf"&gt;pdf&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><category>ISE</category><category>modelsim</category><category>xilinx</category><guid>http://bozica.co/posts/compiling-xilinx-simulation-libraries-for-modelsim/</guid><pubDate>Fri, 06 Sep 2013 10:30:24 GMT</pubDate></item><item><title>put custom template format into xilinx autogenerated files</title><link>http://bozica.co/posts/put-custom-template-format-into-xilinx-autogenerated-files/</link><dc:creator>Luis Ardila</dc:creator><description>&lt;div&gt;&lt;p&gt;If you have your own installation of the software you could hard code your
changes into the Tcl scripts that control this.&lt;/p&gt;
&lt;p&gt;For example, the company name could be entered for VHDL modules and VHDL TBs in the following files.&lt;/p&gt;
&lt;dl class="docutils"&gt;
&lt;dt&gt;– VHDL Module - line 713&lt;/dt&gt;
&lt;dd&gt;&lt;div class="first last"&gt;&lt;pre class="code console"&gt;&lt;a name="rest_code_d97c39ce72824ac28d3cd2bb723bc398-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;C:\xilinx\13.1\ISE_DS\ISE\data\projnav\scripts\dpm_sourceTasks.Tcl&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/dd&gt;
&lt;dt&gt;– VHDL Testbench&lt;/dt&gt;
&lt;dd&gt;&lt;div class="first last"&gt;&lt;pre class="code console"&gt;&lt;a name="rest_code_8c7027fcad6b4f148016ed4f4004c6c7-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;C:\xilinx\13.1\ISE_DS\ISE\data\testbnch2.tcl&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;I modified my file like this:  (however I had some issues later and it wasn't
doing anything, just creating blank files, If you have a solution for this please
let me know, if not try this under your own risk.)&lt;/p&gt;
&lt;pre class="code text"&gt;&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-1"&gt;&lt;/a&gt;set _t [clock seconds]
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-2"&gt;&lt;/a&gt;set _ts [clock format $_t -format "%H:%M:%S %m/%d/%Y"]
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-3"&gt;&lt;/a&gt;set _date_stamp [clock -format "%m/%d/%Y"]
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-4"&gt;&lt;/a&gt;global xilinx::Dpm::INewSourceHdlDataID
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-5"&gt;&lt;/a&gt;set _iHdlData [$iNewSourceComp GetInterface $INewSourceHdlDataID]
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-6"&gt;&lt;/a&gt;if { $_iHdlData == 0 } {
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-7"&gt;&lt;/a&gt;return [dpm_Fail "interface passed to Create New Source code hook is invalid."]
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-8"&gt;&lt;/a&gt;}
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-9"&gt;&lt;/a&gt;set _entityName ""
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-10"&gt;&lt;/a&gt;dpm_returnOnFail { $_iHdlData GetEntityName _entityName }
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-11"&gt;&lt;/a&gt;set _archName ""
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-12"&gt;&lt;/a&gt;dpm_returnOnFail { $_iHdlData GetModuleName _archName }
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-13"&gt;&lt;/a&gt;dpm_Debug 11 "architecture returned is $_archName"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-14"&gt;&lt;/a&gt;set _portIter 0
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-15"&gt;&lt;/a&gt;$_iHdlData GetPorts _portIter
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-16"&gt;&lt;/a&gt;puts $hFile "----------------------------------------------------------------------------------"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-17"&gt;&lt;/a&gt;puts $hFile "-- Company: LBNL"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-18"&gt;&lt;/a&gt;puts $hFile "-- Engineer: Luis Ardila (luis.ardila@bozica.co)"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-19"&gt;&lt;/a&gt;puts $hFile "-- "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-20"&gt;&lt;/a&gt;puts $hFile "-- Create Date: $_ts "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-21"&gt;&lt;/a&gt;puts $hFile "-- Design Name: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-22"&gt;&lt;/a&gt;puts $hFile "-- Module Name: $_entityName - $_archName "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-23"&gt;&lt;/a&gt;puts $hFile "-- Project Name: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-24"&gt;&lt;/a&gt;puts $hFile "-- Target Devices: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-25"&gt;&lt;/a&gt;puts $hFile "-- Tool versions: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-26"&gt;&lt;/a&gt;puts $hFile "-- Description: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-27"&gt;&lt;/a&gt;puts $hFile "--"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-28"&gt;&lt;/a&gt;puts $hFile "-- Dependencies: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-29"&gt;&lt;/a&gt;puts $hFile "--"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-30"&gt;&lt;/a&gt;puts $hFile "-- Revision: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-31"&gt;&lt;/a&gt;puts $hFile "-- Date Version Author Description"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-32"&gt;&lt;/a&gt;puts $hFile "-- $_date_stamp 1.0 Luis Ardila File Created"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-33"&gt;&lt;/a&gt;puts $hFile "-- Additional Comments: "
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-34"&gt;&lt;/a&gt;puts $hFile "--"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-35"&gt;&lt;/a&gt;puts $hFile "----------------------------------------------------------------------------------"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-36"&gt;&lt;/a&gt;puts $hFile "LIBRARY IEEE;"
&lt;a name="rest_code_622d7fea54ba46ab8d736b01eafc65d6-37"&gt;&lt;/a&gt;puts $hFile "USE IEEE.STD_LOGIC_1164.ALL;"
&lt;/pre&gt;&lt;/div&gt;</description><category>ISE</category><category>xilinx</category><guid>http://bozica.co/posts/put-custom-template-format-into-xilinx-autogenerated-files/</guid><pubDate>Tue, 20 Aug 2013 15:54:45 GMT</pubDate></item></channel></rss>