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 浏览器查看

    当用https访问某个网站时,IE提醒“该页必须使用安全性较高的Web 浏览器查看” 您要访问的资源使用了128位版本的“安全套接层(SSL)” 安全保护.要查看该资源,您需要使用支持该版本的SSL浏 ...

  2. 【[Offer收割]编程练习赛13 B】最大子矩阵(自己的思路)

    [题目链接]:http://hihocoder.com/contest/offers13/problem/2 [题意] [题解] 算出1..250*250这些数字每个数字的所有因子(成对的那种,即x* ...

  3. ACDream - Xor pairs

    先上题目: Xor pairs Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Sub ...

  4. 20180703mysql运维专题一:利用etl监控mysql日志

    参考地址: https://www.elastic.co/solutions/logging https://www.elastic.co/guide/en/beats/filebeat/curren ...

  5. N天学习一个linux命令之ss

    用途 输出socket统计,无任何参数时默认显示的是已建立socket连接的列表 用法 ss [options] [ FILTER ] 常用选项 -h, --help 显示帮助信息 -V, --ver ...

  6. webservices系列(五)——javaweb整合Axis2及多service配置

    1.新建一个项目动态web项目webservice_test3. 2.打开<Tomcat安装目录>webapps/axis2/WEB-INF.将lib.conf.modules三个目录复制 ...

  7. UML类图符号解释

    在UML类图中,常见的有以下几种关系:  泛化(Generalization)和  实现(Realization) - 父子关系 依赖(Dependency) - 局部变量.方法參数 聚合(Aggre ...

  8. [Angular] Remove divs to Preserve Style and Layout with ng-container in Angular

    The Angular <ng-container> is a grouping element that doesn't interfere with styles or layout ...

  9. 【JavaSE】day03_Date、SimpleDateFormat、Calendar、Collection

    [JavaSE]day03_Date.SimpleDateFormat.Calendar.Collection 1.Date及其经常使用API 1)JAVA 中的时间 Java中的时间使用标准类库的D ...

  10. 1215-Cannot add foreign key constraint

    1.错误描写叙述 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/ ...