1810 lines
58 KiB
HTML
1810 lines
58 KiB
HTML
|
||
<!doctype html>
|
||
<html lang="en" class="no-js">
|
||
<head>
|
||
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
|
||
<meta name="description" content="Manta Documentation">
|
||
|
||
|
||
<meta name="author" content="Fischer Moseley">
|
||
|
||
|
||
<link rel="canonical" href="https://fischermoseley.github.io/manta/dev/logic_analyzer_core/">
|
||
|
||
|
||
<link rel="prev" href="../io_core/">
|
||
|
||
|
||
<link rel="next" href="../memory_core/">
|
||
|
||
|
||
<link rel="icon" href="../assets/logo_ray_only_with_shadow.png">
|
||
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.44">
|
||
|
||
|
||
|
||
<title>Logic Analyzer Core - Manta Documentation</title>
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../assets/stylesheets/main.0253249f.min.css">
|
||
|
||
|
||
<link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
|
||
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../assets/_mkdocstrings.css">
|
||
|
||
<link rel="stylesheet" href="../stylesheets/extra.css">
|
||
|
||
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</head>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
|
||
|
||
|
||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||
<label class="md-overlay" for="__drawer"></label>
|
||
<div data-md-component="skip">
|
||
|
||
|
||
<a href="#overview" class="md-skip">
|
||
Skip to content
|
||
</a>
|
||
|
||
</div>
|
||
<div data-md-component="announce">
|
||
|
||
</div>
|
||
|
||
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
|
||
|
||
<aside class="md-banner md-banner--warning">
|
||
<div class="md-banner__inner md-grid md-typeset">
|
||
|
||
You're not viewing the latest version.
|
||
<a href="../..">
|
||
<strong>Click here to go to latest.</strong>
|
||
</a>
|
||
|
||
</div>
|
||
<script>var el=document.querySelector("[data-md-component=outdated]"),outdated=__md_get("__outdated",sessionStorage);!0===outdated&&el&&(el.hidden=!1)</script>
|
||
</aside>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<header class="md-header md-header--shadow" data-md-component="header">
|
||
<nav class="md-header__inner md-grid" aria-label="Header">
|
||
<a href=".." title="Manta Documentation" class="md-header__button md-logo" aria-label="Manta Documentation" data-md-component="logo">
|
||
|
||
<img src="../assets/logo_minimal_border.png" alt="logo">
|
||
|
||
</a>
|
||
<label class="md-header__button md-icon" for="__drawer">
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
|
||
</label>
|
||
<div class="md-header__title" data-md-component="header-title">
|
||
<div class="md-header__ellipsis">
|
||
<div class="md-header__topic">
|
||
<span class="md-ellipsis">
|
||
Manta Documentation
|
||
</span>
|
||
</div>
|
||
<div class="md-header__topic" data-md-component="header-topic">
|
||
<span class="md-ellipsis">
|
||
|
||
Logic Analyzer Core
|
||
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<form class="md-header__option" data-md-component="palette">
|
||
|
||
|
||
|
||
|
||
<input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
|
||
|
||
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
|
||
</label>
|
||
|
||
|
||
|
||
|
||
|
||
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="blue" data-md-color-accent="custom" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
|
||
|
||
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
|
||
</label>
|
||
|
||
|
||
|
||
|
||
|
||
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="black" data-md-color-accent="custom" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2">
|
||
|
||
<label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg>
|
||
</label>
|
||
|
||
|
||
</form>
|
||
|
||
|
||
|
||
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
|
||
|
||
|
||
|
||
|
||
<div class="md-header__source">
|
||
<a href="https://github.com/fischermoseley/manta/" title="Go to repository" class="md-source" data-md-component="source">
|
||
<div class="md-source__icon md-icon">
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
|
||
</div>
|
||
<div class="md-source__repository">
|
||
fischermoseley/manta
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
</nav>
|
||
|
||
</header>
|
||
|
||
<div class="md-container" data-md-component="container">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<main class="md-main" data-md-component="main">
|
||
<div class="md-main__inner md-grid">
|
||
|
||
|
||
|
||
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
||
<div class="md-sidebar__scrollwrap">
|
||
<div class="md-sidebar__inner">
|
||
|
||
|
||
|
||
|
||
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||
<label class="md-nav__title" for="__drawer">
|
||
<a href=".." title="Manta Documentation" class="md-nav__button md-logo" aria-label="Manta Documentation" data-md-component="logo">
|
||
|
||
<img src="../assets/logo_minimal_border.png" alt="logo">
|
||
|
||
</a>
|
||
Manta Documentation
|
||
</label>
|
||
|
||
<div class="md-nav__source">
|
||
<a href="https://github.com/fischermoseley/manta/" title="Go to repository" class="md-source" data-md-component="source">
|
||
<div class="md-source__icon md-icon">
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
|
||
</div>
|
||
<div class="md-source__repository">
|
||
fischermoseley/manta
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href=".." class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Home
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../installation/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Installation
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../getting_started/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Getting Started
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../use_cases/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Use Cases
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../architecture/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Architecture
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../similar_tools/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Similar Tools
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" checked>
|
||
|
||
|
||
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Cores
|
||
</span>
|
||
|
||
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="true">
|
||
<label class="md-nav__title" for="__nav_7">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Cores
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../io_core/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
IO Core
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--active">
|
||
|
||
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
|
||
|
||
|
||
|
||
<label class="md-nav__link md-nav__link--active" for="__toc">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Logic Analyzer Core
|
||
</span>
|
||
|
||
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<a href="./" class="md-nav__link md-nav__link--active">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Logic Analyzer Core
|
||
</span>
|
||
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__title" for="__toc">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Table of contents
|
||
</label>
|
||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#overview" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Overview
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#configuration" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Configuration
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Configuration">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#verilog-based-workflows" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Verilog-Based Workflows
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#triggers" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Triggers
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#trigger-location-optional" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Trigger Location (optional)
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#trigger-modes-optional" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Trigger Modes (optional)
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#usage" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Usage
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Usage">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#capturing-data" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Capturing Data
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#playback" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Playback
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#python-api-documentation" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Python API Documentation
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Python API Documentation">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerCore
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerCore">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore.capture" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> capture
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore.set_triggers" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> set_triggers
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerCapture
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerCapture">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_csv" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_csv
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_playback_verilog" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_playback_verilog
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_vcd" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_vcd
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_playback_module" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_playback_module
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_trace" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_trace
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_trigger_location" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_trigger_location
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerPlayback" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerPlayback
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerPlayback">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerPlayback.get_top_level_ports" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_top_level_ports
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../memory_core/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Memory Core
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_8" >
|
||
|
||
|
||
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Interfaces
|
||
</span>
|
||
|
||
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
|
||
<label class="md-nav__title" for="__nav_8">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Interfaces
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../uart_interface/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
UART Interface
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../ethernet_interface/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Ethernet Interface
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_9" >
|
||
|
||
|
||
<label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
For Developers
|
||
</span>
|
||
|
||
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
|
||
<label class="md-nav__title" for="__nav_9">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
For Developers
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="https://github.com/fischermoseley/manta/milestones" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Roadmap
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
||
<div class="md-sidebar__scrollwrap">
|
||
<div class="md-sidebar__inner">
|
||
|
||
|
||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__title" for="__toc">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Table of contents
|
||
</label>
|
||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#overview" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Overview
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#configuration" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Configuration
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Configuration">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#verilog-based-workflows" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Verilog-Based Workflows
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#triggers" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Triggers
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#trigger-location-optional" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Trigger Location (optional)
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#trigger-modes-optional" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Trigger Modes (optional)
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#usage" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Usage
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Usage">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#capturing-data" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Capturing Data
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#playback" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Playback
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#python-api-documentation" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Python API Documentation
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label="Python API Documentation">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerCore
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerCore">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore.capture" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> capture
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCore.set_triggers" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> set_triggers
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerCapture
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerCapture">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_csv" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_csv
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_playback_verilog" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_playback_verilog
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.export_vcd" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> export_vcd
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_playback_module" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_playback_module
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_trace" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_trace
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerCapture.get_trigger_location" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_trigger_location
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerPlayback" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> LogicAnalyzerPlayback
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" LogicAnalyzerPlayback">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.LogicAnalyzerPlayback.get_top_level_ports" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_top_level_ports
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="md-content" data-md-component="content">
|
||
<article class="md-content__inner md-typeset">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h1>Logic Analyzer Core</h1>
|
||
|
||
<h2 id="overview">Overview</h2>
|
||
<p>The Logic Analyzer core allows for debugging logic by capturing a set of digital signals to memory. This is done in response to a <strong><em>trigger</em></strong> condition, which starts a <strong><em>capture</em></strong>, which continues until the onboard memory is full. The resulting data is then read out to the host machine, and can be displayed as a waveform, exported as a CSV file, or turned into a synthesizable playback module.</p>
|
||
<p>This is very similar to the behavior of a benchtop logic analyzer, but Manta's Logic Analyzer Core includes some extra features you may find useful. Both the <a href="../use_cases">Use Cases</a> page and the repository's <a href="https://github.com/fischermoseley/manta/tree/main/examples">examples</a> folder contain examples of the Logic Analyzer Core for your reference.</p>
|
||
<h2 id="configuration">Configuration</h2>
|
||
<p>As explained in the <a href="../getting_started">getting started</a> page, the Logic Analyzer Core must be configured and included in the FPGA design before it can be operated. Configuration is performed differently depending on if you're using a traditional Verilog-based workflow, or if you're building an Amaranth-native design.</p>
|
||
<h3 id="verilog-based-workflows">Verilog-Based Workflows</h3>
|
||
<p>The Logic Analyzer Core is used by adding an entry in a <code>cores</code> section of a configuration file. This is best shown by example:</p>
|
||
<p><div class="language-yaml highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nn">---</span>
|
||
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nt">cores</span><span class="p">:</span>
|
||
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="nt">my_logic_analyzer</span><span class="p">:</span>
|
||
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">logic_analyzer</span>
|
||
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="w"> </span><span class="nt">sample_depth</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">4096</span>
|
||
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="w"> </span><span class="nt">trigger_location</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1000</span>
|
||
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a>
|
||
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="w"> </span><span class="nt">probes</span><span class="p">:</span>
|
||
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a><span class="w"> </span><span class="nt">larry</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
|
||
</span><span id="__span-0-10"><a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a><span class="w"> </span><span class="nt">curly</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3</span>
|
||
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a><span class="w"> </span><span class="nt">moe</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">9</span>
|
||
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a>
|
||
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a><span class="w"> </span><span class="nt">triggers</span><span class="p">:</span>
|
||
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">moe RISING</span>
|
||
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">curly FALLING</span>
|
||
</span></code></pre></div>
|
||
Inside this configuration, the following parameters may be set:</p>
|
||
<ul>
|
||
<li><code>name</code><em>(required)</em>: The name of the Logic Analyzer core, which is used when working with the API.</li>
|
||
<li><code>type</code><em>(required)</em>: This denotes that this is a Logic Analyzer core. All cores contain a <code>type</code> field, which must be set to <code>logic_analyzer</code> to be recognized as an Logic Analyzer core.</li>
|
||
<li><code>sample_depth</code><em>(required)</em>: The number of samples saved in the capture. A larger sample depth will use more FPGA resources, but will show what the probes are doing over a longer time interval.</li>
|
||
<li><code>probes</code> <em>(required)</em>: The signals in your logic that the Logic Analyzer connects to. Each probe is specified with a name and a width.</li>
|
||
</ul>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Name things carefully!</p>
|
||
<p>The names of the core and its probes are referenced in the autogenerated Verilog. This means that while the names can be arbitrary, they must be unique within your project and not contain any characters that your synthesis engine won't appreciate.</p>
|
||
</div>
|
||
<h3 id="triggers">Triggers</h3>
|
||
<p>Triggers are the conditions that your logic must meet in order to start a capture, and they're specified under the <code>triggers</code> entry in the config file. Manta's triggers are reprogrammable, meaning you don't need to rebuild your source code to change the trigger condition - just updating the configuration file is enough. If multiple triggers are provided, any one trigger being met will trigger the entire core.</p>
|
||
<p>Each individual trigger is specified with the following structure:</p>
|
||
<p><code>[probe]</code> <code>[operation]</code> <code>[argument]</code></p>
|
||
<ul>
|
||
<li>
|
||
<p><strong>probe</strong>: The probe that the trigger applies to. Each probe only supports one trigger on it. For instance, in the example above we couldn't add a trigger for <code>curly LEQ 4</code>, since we've already assigned a trigger to <code>curly</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>operation</strong>: The logical operation to perform. Manta supports the following operations:</p>
|
||
<ul>
|
||
<li><code>RISING</code>, which checks if the probe has increased in value since the last clock cycle.</li>
|
||
<li><code>FALLING</code>, which checks if the probe has decreased in value since the last clock cycle.</li>
|
||
<li><code>CHANGING</code>, which checks if the probe is changed in value since the last clock cycle.</li>
|
||
</ul>
|
||
<p>These operations only compare a probe's value with itself, but sometimes it is useful to compare a probe's value to a constant. Manta provides a operations for doing such, including:</p>
|
||
<ul>
|
||
<li><code>GT</code>, for greater than.</li>
|
||
<li><code>LT</code>, for less than.</li>
|
||
<li><code>GEQ</code>, for greater than or equal to.</li>
|
||
<li><code>LEQ</code>, for less than or equal to.</li>
|
||
<li><code>EQ</code>, for equal to.</li>
|
||
<li><code>NEQ</code>, for not equal to.</li>
|
||
</ul>
|
||
<p>These operations require a constant to compare against, referred to as an <em>argument</em>, which is described below:</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>argument</strong>: A constant to compare against, if the operation specified requires one. On the FPGA, the argument will have just as many bits as the probe width.</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="trigger-location-optional">Trigger Location (optional)</h3>
|
||
<p>Sometimes, you care more about what happens before a trigger is met than afterwards, or vice versa. To accommodate this, the logic analyzer has an optional <em>Trigger Location</em> parameter, which sets when probe data is captured relative to the trigger condition being met. This is specified with the <code>trigger_position</code> entry in the configuration file, which sets how many samples to save prior to the trigger condition occurring. This is similar to a "holdoff" option on a traditional oscilloscope or logic analyzer.</p>
|
||
<p>If <code>trigger_position</code> is not specified, Manta will default to centering the capture window around the trigger condition. This results in just as many samples before the trigger as after.</p>
|
||
<h3 id="trigger-modes-optional">Trigger Modes (optional)</h3>
|
||
<p>The logic analyzer has a few different ways of capturing data, which are represented by the <em>trigger modes</em> below:</p>
|
||
<ul>
|
||
<li><strong>Single-Shot</strong>: Once the trigger condition is met, record the value of the probes on every clock cycle in a continuous single shot.</li>
|
||
<li><strong>Incremental</strong>: Record samples when the trigger condition is met, but <strong>don't</strong> record the samples when the trigger condition is not met. This is super useful for applications like audio processing or memory controllers, where there are many system clock cycles between signals of interest.</li>
|
||
<li><strong>Immediate</strong>: Record the value of the probes on every clock cycle, beginning immediately, and regardless of if the trigger condition is met. This is useful for investigating cases where a trigger condition is never being met (such as latchup or deadlock conditions) or obtaining a random snapshot of the FPGA's state.</li>
|
||
</ul>
|
||
<p>Manta will use an <code>Immediate</code> trigger mode if no <code>trigger_mode</code> is provided in the configuration file.</p>
|
||
<h2 id="usage">Usage</h2>
|
||
<h3 id="capturing-data">Capturing Data</h3>
|
||
<p>Once you have your Logic Analyzer core on the FPGA, you can capture data with:</p>
|
||
<p><div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>manta<span class="w"> </span>capture<span class="w"> </span><span class="o">[</span>config_file<span class="o">]</span><span class="w"> </span><span class="o">[</span>la_core_name<span class="o">]</span><span class="w"> </span><span class="o">[</span>output<span class="w"> </span>path<span class="o">]</span><span class="w"> </span><span class="o">[[</span>additional<span class="w"> </span>output<span class="w"> </span>paths<span class="o">]</span>...<span class="o">]</span>
|
||
</span></code></pre></div>
|
||
The capture may be exported as either a VCD or CSV file. If <code>manta.yaml</code> contained the configuration at the top of this page, then the following would export a .vcd file containing the captured waveform:</p>
|
||
<div class="language-bash highlight"><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>manta<span class="w"> </span>capture<span class="w"> </span>manta.yaml<span class="w"> </span>my_logic_analyzer<span class="w"> </span>capture.vcd
|
||
</span></code></pre></div>
|
||
<p>This will reset your logic analyzer, configure it with the triggers specified in <code>manta.yaml</code>, perform a capture, and create the file. Additional output files may be passed as well - Manta will detect the file format based on the extension (<code>.vcd</code>, <code>.csv</code>). Verilog (<code>.v</code>) files are also supported, and will follow the playback mechanism <a href="#playback">described below</a>.</p>
|
||
<h3 id="playback">Playback</h3>
|
||
<p>Manta has the ability to generate a module that <em>plays back</em> a set of data captured from a Logic Analyzer core. This module has a set of outputs matching the inputs of the Logic Analyzer, which when enabled, will take the exact values captured by the logic analyzer. This module is synthesizable, and can either be used in simulation or included in the FPGA design.</p>
|
||
<p>If the file <code>manta.yaml</code> contained the configuration above, then running:
|
||
<div class="language-bash highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>manta<span class="w"> </span>capture<span class="w"> </span>manta.yaml<span class="w"> </span>my_logic_analyzer<span class="w"> </span>capture.v
|
||
</span></code></pre></div></p>
|
||
<p>Generates a Verilog module at <code>capture.v</code> which can then be instantiated in the testbench or FPGA design in which it is needed.</p>
|
||
<p>This is useful for two situations in particular:</p>
|
||
<ul>
|
||
<li>
|
||
<p><em>Input Verification.</em> Designs will often work in simulation, but fail in hardware. In the absence of any build errors, this usually means that the inputs being applied to the logic in simulation don't accurately represent those being applied to the logic in the real world. Playing signals back in simulation allows for easy comparison between simulated and measured input, and provides a nice way to check that the logic downstream is behaves properly.</p>
|
||
</li>
|
||
<li>
|
||
<p><em>Sparse Sampling.</em> Sometimes designs will have a small number of inputs, but a huge amount of internal state. In situations like these, it may be more efficient to sample the inputs and simulate the logic, instead of directly sampling the state. For instance, debugging a misbehaving branch predictor in a CPU can be done by recording activity on the address and data busses and playing them back in simulation - which would use less FPGA resources than sampling the entire pattern history table.</p>
|
||
</li>
|
||
</ul>
|
||
<h2 id="python-api-documentation">Python API Documentation</h2>
|
||
|
||
|
||
<div class="doc doc-object doc-class">
|
||
|
||
|
||
|
||
<h3 id="manta.LogicAnalyzerCore" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">manta.LogicAnalyzerCore</span>
|
||
|
||
|
||
</h3>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">LogicAnalyzerCore</span><span class="p">(</span><span class="n">sample_depth</span><span class="p">,</span> <span class="n">probes</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents first">
|
||
|
||
|
||
<p>A module for generating a logic analyzer on the FPGA, with configurable
|
||
triggers, trigger position, and trigger modes.</p>
|
||
<p>Provides methods for generating synthesizable logic for the FPGA, as well
|
||
as methods for reading and writing the value of a register.</p>
|
||
|
||
<p>Create a Logic Analyzer Core with the given probes and sample depth.</p>
|
||
<p>This function is the main mechanism for configuring a Logic Analyzer in
|
||
an Amaranth-native design.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>sample_depth</code></b>
|
||
(<code>int</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The number of samples saved in the capture. A
|
||
larger sample depth will use more FPGA resources, but will show
|
||
what the probes are doing over a longer time interval.</p>
|
||
</div>
|
||
</li>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>probes</code></b>
|
||
(<code>List[Signal]</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The signals in your logic that the Logic
|
||
Analyzer connects to. Each probe is specified with a name and
|
||
a width.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-children">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCore.capture" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">capture</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">capture</span><span class="p">()</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Performs a capture, recording the state of all probes to memory.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Returns:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>capture</code></b> ( <code><a class="autorefs autorefs-internal" title="manta.logic_analyzer.capture.LogicAnalyzerCapture" href="#manta.LogicAnalyzerCapture">LogicAnalyzerCapture</a></code>
|
||
) –
|
||
<div class="doc-md-description">
|
||
<p>A LogicAnalyzerCapture object
|
||
containing the capture and its metadata.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCore.set_triggers" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">set_triggers</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">set_triggers</span><span class="p">(</span><span class="n">trigger_mode</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">triggers</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">trigger_location</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>trigger_mode</code></b>
|
||
(<code>TriggerMode | str</code>, default:
|
||
<code>None</code>
|
||
)
|
||
–
|
||
<div class="doc-md-description">
|
||
|
||
</div>
|
||
</li>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>triggers</code></b>
|
||
(<code>Optional[Sequence[Sequence[str | int]]]</code>, default:
|
||
<code>None</code>
|
||
)
|
||
–
|
||
<div class="doc-md-description">
|
||
|
||
</div>
|
||
</li>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>trigger_location</code></b>
|
||
(<code>Optional[int]</code>, default:
|
||
<code>None</code>
|
||
)
|
||
–
|
||
<div class="doc-md-description">
|
||
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-class">
|
||
|
||
|
||
|
||
<h3 id="manta.LogicAnalyzerCapture" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">manta.LogicAnalyzerCapture</span>
|
||
|
||
|
||
</h3>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">LogicAnalyzerCapture</span><span class="p">(</span><span class="n">probes</span><span class="p">,</span> <span class="n">trigger_location</span><span class="p">,</span> <span class="n">trigger_mode</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">interface</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents first">
|
||
|
||
|
||
<p>A container class for the data collected by a LogicAnalyzerCore. Contains
|
||
methods for exporting the data as a VCD waveform file, a Python list, a
|
||
CSV file, or a Verilog module.</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-children">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.export_csv" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">export_csv</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">export_csv</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Export the capture to a CSV file.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>path</code></b>
|
||
(<code>str</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>Path to the destination file.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<p><span class="doc-section-title">Returns:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>None</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.export_playback_verilog" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">export_playback_verilog</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">export_playback_verilog</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Exports a Verilog module that will playback the captured data. This
|
||
module is synthesizable, so it may be used in either simulation or
|
||
on the FPGA directly by including it your build process.</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.export_vcd" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">export_vcd</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">export_vcd</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Export the capture to a VCD file.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>path</code></b>
|
||
(<code>str</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>Path to the destination file.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<p><span class="doc-section-title">Returns:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>None</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.get_playback_module" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">get_playback_module</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">get_playback_module</span><span class="p">()</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Returns an Amaranth module that will playback the captured data. This
|
||
module is synthesizable, so it may be used in either simulation or
|
||
on the FPGA directly by including it your build process.</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.get_trace" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">get_trace</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">get_trace</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Gets the value of a single probe over the capture.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>name</code></b>
|
||
(<code>str</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The name of the probe.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<p><span class="doc-section-title">Returns:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>data</code></b> ( <code>List[int]</code>
|
||
) –
|
||
<div class="doc-md-description">
|
||
<p>The value of the probe at every timestep,
|
||
interpreted as an unsigned integer. Has length equal to
|
||
the <code>sample_depth</code> of the core that produced the capture.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerCapture.get_trigger_location" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">get_trigger_location</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">get_trigger_location</span><span class="p">()</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Returns the location of the trigger in the capture. This will match the
|
||
value of "trigger_location" provided in the configuration file at the
|
||
time of capture.</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-class">
|
||
|
||
|
||
|
||
<h3 id="manta.LogicAnalyzerPlayback" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">manta.LogicAnalyzerPlayback</span>
|
||
|
||
|
||
</h3>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">LogicAnalyzerPlayback</span><span class="p">(</span><span class="n">probes</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents first">
|
||
|
||
|
||
<p>A synthesizable module that plays back data captured by a
|
||
LogicAnalyzerCore. Takes a list of all the samples captured by a core,
|
||
along with the config of the core used to take it.</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-children">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.LogicAnalyzerPlayback.get_top_level_ports" class="doc doc-heading">
|
||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">get_top_level_ports</span>
|
||
|
||
|
||
</h4>
|
||
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">get_top_level_ports</span><span class="p">()</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Returns the Amaranth signals that should be included as ports in the
|
||
exported Verilog module.</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</article>
|
||
</div>
|
||
|
||
|
||
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
||
</div>
|
||
|
||
</main>
|
||
|
||
<footer class="md-footer">
|
||
|
||
<div class="md-footer-meta md-typeset">
|
||
<div class="md-footer-meta__inner md-grid">
|
||
<div class="md-copyright">
|
||
|
||
|
||
Made with
|
||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||
Material for MkDocs
|
||
</a>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
</div>
|
||
<div class="md-dialog" data-md-component="dialog">
|
||
<div class="md-dialog__inner md-typeset"></div>
|
||
</div>
|
||
|
||
|
||
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.copy", "content.code.annotate", "navigation.sections", "navigation.expand"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
|
||
|
||
|
||
<script src="../assets/javascripts/bundle.83f73b43.min.js"></script>
|
||
|
||
<script src="../javascripts/mathjax.js"></script>
|
||
|
||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||
|
||
|
||
</body>
|
||
</html> |