I2C controller core之Bit controller(02)
4 generate clock and control signals
1 -- architecture
signal iscl_oen, isda_oen : std_logic; -- internal I2C lines
signal sda_chk : std_logic; -- check SDA status (multi-master arbitration)
signal dscl_oen : std_logic; -- delayed scl_oen signals
signal sSCL, sSDA : std_logic; -- synchronized SCL and SDA inputs
signal dSCL, dSDA : std_logic; -- delayed versions ofsSCL and sSDA
signal clk_en : std_logic; -- statemachine clock enable
signal scl_sync, slave_wait : std_logic; -- clock generation signals
signal ial : std_logic; -- internal arbitration lost signal
signal cnt : unsigned( downto ); -- clock divider counter (synthesis) 12 -- whenever the slave is not ready it can delay the cycle by pulling SCL low
13 -- delay scl_oen
process (clk, nRst)
begin
if (nRst = '') then
dscl_oen <= '';
elsif (clk'event and clk = '') then
dscl_oen <= iscl_oen;
end if;
end process; 23 -- slave_wait is asserted when master wants to drive SCL high, but the slave pulls it low
24 -- slave_wait remains asserted until the slave releases SCL
process (clk, nRst)
begin
if (nRst = '') then
slave_wait <= '';
elsif (clk'event and clk = '') then
slave_wait <= (iscl_oen and not dscl_oen and not sSCL) or (slave_wait and not sSCL);
end if;
end process; 34 -- master drives SCL high, but another master pulls it low
35 -- master start counting down its low cycle now (clock synchronization)
scl_sync <= dSCL and not sSCL and iscl_oen; 38 -- generate clk enable signal
gen_clken: process(clk, nRst)
begin
if (nRst = '') then
cnt <= (others => '');
clk_en <= '';
elsif (clk'event and clk = '') then
if ((rst = '') or (cnt = ) or (ena = '') or (scl_sync = '')) then
cnt <= clk_cnt;
clk_en <= '';
elsif (slave_wait = '') then
cnt <= cnt;
clk_en <= '';
else
cnt <= cnt -;
clk_en <= '';
end if;
end if;
end process gen_clken;
I2C controller core之Bit controller(02)的更多相关文章
- I2C controller core之Bit controller(03)
FPGA proven, AISC proven, I2C controller core from OpenCores http://opencores.org/project,i2c Bit-co ...
- I2C controller core之Bit controller(01)
FPGA proven, AISC proven, I2C controller core from OpenCores http://opencores.org/project,i2c Bit-co ...
- I2C controller core之Bit controller(05)
6 generate statemachine 1 -- port cmd_ack : out std_logic; -- command completed 4 -- architecture ty ...
- I2C controller core之Bit controller(04)
4) detect start/stop condition START- falling edge on SDA while SCL is high; STOP - rising edge on ...
- ASP.NET Core MVC中Controller的Action,默认既支持HttpGet,又支持HttpPost
我们知道ASP.NET Core MVC中Controller的Action上可以声明HttpGet和HttpPost特性标签,来限制可以访问Action的Http请求类型(GET.POST等). 那 ...
- 阅读DMA Controller Core 官方手册
阅读DMA Controller Core 官方手册 DMA控制器框架图 怎样去设定一个DMA控制器 实例化DMA控制器 参数配置界面如下图所示: 对于width of the DMA length ...
- ASP.NET Core MVC中Controller的Action如何直接使用Response.Body的Stream流输出数据
在ASP.NET Core MVC中,我们有时候需要在Controller的Action中直接输出数据到Response.Body这个Stream流中,例如如果我们要输出一个很大的文件到客户端浏览器让 ...
- (六)Net Core项目使用Controller之一 c# log4net 不输出日志 .NET Standard库引用导致的FileNotFoundException探究 获取json串里的某个属性值 common.js 如何调用common.js js 筛选数据 Join 具体用法
(六)Net Core项目使用Controller之一 一.简介 1.当前最流行的开发模式是前后端分离,Controller作为后端的核心输出,是开发人员使用最多的技术点. 2.个人所在的团队已经选择 ...
- (十)Net Core项目使用Cookies (八)Net Core项目使用Controller之三-入参
(十)Net Core项目使用Cookies 一.简介 1.Net Core可以直接使用Cookies,但是调用方式有些区别. 2.Net Core将Request和Response分开实现. 二.基 ...
随机推荐
- 《零压力学Python》 之 第四章知识点归纳
第四章(决策和循环)知识点归纳 if condition: indented_statements [ elif condition: Indented_statements] [else: Inde ...
- Git:分支的创建、合并、管理和删除
了解分支 如果想实现多人协作.划出Bug区.Feature区等功能,就需要分支功能.(确实很强大的地方) 每次commit时,Git都把它们串成一条时间线,这条时间线就是一个分支.截止到目前,只有一条 ...
- scrapy——4 —反爬措施—logging—重要参数—POST请求发送实战
scrapy——4 常用的反爬虫策略有哪些 怎样使用logging设置 Resquest/Response重要参数有哪些 Scrapy怎么发送POST请求 动态的设置User-Agent(随即切换Us ...
- [HDU1403]Longest Common Substring(后缀数组)
传送门 求两个串的公共子串(注意,这个公共子串是连续的一段) 把两个串连在一起,中间再加上一个原字符串中不存在的字符,避免过度匹配. 求一遍height,再从height中找满足条件的最大值即可. 为 ...
- TCP 连接状态
TCP/IP的设计者如此设计,主要原因有两个: 防止上一次连接中的包迷路后重新出现,影响新的连接(经过2MSL时间后,上一次连接中所有重复的包都会消失). 为了可靠地关闭TCP连接.主动关闭方发送的最 ...
- VCenter中嵌套openstack VM不能ping通外部网络问题解决的方法
问题描写叙述: 近期搭建了vCenter环境,并使用vCenter创建的VM搭建了一套openstack环境.在验证openstack的外网功能时.发现报文死活ping不通外网,抓包发现报文在vcen ...
- MFC的UI更新机制和加速键的创建
近期在看<MFC Windows程序设计>这本书,正好看到更新菜单中的菜单项和加入菜单项的加速键这方面的内容,下面总一下总结. MFC提供的更新菜单项的机制例如以下: 通过消息映射表中的O ...
- 【译文】利用STAN做贝叶斯回归分析:Part 2 非正态回归
[译文]利用STAN做贝叶斯回归分析:Part 2 非正态回归 作者 Lionel Hertzogn 前一篇文章已经介绍了怎样在R中调用STAN对正态数据进行贝叶斯回归.本文则将利用三个样例来演示怎样 ...
- Extjs grid 设置行字体颜色
CustSuppGrid = Ext.create('Ext.grid.Panel', { title : '', // 标题头 iconCls : 'icon-grid', // 标题图标 stor ...
- jQuery总结02
1 如何搭建一个 jQuery 环境? 2 jQuery 对象与 DOM 对象一样吗?区别是什么? 3 jQuery选择器类型有哪些?