Skip to content

Commit

Permalink
build based on 7303f53
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 5, 2024
1 parent 4d2718c commit 879ff15
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 18 deletions.
14 changes: 14 additions & 0 deletions dev/custom_xclbin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>XCLBIN Parsing · XRT.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">XRT.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><input class="collapse-toggle" id="menuitem-1" type="checkbox" checked/><label class="tocitem" for="menuitem-1"><span class="docs-label">XRT</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../">Installation</a></li><li class="is-active"><a class="tocitem" href>XCLBIN Parsing</a><ul class="internal"><li><a class="tocitem" href="#Example"><span>Example</span></a></li></ul></li><li><a class="tocitem" href="../high_level/">High Level Execution</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2" type="checkbox"/><label class="tocitem" for="menuitem-2"><span class="docs-label">Examples</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../examples/xrt_api/">XRT API</a></li><li><a class="tocitem" href="../examples/high_level_basics/">Auto-generate Kernel Interface</a></li><li><a class="tocitem" href="../examples/stream/">STREAM TRIAD Example</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-3" type="checkbox"/><label class="tocitem" for="menuitem-3"><span class="docs-label">References</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../refs/api/">API</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">XRT</a></li><li class="is-active"><a href>XCLBIN Parsing</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>XCLBIN Parsing</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/pc2/XRT.jl/blob/main/docs/src/custom_xclbin.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Custom-XCLBIN-Parser"><a class="docs-heading-anchor" href="#Custom-XCLBIN-Parser">Custom XCLBIN Parser</a><a id="Custom-XCLBIN-Parser-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-XCLBIN-Parser" title="Permalink"></a></h1><p>XRT.jl comes with functions to parse the bitstream container format <em>xclbin</em>. The most important functions provided are <code>get_kernel_info(path)</code> and <code>get_system_info(path)</code> which both take as input a path to the bitstream. The functions extract the JSON data which is encoded in the bitstream and return it as a <code>LazyJSON</code> data structure.</p><p><code>get_kernel_info(path)</code> returns data about the implemented compute kernel, such as input parameters, compute instances, memory addresses, and offest. <code>get_system_info(path)</code> returns information about resource utilization of individual compute units and the available resources on the system.</p><h2 id="Example"><a class="docs-heading-anchor" href="#Example">Example</a><a id="Example-1"></a><a class="docs-heading-anchor-permalink" href="#Example" title="Permalink"></a></h2><p>For our simple dummy kernel that is also used in the examples, we can get the resource utilization of the kernel like this:</p><pre><code class="language-Julia hljs">js = XRT.get_system_info(&quot;communication_PCIE.xclbin&quot;)
js[1][&quot;compute_units&quot;][1]</code></pre><p>Results in the following LazyJSON object:</p><pre><code class="nohighlight hljs">LazyJSON.Object{Nothing, String}(...):
&quot;id&quot; =&gt; &quot;0&quot;
&quot;kernel_name&quot; =&gt; &quot;dummyKernel&quot;
&quot;cu_name&quot; =&gt; &quot;dummyKernel&quot;
&quot;base_address&quot; =&gt; &quot;0x800000&quot;
&quot;actual_resources&quot; =&gt; Any[Object{Nothing, String}(&quot;design_state&quot;=&gt;&quot;routed&quot;, &quot;LUT&quot;=&gt;&quot;1328&quot;, &quot;REG&quot;=&gt;&quot;1439&quot;, &quot;BRAM&quot;=&gt;&quot;0&quot;, &quot;DSP&quot;=&gt;&quot;0&quot;, &quot;URAM&quot;=&gt;&quot;0&quot;), Object{Nothing, String}(&quot;design_state&quot;=&gt;&quot;synthesized&quot;, &quot;LUT&quot;=&gt;&quot;1497&quot;, &quot;REG&quot;=&gt;&quot;1586&quot;, &quot;BRAM&quot;=&gt;&quot;0&quot;, &quot;DSP&quot;=&gt;&quot;0&quot;, &quot;URAM&quot;=&gt;&quot;0…
&quot;clock_name&quot; =&gt; &quot;&quot;
&quot;clock_id&quot; =&gt; 0
&quot;clocks&quot; =&gt; Any[Object{Nothing, String}(&quot;port_name&quot;=&gt;&quot;ap_clk&quot;, &quot;id&quot;=&gt;&quot;0&quot;, &quot;requested_frequency&quot;=&gt;0, &quot;achieved_frequency&quot;=&gt;0)]
&quot;reset_port_names&quot; =&gt; Any[&quot;ap_rst_n&quot;]
&quot;slr_resources&quot; =&gt; Any[Object{Nothing, String}(&quot;slr_name&quot;=&gt;&quot;SLR0&quot;, &quot;resource_utilization&quot;=&gt;Any[Object{Nothing, String}(&quot;resource_name&quot;=&gt;&quot;LUT&quot;, &quot;used&quot;=&gt;&quot;1328&quot;, &quot;available&quot;=&gt;&quot;439680&quot;), Object{Nothing, String}(&quot;resource_name&quot;=&gt;&quot;LUTAsLogic&quot;, &quot;used&quot;=&gt;&quot;975&quot;, &quot;availabl…
</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Installation</a><a class="docs-footer-nextpage" href="../high_level/">High Level Execution »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Thursday 5 September 2024 10:38">Thursday 5 September 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 879ff15

Please sign in to comment.