Files
luban-lite-t3e-pro/doc/topics/sdk/mac/mac_user_guide.html
2025-01-23 16:37:00 +08:00

240 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.0">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="description" content="以太网Ethernet是一种计算机局域网组网技术基于 IEEE802.3 标准它规定了包括物理层的连线RJ45电气信号PHY和媒体访问层MAC协议等 以太网的特征是有线网络,网络中的各终端必须通过网线进行连接,以太网模块可以简单的理解为 MAC 通过 MII 总线控制 PHY 共同完成终端之间数据交换的一种设备。 表 1 . 术语定义 术语 定义 注释说明 MAC ..."/><meta name="DC.rights.owner" content="(C) 版权 2025"/><meta name="copyright" content="(C) 版权 2025"/><meta name="generator" content="DITA-OT"/><meta name="DC.type" content="topic"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.date.modified" content="2024-11-29"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="id"/><meta name="DC.language" content="zh-CN"/><title>MAC 使用指南</title><!-- Build number 2023110923. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content=""/><meta name="wh-source-relpath" content="topics/sdk/mac/mac_user_guide.dita"/><meta name="wh-out-relpath" content="topics/sdk/mac/mac_user_guide.html"/>
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2023110923"/>
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2023110923"/>
<script src="../../../webhelp/app/options/properties.js?buildId=20250121171154"></script>
<script src="../../../webhelp/app/localization/strings.js?buildId=2023110923"></script>
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250121171154"></script>
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2023110923"></script>
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2023110923"></script>
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-styles-web.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/notes.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-common.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-images.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/footnote.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-web-watermark.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/topic-body-list.css?buildId=2023110923"/></head>
<body id="id" class="wh_topic_page frmBody">
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
跳转到主要内容
</a>
<header class="navbar navbar-default wh_header">
<div class="container-fluid">
<div class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
<div class="wh_logo_and_publication_title_container">
<div class="wh_logo_and_publication_title">
<a href="http://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo-white.png" alt="RTOS SDK 使用指南SDK 指南文件"/></a>
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"><span class="ph mainbooktitle">RTOS SDK 使用指南</span><span class="ph booktitlealt">SDK 指南文件</span></span></a></div>
</div>
</div>
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
</div>
</div>
</div>
</header>
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
<form id="searchForm" method="get" role="search" action="../../../search.html"><div><input type="search" placeholder="搜索 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"/><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form>
</div>
<div class="container-fluid" id="wh_topic_container">
<div class="row">
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
<div data-tooltip-position="bottom" class=" wh_breadcrumb "></div>
<div class="wh_right_tools">
<button class="wh_hide_highlight" aria-label="切换搜索突出显示" title="切换搜索突出显示"></button>
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="折叠截面" title="折叠截面"></button>
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
</div>
</nav>
</div>
<div class="wh_content_area">
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12" id="wh_topic_body">
<button id="wh_close_topic_toc_button" class="close-toc-button d-none" aria-label="Toggle topic table of content" aria-controls="wh_topic_toc" aria-expanded="true">
<span class="close-toc-icon-container">
<span class="close-toc-icon"></span>
</span>
</button>
<div class=" wh_topic_content body "><main role="main"><article class="- topic/topic topic" role="article" aria-labelledby="ariaid-title1"><span class="edit-link" style="font-size:12px; opacity:0.6; text-align:right; vertical-align:middle"><a target="_blank" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/mac/mac_user_guide.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">MAC 使用指南</h1><div class="date inPage">29 Nov 2024</div><div style="color: gray;">
Read time: 1 minute(s)
</div><div class="- topic/body body"><p class="- topic/p p" data-ofbid="d337726e17__20250121171850">以太网Ethernet是一种计算机局域网组网技术基于 IEEE802.3 标准它规定了包括物理层的连线RJ45电气信号PHY和媒体访问层MAC协议等
以太网的特征是有线网络,网络中的各终端必须通过网线进行连接,以太网模块可以简单的理解为 MAC 通过 MII 总线控制 PHY 共同完成终端之间数据交换的一种设备。</p><div class="table-container"><table class="- topic/table table frame-all" id="id__table_dfw_bjn_fdc" data-ofbid="id__table_dfw_bjn_fdc" data-cols="3"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label"><span class="table--title-label-number"> 1</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">术语定义</span></caption><colgroup><col/><col/><col/></colgroup><thead class="- topic/thead thead"><tr class="- topic/row"><th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_dfw_bjn_fdc__entry__1">术语</th><th class="- topic/entry entry colsep-1 rowsep-1" id="id__table_dfw_bjn_fdc__entry__2">定义</th><th class="- topic/entry entry colsep-0 rowsep-1" id="id__table_dfw_bjn_fdc__entry__3">注释说明</th></tr></thead><tbody class="- topic/tbody tbody"><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__1">MAC</td><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__2">Media Access Control</td><td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__3">媒体访问控制Ethernet 中的一个组成模块,对应 OSI 参考模型中的数据链路层</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__1">PHY</td><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__2">Physic</td><td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__3">物理接口收发器,物理对应 OSI 参考模型中的物理层</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__1">MII</td><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__2">Media Independent Interface</td><td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__3">媒体独立接口,是 MAC 与 PHY 连接的标准接口,使用 4 根线来传输数据</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__1">RMII</td><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__2">Reduced MII</td><td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__3">简化的媒体独立接口,使用 2 根线来传输数据</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__1">GMII</td><td class="- topic/entry entry colsep-1 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__2">Gigabit MII</td><td class="- topic/entry entry colsep-0 rowsep-1" headers="id__table_dfw_bjn_fdc__entry__3">千兆的媒体独立接口,使用 8 根线来传输数据</td></tr><tr class="- topic/row"><td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_dfw_bjn_fdc__entry__1">MDIO</td><td class="- topic/entry entry colsep-1 rowsep-0" headers="id__table_dfw_bjn_fdc__entry__2">Management Data Input/Output</td><td class="- topic/entry entry colsep-0 rowsep-0" headers="id__table_dfw_bjn_fdc__entry__3"> PHY 的管理接口,用来读/写 PHY 的寄存器,以控制 PHY 的行为或获取 PHY 的状态</td></tr></tbody></table></div><section class="- topic/section section" id="id__id4" data-ofbid="id__id4"><h2 class="- topic/title title sectiontitle">使用拓扑</h2>
<p class="- topic/p p" data-ofbid="d337726e82__20250121171850">一个典型的以太网电路至少需要如下器件的参与</p>
<ul class="- topic/ul ul simple" id="id__ul_efw_bjn_fdc" data-ofbid="id__ul_efw_bjn_fdc"><li class="- topic/li li" data-ofbid="d337726e86__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e88__20250121171850">RJ45 连接器</p>
</li><li class="- topic/li li" data-ofbid="d337726e91__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e93__20250121171850">网络变压器</p>
</li><li class="- topic/li li" data-ofbid="d337726e96__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e98__20250121171850">晶振</p>
</li><li class="- topic/li li" data-ofbid="d337726e101__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e103__20250121171850">PHY 收发器</p>
</li><li class="- topic/li li" data-ofbid="d337726e106__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e108__20250121171850">MAC 控制器</p>
</li><li class="- topic/li li" data-ofbid="d337726e111__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e113__20250121171850">AP 处理器</p>
</li></ul>
<p class="- topic/p p" data-ofbid="d337726e117__20250121171850"> 集成 MAC 控制器模块AP 内部也可以提供 PHY 收发器所需的时钟,从而不使用外部晶振模块。</p>
<p class="- topic/p p" data-ofbid="d337726e120__20250121171850">如果要提升硬件的防静电能力,外部一般会增加 ESD 保护电路。</p>
<figure class="- topic/fig fig fignone" id="id__fig_ffw_bjn_fdc" data-ofbid="id__fig_ffw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_gfw_bjn_fdc" src="../../../images/mac/ethernet-hw.jpg" width="384" alt="ethernet-hw"/></div><br/><figcaption data-caption-side="bottom" class="- topic/title title figcapcenter"><span class="figtitleprefix fig--title-label"><span class="fig--title-label-number"> 1</span><span class="fig--title-label-punctuation">. </span></span><span class="fig--title">组件拓扑</span></figcaption></figure>
</section><p class="- topic/p p" data-ofbid="d337726e131__20250121171850">一个典型的以太网工作模块由如下组件组件组成</p><ul class="- topic/ul ul simple" id="id__ul_hfw_bjn_fdc" data-ofbid="id__ul_hfw_bjn_fdc"><li class="- topic/li li" data-ofbid="d337726e134__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e136__20250121171850">AP Core</p>
</li><li class="- topic/li li" data-ofbid="d337726e139__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e141__20250121171850">DMA</p>
</li><li class="- topic/li li" data-ofbid="d337726e144__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e146__20250121171850">MAC</p>
</li><li class="- topic/li li" data-ofbid="d337726e149__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e151__20250121171850">PHY</p>
</li></ul><p class="- topic/p p" data-ofbid="d337726e154__20250121171850">AIC 的 SoC 根据型号不同,以太网模块有如下两种拓扑结构</p><div class="- topic/div div section" id="id__id6">
<strong class="+ topic/ph hi-d/b ph b">全集成</strong>
<p class="- topic/p p" data-ofbid="d337726e161__20250121171850">SoC 内部集成 MAC 和 PHY</p><figure class="- topic/fig fig fignone" id="id__fig_ifw_bjn_fdc" data-ofbid="id__fig_ifw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_jfw_bjn_fdc" src="../../../images/mac/topo-all.jpg" alt="topo-all"/></div><br/></figure></div><div class="- topic/div div section" id="id__mac">
<strong class="+ topic/ph hi-d/b ph b">单 MAC</strong>
<p class="- topic/p p" data-ofbid="d337726e172__20250121171850">SoC 内部仅集成 MAC需要外挂 PHY</p><figure class="- topic/fig fig fignone" id="id__fig_kfw_bjn_fdc" data-ofbid="id__fig_kfw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_lfw_bjn_fdc" src="../../../images/mac/topo-phy.jpg" alt="topo-phy"/></div><br/></figure>
</div><section class="- topic/section section" data-ofbid="d337726e179__20250121171850"><h2 class="- topic/title title sectiontitle">模块架构</h2>
<figure class="- topic/fig fig fignone" id="id__fig_mfw_bjn_fdc" data-ofbid="id__fig_mfw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_nfw_bjn_fdc" src="../../../images/mac/eth-arch.jpg" alt="eth-arch"/></div><br/></figure>
<div class="- topic/div div section" id="id__id8">
<strong class="+ topic/ph hi-d/b ph b">MAC 架构</strong>
<figure class="- topic/fig fig fignone" id="id__fig_ofw_bjn_fdc" data-ofbid="id__fig_ofw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_pfw_bjn_fdc" src="../../../images/mac/eth-mac.jpg" alt="eth-mac"/></div><br/></figure>
</div>
<div class="- topic/div div section" id="id__phy">
<strong class="+ topic/ph hi-d/b ph b">PHY 架构</strong>
<figure class="- topic/fig fig fignone" id="id__fig_qfw_bjn_fdc" data-ofbid="id__fig_qfw_bjn_fdc"><br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="id__image_rfw_bjn_fdc" src="../../../images/mac/eth-phy.jpg" alt="eth-phy"/></div><br/></figure></div>
</section><section class="- topic/section section" id="id__id9" data-ofbid="id__id9"><h2 class="- topic/title title sectiontitle">模块特性</h2>
<ul class="- topic/ul ul simple" id="id__ul_sfw_bjn_fdc" data-ofbid="id__ul_sfw_bjn_fdc"><li class="- topic/li li" data-ofbid="d337726e215__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e217__20250121171850">支持全双工/半双工</p>
</li><li class="- topic/li li" data-ofbid="d337726e220__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e222__20250121171850">支持 100/10 Mbps部分 SoC 支持 1000 Mbps</p>
</li><li class="- topic/li li" data-ofbid="d337726e225__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e227__20250121171850">支持 RMII 接口,部分 SoC 支持 RGMII 接口</p>
</li><li class="- topic/li li" data-ofbid="d337726e230__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e232__20250121171850">支持内部 DMA</p>
</li><li class="- topic/li li" data-ofbid="d337726e235__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e237__20250121171850">TXFIFO/RXFIFO 的大小均为 2048 Byte均支持阈值模式和存储-转发模式</p>
</li><li class="- topic/li li" data-ofbid="d337726e240__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e242__20250121171850">支持 VLAN 哈希过滤</p>
</li><li class="- topic/li li" data-ofbid="d337726e245__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e247__20250121171850">支持 64-bit 哈希地址过滤、完美地址过滤(支持 8 个地址寄存器)</p>
</li><li class="- topic/li li" data-ofbid="d337726e250__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e252__20250121171850">支持源地址的插入/替换VLAN 的插入/替换/删除CRC 的插入/替换/删除</p>
</li><li class="- topic/li li" data-ofbid="d337726e255__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e257__20250121171850">支持接收校验和错误检测</p>
</li><li class="- topic/li li" data-ofbid="d337726e260__20250121171850">
<p class="- topic/p p" data-ofbid="d337726e262__20250121171850">支持发送校验和计算</p>
</li></ul>
</section></div></article></main></div>
</div>
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
<div id="wh_topic_toc_content">
<div class=" wh_topic_toc "><div class="wh_topic_label">在本页上</div><ul><li class="section-item"><div class="section-title"><a href="#id__id4" data-tocid="id__id4">使用拓扑</a></div></li><li class="section-item"><div class="section-title"><a href="#id__id9" data-tocid="id__id9">模块特性</a></div></li></ul></div>
</div>
</nav>
</div>
</div>
</div>
<footer class="navbar navbar-default wh_footer">
<div class=" footer-container mx-auto ">
<title>footer def</title>
<style><!--
.p1 {
font-family: FangZhengShuSong, Times, serif;
}
.p2 {
font-family: Arial, Helvetica, sans-serif;
}
.p3 {
font-family: "Lucida Console", "Courier New", monospace;
}
--></style>
<div class="webhelp.fragment.footer">
<p class="p1">Copyright © 2019-2024 广东匠芯创科技有限公司. All rights reserved.</p>
</div><div>
<div class="generation_time">
Update Time: 2025-01-21
</div>
</div>
</div>
</footer>
<div id="go2top" class="d-print-none">
<span class="oxy-icon oxy-icon-up"></span>
</div>
<div id="modal_img_large" class="modal">
<span class="close oxy-icon oxy-icon-remove"></span>
<div id="modal_img_container"></div>
<div id="caption"></div>
</div>
<script src="${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer="defer"></script>
</body>
</html>