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分开实现. 二.基 ...
随机推荐
- BZOJ 1641 USACO 2007 Nov. Cow Hurdles 奶牛跨栏
[题解] 弗洛伊德.更新距离的时候把$f[i][j]=min(f[i][j],f[i][k]+f[k][j])$改为$f[i][j]=min(f[i][j],max(f[i][k],f[k][j])) ...
- 深入浅出了解HTTP协议
深入浅出了解HTTP协议
- 【Codeforces 1114D】Flood Fill
[链接] 我是链接,点我呀:) [题意] 你选择一个point作为start_position 然后每次你可以将包含该start_position的所有联通块变成任意颜色 问你最少要多少次变换才能将所 ...
- 球的序列(formation.*)
N个编号为1-n的球,每个球都有唯一的编号.这些球被排成两种序列,分别为A.B序列,现在需要重新寻找一个球的序列l,对于这个子序列l中任意的两个球,要求j,k(j<k),都要求满足lj在A中 ...
- 洛谷—— P1077 摆花
https://www.luogu.org/problem/show?pid=1077 题目描述 小明的花店新开张,为了吸引顾客,他想在花店的门口摆上一排花,共m盆.通过调查顾客的喜好,小明列出了顾客 ...
- jQuery toast message 地址 使用
jQuery toast message 地址 使用 https://github.com/akquinet/jquery-toastmessage-plugin/wiki
- 游戏人生(一),我的lua之旅:那些坑爹的CCBReaderLoad
首先,我们说说这个CCBReaderLoad. 这个脚本是cocos2dx自带的一个lua+cocosbuilder 的工具,详细功能呐,往下看. 先来看下我遇到的一个问题: ----美工给了我一个. ...
- monitor weblogic server ,Very simple to use, weblogic监控、巡检、故障简单小工具
1. 开发了一个简单的监视weblogic执行情况的小程序.各位朋友下载下来试试,不用登陆console就能够知道server的执行状况,包含了jvm.线程.jdbc.状态jms等:另一个更简 ...
- 通过指针访问C++对象的私有成员
C++对象的私有成员是禁止类外的访问的.但是我们仍然可以通过指针访问C++对象的私有成员. #include <iostream> using namespace std; class A ...
- C#备份及还原数据库的实现代码(粗略) // 利用C#还原数据库(SQL SERVER)备份文件到指定路径
C#数据库备份及还原 1.在用户的配置时,我们需要列出当前局域网内所有的数据库服务器,并且要列出指定服务器的所有数据库,实现代码如下: 取得数据库服务器列表: public ArrayList Get ...