|
技术交流 | 电路欣赏 | 工控天地 | 数字广电 | 通信技术 | 电源技术 | 测控之家 | EMC技术 | ARM技术 | EDA技术 | PCB技术 | 嵌入式系统 驱动编程 | 集成电路 | 器件替换 | 模拟技术 | 新手园地 | 单 片 机 | DSP技术 | MCU技术 | IC 设计 | IC 产业 | CAN-bus/DeviceNe |
请教给双向端口赋值就要产生下面的警告吗?该如何解决? |
作者:bluefancy 栏目:EDA技术 |
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; --************************************************** entity ADcontrol is PORT( Din: inout std_logic_vector(11 downto 0); CLKIN: in std_logic; BUSY: in std_logic; nCS,nWR,nRD: out std_logic; nCONVST: out std_logic ); end ADcontrol; --************************************************** architecture a of ADcontrol is type state_type is (S0,S1,S2,S3); signal State: state_type; -- variable ControlReg: std_logic_vector(11 downto 0); signal DataSave: std_logic_vector(11 downto 0); begin PROCESS(CLKIN,State,BUSY) begin if CLKIN'event and CLKIN='1' then Case State is when S0 => --Initialization nCS<='0'; nRD<='1'; nWR<='0'; nCONVST<='1'; Din<="000100000000"; State<=S1; when S1=> --Channel Selection nCS<='0'; nRD<='1'; nWR<='0'; nCONVST<='1'; Din<="000100000000"; State<=S2; when S2=> --Start Conversion nCS<='1'; nRD<='1'; nWR<='1'; nCONVST<='0'; if BUSY='0' then State<=S3; --End of Conversion end if; when S3=> --Read Data nCS<='0'; nRD<='0'; nWR<='1'; nCONVST<='1'; DataSave<=Din; State<=S1; when others=> &nb |
2楼: | >>参与讨论 |
作者: n3207 于 2005/1/16 10:55:00 发布:
好好看看以前的帖子,关于INOUT的 你现在还不知道什么叫INOUT |
|
|
免费注册为维库电子开发网会员,参与电子工程师社区讨论,点此进入 |
Copyright © 1998-2006 www.dzsc.com 浙ICP证030469号 |