tshft_shft.vhd

来自「这是一个I2C串行数据通信协议以VHDL硬件描述语言实现的IP核」· VHDL 代码 · 共 38 行

VHD
38
字号
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity tshft_shft is
port(
     fi2c,reset,fcore:in std_logic;
     tx:in std_logic_vector(7 downto 0);
     shift_temp,shift_en1:in std_logic;
     shift_i1:out std_logic;
     scl,sda:out std_logic);
end tshft_shft;
architecture behav of tshft_shft is
component i2c_tshift 
port(
     fi2c:in std_logic;
     tx:in std_logic_vector(7 downto 0);
     shift_en1,shift_i,shift_temp:in std_logic;
     shift_i1,shift_en,sda:out std_logic
    );
end component;
component i2c_shift
port(
     fcore,reset:in std_logic;
     shift_en:in std_logic;
     scl,shift_i:out std_logic
    );
end component;
signal shift_en,shift_i:std_logic;
begin
u3:i2c_tshift port map(fi2c,tx,shift_en1,shift_i,shift_temp,
                       shift_i1,shift_en,sda);
u4:i2c_shift port map(fcore,reset,shift_en,scl,shift_i);
end behav;



     

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?