FPGA proven, AISC proven, I2C controller core from OpenCores

http://opencores.org/project,i2c

Bit-controller

5  block

  1) capture SCL and SDA    

 -- port
scl_i : in std_logic;
sda_i : in std_logic; 5 -- architecture 7 -- block
bus_status_ctrl : block
singal cSCL, cSDA : std_logic_vector( downto ); capture_scl_sda: process(clk, nRst)
begin
if (nRst = '') then
cSCL <= "";
cSDA <= "";
elsif (clk'event and clk = '') then
if (rst = '') then
cSCL <= "";
cSDA <= "";
else
cSCL <= (cSCL() & scl_i);
cSDA <= (cSDA() & sda_i);
endif;
endif;
end process capture_scl_sda;

  2) filter SCL and SDA (glitch-free)

 1 -- port
ena : in std_logic; -- core enable signal
clk_cnt : in unsigned( downto ); -- clock prescale value 5 -- block
signal fSCL : std_logic_vector( downto ); -- filter inputs for SCL
signal fSDA : std_logic_vector( downto ); -- filter inputs for SDA
signal filter_cnt : unsigned( downto ); -- clock divider for filter filter_divider: process(clk, nRst)
begin
if (nRst = '') then
filter_cnt <= (others => '');
elsif (clk'event and clk = '') then
if ( (rst = '') or (ena = '') ) then
filter_cnt <= (others => '');
elsif (filter_cnt = ) then
filter_cnt <= clk_cnt( downto );
else
filter_cnt <= filter_cnt -;
end if;
end if;
end process filter_divider; filter_scl_sda: process(clk, nRst)
begin
if (nRst = '') then
fSCL <= (others => '');
fSDA <= (others => '');
elsif (clk'event and clk = '') then
if (rst = '') then
fSCL <= (others => '');
fSDA <= (others => '');
elsif (filter_cnt = ) then
fSCL <= (fSCL( downto ) & cSCL());
fSDA <= (fSDA( downto ) & cSDA());
end if;
end if;
end process filter_scl_sda;

  3) generate filtered SCL and SDA signals

 1 -- architecture
signal sSCL, sSDA : std_logic; -- synchronized SCL and SDA inputs
signal dSCL, dSDA : std_logic; -- delayed versions ofsSCL and sSDA 5 -- block
scl_sda: process(clk, nRst)
begin
if (nRst = '') then
sSCL <= '';
sSDA <= ''; dSCL <= '';
dSDA <= '';
elsif (clk'event and clk = '') then
if (rst = '') then
sSCL <= '';
sSDA <= ''; dSCL <= '';
dSDA <= '';
else
sSCL <= (fSCL() and fSCL()) or
(fSCL() and fSCL()) or
(fSCL() and fSCL());
sSDA <= (fSDA() and fSDA()) or
(fSDA() and fSDA()) or
(fSDA() and fSDA()); dSCL <= sSCL;
dSDA <= sSDA;
end if;
end if;
end process scl_sda;

I2C controller core之Bit controller(03)的更多相关文章

  1. I2C controller core之Bit controller(01)

    FPGA proven, AISC proven, I2C controller core from OpenCores http://opencores.org/project,i2c Bit-co ...

  2. I2C controller core之Bit controller(05)

    6 generate statemachine 1 -- port cmd_ack : out std_logic; -- command completed 4 -- architecture ty ...

  3. I2C controller core之Bit controller(04)

    4) detect start/stop condition START- falling edge on SDA while SCL is high;  STOP -  rising edge on ...

  4. I2C controller core之Bit controller(02)

    4 generate clock and control signals 1 -- architecture signal iscl_oen, isda_oen : std_logic; -- int ...

  5. ASP.NET Core MVC中Controller的Action,默认既支持HttpGet,又支持HttpPost

    我们知道ASP.NET Core MVC中Controller的Action上可以声明HttpGet和HttpPost特性标签,来限制可以访问Action的Http请求类型(GET.POST等). 那 ...

  6. 阅读DMA Controller Core 官方手册

    阅读DMA Controller Core 官方手册 DMA控制器框架图 怎样去设定一个DMA控制器 实例化DMA控制器 参数配置界面如下图所示: 对于width of the DMA length ...

  7. ASP.NET Core MVC中Controller的Action如何直接使用Response.Body的Stream流输出数据

    在ASP.NET Core MVC中,我们有时候需要在Controller的Action中直接输出数据到Response.Body这个Stream流中,例如如果我们要输出一个很大的文件到客户端浏览器让 ...

  8. (六)Net Core项目使用Controller之一 c# log4net 不输出日志 .NET Standard库引用导致的FileNotFoundException探究 获取json串里的某个属性值 common.js 如何调用common.js js 筛选数据 Join 具体用法

    (六)Net Core项目使用Controller之一 一.简介 1.当前最流行的开发模式是前后端分离,Controller作为后端的核心输出,是开发人员使用最多的技术点. 2.个人所在的团队已经选择 ...

  9. (十)Net Core项目使用Cookies (八)Net Core项目使用Controller之三-入参

    (十)Net Core项目使用Cookies 一.简介 1.Net Core可以直接使用Cookies,但是调用方式有些区别. 2.Net Core将Request和Response分开实现. 二.基 ...

随机推荐

  1. 关于嵌入式web服务器

    1.boa的配置文件boa.conf Port 80 //服务访问端口 User 0 Group 0 ErrorLog /var/log/boa/error_log //错误日志地址 AccessLo ...

  2. [hdu2222] [AC自动机模板] Keywords Search [AC自动机]

    AC自动机模板,注意!ch,Fail,lab数组的大小不是n而是节点个数,需要认真计算! #include <iostream> #include <algorithm> #i ...

  3. Fibonacci数列(codevs 1250)

    题目描述 Description 定义:f0=f1=1, fn=fn-1+fn-2(n>=2).{fi}称为Fibonacci数列. 输入n,求fn mod q.其中1<=q<=30 ...

  4. 造成segment fault,产生core dump的可能原因

    1.内存访问越界 a) 由于使用错误的下标,导致数组访问越界 b) 搜索字符串时,依靠字符串结束符来判断字符串是否结束,但是字符串没有正常的使用结束符 c) 使用strcpy, strcat, spr ...

  5. 用sqlldr导入csv文件

    1.新建文件test.ctl,内容如下 load dataCHARACTERSET 'UTF16' \*指定编码格式,很重要*\ infile 'vodall.csv' append into tab ...

  6. 【ACM】hdu_2004_成绩转换_201307261516

    成绩转换Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submiss ...

  7. [bzoj3037/2068]创世纪[Poi2004]SZP_树形dp_并查集_基环树

    创世纪 SZP bzoj-3037/2068 Poi-2004 题目大意:给你n个物品,每个物品可以且仅可以控制一个物品.问:选取一些物品,使得对于任意的一个被选取的物品来讲,都存在一个没有被选取的物 ...

  8. Spring MVC-控制器(Controller)-属性方法名称解析器(Properties Method Name Resolver )示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_propertiesmethodnameresolver.htm 说明:示例基于S ...

  9. N天学习一个Linux命令之free

    用途 查看系统内存(物理/虚拟/缓存/共享)使用情况 用法 free [-b | -k | -m | -g | -h] [-o] [-s delay ] [-c count ] [-a] [-t] [ ...

  10. A java code

    With the help of LiJun I got a piece of JAVA code. With this code, I can do below things like connec ...