Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need help in vhdl logic for interrupt handling

Status
Not open for further replies.

bibhuti_seoul

Newbie level 2
Joined
Dec 10, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,321
Friends,
I need held in VHDL logic for Interrupt in Microwire cpu interface. I have FPGA to interfce with CPU.
As per datasheet, status register is updated and compares with last status register. if updated status register is not equal to present status register, then it generates interrupt. and then CPU gets output from FPGA.

I wrote code like this
-- Status register update
process(mclk,load_status)
begin


if mclk ='1' and mclk'event then
-- if power_up_activate ='1' then
if load_status = '1' then
dasl_status_update_reg<=dasl_status_reg;
elsif load_status = '0' and power_up_activate ='1' then
dasl_status_update_reg<=dasl_status_update_reg;
elsif power_up_activate ='0' then
dasl_status_update_reg<=dasl_status_update_reg;
end if;

--else dasl_status_update_reg<=(others=>'0');
--end if;
end if;
end process;
-- Interrupt generation-----------------
process(mclk,rst_dasl)
begin
if rst_dasl ='0' then
int<='1';
elsif mclk='1' and mclk'event then
--if mclk ='1' and mclk'event then
--if power_up_activate ='1' then
if load_status='1' then
if dasl_status_update_reg/= dasl_status_reg then --dasl_status_update_reg/=dasl_status_reg
int<='0';
else--if dasl_status_update_reg/= dasl_status_reg THEN
int<='1';
end if;
else int<='1';
end if;

end if;
end process;
--FPGA Output to CPU, Serial process-----------------
cpu_txprocess: process(cclk)
begin
if cclk ='0' and cclk'event then
If cs = '1' then --load_status
-- cpu_status_reg_update<=(OTHERS=>'0');
-- elsif cpu_reg_update = '1' then
cpu_status_reg_update<=dasl_status_update_reg; --dasl_status_reg

elsif cs ='0' then--cpu_read

cpu_status_reg_update(6 downto 0)<=cpu_status_reg_update(7 downto 1);--cpu_status_reg(6 downto 0);
--dasl_status_reg(6 downto 0)<=dasl_status_reg(7 downto 1);--cpu_status_reg(6 downto 0);
cpu_status_reg_update(7)<='0';

end if;
end if;
end process cpu_txprocess;

-- CPU Input TO FPGA Serial process-----------------
cpu_rxprocess: process(cclk)
begin
if cclk ='1' and cclk'event then
--if cpu_write = '1' then
if cs ='0' then
cpu_control_reg<=ci & cpu_control_reg(7 downto 1);
end if;
--end if;
end if;
end process cpu_rxprocess;

Please help me..
Problem is
a. Always output comes without enabling load_status.
pls help me if you can.. I am working on DASL chip ,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top