1241 lines
38 KiB
HTML
1241 lines
38 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/io_core/">
|
||
|
||
|
||
<link rel="prev" href="../similar_tools/">
|
||
|
||
|
||
<link rel="next" href="../logic_analyzer_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>IO 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">
|
||
|
||
IO 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 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">
|
||
IO 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">
|
||
IO 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="#amaranth-native-designs" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Amaranth-Native Designs
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#operation" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Operation
|
||
</span>
|
||
</a>
|
||
|
||
</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.IOCore" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> IOCore
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" IOCore">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.IOCore.get_probe" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_probe
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.IOCore.set_probe" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> set_probe
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../logic_analyzer_core/" class="md-nav__link">
|
||
|
||
|
||
<span class="md-ellipsis">
|
||
Logic Analyzer Core
|
||
</span>
|
||
|
||
|
||
</a>
|
||
</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="#amaranth-native-designs" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Amaranth-Native Designs
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#operation" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
Operation
|
||
</span>
|
||
</a>
|
||
|
||
</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.IOCore" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> IOCore
|
||
</span>
|
||
</a>
|
||
|
||
<nav class="md-nav" aria-label=" IOCore">
|
||
<ul class="md-nav__list">
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.IOCore.get_probe" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> get_probe
|
||
</span>
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#manta.IOCore.set_probe" class="md-nav__link">
|
||
<span class="md-ellipsis">
|
||
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> set_probe
|
||
</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>IO Core</h1>
|
||
|
||
<h2 id="overview">Overview</h2>
|
||
<p>Registers are a fundamental building block of digital hardware, and the IO core provides a simple way of interacting with them from the host machine. It allows you to define inputs and outputs of arbitrary width, and then write values to the outputs and read values from the inputs.</p>
|
||
<p>This is a very, very simple task - however it's surprisingly useful in practice. 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 IO Core for your reference.</p>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">It's not instantaneous!</p>
|
||
<p>If you're trying to read or write values in your design with cycle-accurate timing, this will not do that for you. The time taken by Python to evaluate an expression is not constant, nor is the amount of time it takes for your OS to put bytes on the wire. If you need cycle-accurate timing, the <a href="../logic_analyzer_core/">Logic Analyzer Core</a> and it's <a href="../logic_analyzer_core/#playback">Playback feature</a> may be helpful.</p>
|
||
</div>
|
||
<h2 id="configuration">Configuration</h2>
|
||
<p>As explained in the <a href="../getting_started">getting started</a> page, the IO 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 IO 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_io_core</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">io</span>
|
||
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a>
|
||
</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">inputs</span><span class="p">:</span>
|
||
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="w"> </span><span class="nt">kermit</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3</span>
|
||
</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">piggy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</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">animal</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">38</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">scooter</span><span class="p">:</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">width</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">4</span>
|
||
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a><span class="w"> </span><span class="nt">initial_value</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">13</span>
|
||
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a>
|
||
</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="nt">outputs</span><span class="p">:</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="nt">fozzy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
|
||
</span><span id="__span-0-16"><a id="__codelineno-0-16" name="__codelineno-0-16" href="#__codelineno-0-16"></a><span class="w"> </span><span class="nt">gonzo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3</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 IO core, which is used when working with the API.</li>
|
||
<li><code>type</code> <em>(required)</em>: This denotes that this is an IO core. All cores contain a <code>type</code> field, which must be set to <code>io</code> to be recognized as an IO core.</li>
|
||
<li><code>inputs</code> <em>(optional)</em>: This lists all inputs from from the FPGA fabric to the host machine. Signals in this list may be read by the host, but <strong><em>cannot</em></strong> be written to. This parameter is somewhat optional as an IO Core must have at least one probe, but it need not be an input.</li>
|
||
<li><code>outputs</code> <em>(optional)</em>: This lists all outputs from the host machine to the FPGA fabric. Signals in this list are usually written to by the host, but they can also be read from. Doing so returns the value last written to the register. This parameter is somewhat optional as an IO Core must have at least one probe, but it need not be an output.<ul>
|
||
<li><code>initial_value</code> <em>(optional)</em>: This sets an initial value for an output probe to take after the FPGA powers on. This is done with an <code>initial</code> statement in Manta's Verilog, and is independent of the input clock or resets elsewhere in the FPGA. This parameter is optional, and defaults to zero.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<!-- - `user_clock` _(optional)_: If set to True, an extra input port will be added to the `manta` module for an clock input to run the IO core on. This lets the IO Core handle clock domain crossing through its internal buffers. If set to False, Manta will run the IO core from its internal clock (the one provided through `manta`'s `clk` port). This parameter is optional, and defaults to False. More information is available in the [architecture](../architecture#io-core) page. -->
|
||
|
||
<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="amaranth-native-designs">Amaranth-Native Designs</h3>
|
||
<p>Since Amaranth modules are Python objects, the configuration of the IO Core is given by the arguments given during initialization. See the documentation for the <code>IOCore</code> <a href="#manta.IOCore">class constructor</a> below, as well as the Amaranth <a href="https://github.com/fischermoseley/manta/tree/main/examples/amaranth">examples</a> in the repo.</p>
|
||
<h2 id="operation">Operation</h2>
|
||
<p>Regardless of the technique you used to configure your IO Core, it is operated using the <a href="#manta.IOCore.set_probe"><code>set_probe()</code></a> and <a href="#manta.IOCore.get_probe"><code>get_probe()</code></a> methods. Documentation for these methods is available below.</p>
|
||
<p>These methods are members of the <code>IOCore</code> class, so if you're using Manta in a Verilog-based workflow, you'll first need to obtain a <code>Manta</code> object that contains an <code>IOCore</code> member. This is done with <code>Manta.from_config()</code>, as shown in the Verilog <a href="https://github.com/fischermoseley/manta/tree/main/examples/verilog">examples</a>.</p>
|
||
<h2 id="python-api-documentation">Python API Documentation</h2>
|
||
|
||
|
||
<div class="doc doc-object doc-class">
|
||
|
||
|
||
|
||
<h3 id="manta.IOCore" 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.IOCore</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">IOCore</span><span class="p">(</span><span class="n">inputs</span><span class="o">=</span><span class="p">[],</span> <span class="n">outputs</span><span class="o">=</span><span class="p">[])</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents first">
|
||
|
||
|
||
<p>A synthesizable module for setting and getting the values of registers of
|
||
arbitrary size.</p>
|
||
|
||
<p>Create an IO Core, with the given input and output probes.</p>
|
||
<p>This function is the main mechanism for configuring an IO Core 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>inputs</code></b>
|
||
(<code>Optional[List[<span title="amaranth.Signal">Signal</span>]]</code>, default:
|
||
<code>[]</code>
|
||
)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>A list of
|
||
Amaranth Signals to use as inputs. Defaults to an empty list.
|
||
This parameter is somewhat optional as an IO Core must have
|
||
at least one probe, but it need not be an input.</p>
|
||
</div>
|
||
</li>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>outputs</code></b>
|
||
(<code>Optional[List[<span title="amaranth.Signal">Signal</span>]]</code>, default:
|
||
<code>[]</code>
|
||
)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>A list of
|
||
Amaranth Signals to use as outputs. Defaults to an empty list.
|
||
This parameter is somewhat optional as an IO Core must have
|
||
at least one probe, but it need not be an output.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-children">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.IOCore.get_probe" 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_probe</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_probe</span><span class="p">(</span><span class="n">probe</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Get the value of an input or output probe on the FPGA.</p>
|
||
<p>If called on an output probe, this function will return the last value
|
||
written to the output probe. If no value has been written to the output
|
||
probe, then it will return the probe's initial value. This method is
|
||
blocking.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>probe</code></b>
|
||
(<code>str | <span title="amaranth.Signal">Signal</span></code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The probe to get the value of. This
|
||
may be either a string containing the name of the probe, or the
|
||
Amaranth Signal representing the probe itself. Strings are
|
||
typically used in Verilog-based workflows, and Amaranth Signals
|
||
are typically used in Amaranth-native designs.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<p><span class="doc-section-title">Returns:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>value</code></b> ( <code>int</code>
|
||
) –
|
||
<div class="doc-md-description">
|
||
<p>The value of the probe, interpreted as an unsigned
|
||
integer.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
<p><span class="doc-section-title">Raises:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<code>ValueError</code>
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The probe was not found in the IO Core, or many probes
|
||
were found with the same name.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="doc doc-object doc-function">
|
||
|
||
|
||
<h4 id="manta.IOCore.set_probe" 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_probe</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_probe</span><span class="p">(</span><span class="n">probe</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
|
||
</span></code></pre></div>
|
||
|
||
<div class="doc doc-contents ">
|
||
|
||
<p>Set the value of an output probe on the FPGA.</p>
|
||
<p>This method is blocking.</p>
|
||
|
||
|
||
<p><span class="doc-section-title">Parameters:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>probe</code></b>
|
||
(<code>str | <span title="amaranth.Signal">Signal</span></code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The output probe to set the value
|
||
of. This may be either a string containing the name of the
|
||
probe, or the Amaranth Signal representing the probe itself.
|
||
Strings are typically used in Verilog-based workflows, and
|
||
Amaranth Signals are typically used in Amaranth-native designs.</p>
|
||
</div>
|
||
</li>
|
||
<li class="doc-section-item field-body">
|
||
<b><code>value</code></b>
|
||
(<code>int</code>)
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The value to set the probe to. This may be either
|
||
positive or negative, but must fit within the width of the
|
||
probe.</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>
|
||
|
||
|
||
<p><span class="doc-section-title">Raises:</span></p>
|
||
<ul>
|
||
<li class="doc-section-item field-body">
|
||
<code>ValueError</code>
|
||
–
|
||
<div class="doc-md-description">
|
||
<p>The probe was not found to be an output of the IO Core,
|
||
or many probes were found with the same name.</p>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
|
||
</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> |