-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Sep 5, 2024
1 parent
4d2718c
commit 879ff15
Showing
9 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("communication_PCIE.xclbin") | ||
js[1]["compute_units"][1]</code></pre><p>Results in the following LazyJSON object:</p><pre><code class="nohighlight hljs">LazyJSON.Object{Nothing, String}(...): | ||
"id" => "0" | ||
"kernel_name" => "dummyKernel" | ||
"cu_name" => "dummyKernel" | ||
"base_address" => "0x800000" | ||
"actual_resources" => Any[Object{Nothing, String}("design_state"=>"routed", "LUT"=>"1328", "REG"=>"1439", "BRAM"=>"0", "DSP"=>"0", "URAM"=>"0"), Object{Nothing, String}("design_state"=>"synthesized", "LUT"=>"1497", "REG"=>"1586", "BRAM"=>"0", "DSP"=>"0", "URAM"=>"0… | ||
"clock_name" => "" | ||
"clock_id" => 0 | ||
"clocks" => Any[Object{Nothing, String}("port_name"=>"ap_clk", "id"=>"0", "requested_frequency"=>0, "achieved_frequency"=>0)] | ||
"reset_port_names" => Any["ap_rst_n"] | ||
"slr_resources" => Any[Object{Nothing, String}("slr_name"=>"SLR0", "resource_utilization"=>Any[Object{Nothing, String}("resource_name"=>"LUT", "used"=>"1328", "available"=>"439680"), Object{Nothing, String}("resource_name"=>"LUTAsLogic", "used"=>"975", "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> |
Oops, something went wrong.