阅读:1496回复:0
xilinx cpld 与9052的问题--高分求教
我做的数字量板卡,用的XC9500 CPLD和9052,我编好了CPLD 的逻辑,下载成功,插上板卡,每次都启动不了机子,BIOS自检过不去。这是什么原因呢?高分求教,下面是我的 CPLD 源代码
entity KPCI840_VD is Port ( LADV: buffer STD_LOGIC_VECTOR (15 downto 0);--与9052打交道的数据线 INV: in STD_LOGIC_VECTOR (15 downto 0);--输入数字量引脚OUTV: out STD_LOGIC_VECTOR (15 downto 0);--输出数字量引脚 A3: in STD_LOGIC; A2: in STD_LOGIC; LCLK: in STD_LOGIC; --时钟输入 LRST: in STD_LOGIC;--功能见笔记本 LRDY: buffer STD_LOGIC; RD: in STD_LOGIC; WR: in STD_LOGIC; BLAST: in STD_LOGIC; ADS: in STD_LOGIC; LWR: in STD_LOGIC; CS0: in STD_LOGIC; CS1: in STD_LOGIC; LATCH: BUFFER STD_LOGIC--控制锁存器的输出 ); end KPCI840_VD; architecture Behavioral of KPCI840_VD is signal OE0: std_logic; signal wren : std_logic; signal chipsel: std_logic; begin -------------------------------------------------------------------- --下面这个进程逻辑用来敲定给9052的LRDY信号 -------------------------------------------------------------------- process(lclk,ads,blast)-- begin if (lclk\'event and lclk=\'1\') then --如果LCLK信号有了上升沿 if (ads=\'0\') then Lrdy<=\'0\'; --如果ADS信号为0,则置LRDY信号为0,表明局部总线上有了数据或者局部总线可以接受数据了。 elsif (blast=\'0\') then Lrdy<=\'1\'; --如果ADS信号不为0(说明有效地址,并且开始一个总线传输),且BLAST信号为0,则置LRDY信号为1。 end if; end if; end process; --结束该进程 -------------------------------------------------------------------- --下面这个进程逻辑用来敲定决定是否写的LE0管脚的有效与否,如果有效则输出数据 -------------------------------------------------------------------- process(LADV,LATCH,lrst) begin IF (LRST=\'0\') THEN OUTV<=\"0000000000000000\"; ELSIF (LATCH=\'1\') then OUTV<=LADV; end if; end process; --------------------------------------------------------------------- wren<= not(lclk or Lrdy or wr or chipsel); LATCH<=wren and (NOT A2) AND (NOT A3); --LATCH<=wren and A3 AND (NOT A2); OE0<=not( Lrdy OR rd OR A3 OR A2 or chipsel); chipsel<=( CS0 or CS1); ---------------------------------------------------------------------- --下面这个进程逻辑用来判断读信号OE0是否有效,如果有效,则把数据输入到CPLD与9052的连接数据线上 ---------------------------------------------------------------------- process(OE0) begin if OE0=\'1\' then LADV<=INV; END IF; end process; ---------------------------------------------------------------------- end Behavioral; |
|