一種DSP與PCI總線的接口設(shè)計(jì)
CPLD的程序如下:
Library IEEE;
Use IEEE.STD_LOGIC_1164.all;
Use IEEE.STD_LOGIC_unsigned.all;
Use IEEE.std_logic_arith.all;
ENTITY PCI IS
PORT(
ADS:IN STD_LOGIC;
LCLK:IN STD_LOGI
C;
LWR:IN STD_LOGIC;
LHOLD:IN STD_LOGIC;
LHOLDA:OUT STD_LOGIC;
READY:OUT STD_LOGIC;
OE:OUT STD_LOGIC;
RW:OUT STD_LOGIC);
END PCI;
ARCHITECTURE PCI_arch OF PCI IS
SIGNAL signal_0:STD_LOGIC;
BEGIN
PROCESS(LCLK)
BEGIN
IF LCLK'EVENT AND LCLK='1'THEN
IF LHOLD='1'THEN
IF ADS='0'THEN
Signal_0='1';
ELSIF ADS='1'THEN
Signal_0='0';
END IF;
END IF;
END IF;
IF LCLK'EVENT AND LCLK='1'THEN
IF LHOLD='1'THEN
IF LWR='0'THEN
OE='0';
RW='1';
ELSIF LWR='1'THEN
OE='1';
RW='0';
END IF;
END IF; END IF;
IF LCLK'EVENT AND LCLK='0'THEN
IF LHOLD='1'THEN
IF signal_0='1'THEN
READY='0';
ELSIF signal_0='0'THEN
READY='1';
END IF;
END IF;
END IF;
END PROCESS;
PROCESS(LCLK,LHOLD)
BEGIN
IF LCLK'EVENT AND LCLK='0'THEN
IF LHOLD='1'THEN
LHOLDA='1';
ELSIF LHOLD='0'THEN
LHOLDA='0';
END IF;
END IF;
END PROCESS;
END PCI_arch;
5 結(jié)束語(yǔ)
本文介紹的DSP與PCI總線的接 接方案靈活簡(jiǎn)單,減小了布板的復(fù)雜度,簡(jiǎn)化了PCI總線要求的時(shí)序,縮短了開發(fā)周期。采用該方案設(shè)計(jì)的數(shù)據(jù)處理系統(tǒng)工作穩(wěn)定,已應(yīng)用在低頻信號(hào)檢測(cè)領(lǐng)域中。
評(píng)論