Guest
I'm trying to build an IDE device and I'm having some difficulty
getting my head around why the following peice of VHDL will synthesize,
but leave the data bus at hi-z permenantly -
process(RD, WR, RST, sramreadpipe, SRAM_DATA)
begin
if RST='1' then -- if no reset in progress
if RD='1' then -- if no read in progress
DATA<=(others=>'Z'); -- high-z the bus
else -- if theres a read in progress
if falling_edge(RD) then-- check for any just-starting reads
DATA<="0101010101010101";
end if; -- ..
end if; -- ..
else
DATA<=(others=>'Z');
end if;
end process;
but if I comment out the line under 'if RD='1'' thus
process(RD, WR, RST, sramreadpipe, SRAM_DATA)
begin
if RST='1' then -- if no reset in progress
if RD='1' then -- if no read in progress
-- DATA<=(others=>'Z'); -- high-z the bus
else -- if theres a read in progress
if falling_edge(RD) then-- check for any just-starting reads
DATA<="0101010101010101";
end if; -- ..
end if; -- ..
else
DATA<=(others=>'Z');
end if;
end process;
the system behaves as expected (ie, only setting the DATA bus when
RD=0). I know I could use 'if RD='0'' instead of the falling_edge, but
this is a bad idea because I'm going to need actions only to be carried
out on the falling edge later on.. Can anyone give me a hand with this?
Ta muchly.
-Alan
getting my head around why the following peice of VHDL will synthesize,
but leave the data bus at hi-z permenantly -
process(RD, WR, RST, sramreadpipe, SRAM_DATA)
begin
if RST='1' then -- if no reset in progress
if RD='1' then -- if no read in progress
DATA<=(others=>'Z'); -- high-z the bus
else -- if theres a read in progress
if falling_edge(RD) then-- check for any just-starting reads
DATA<="0101010101010101";
end if; -- ..
end if; -- ..
else
DATA<=(others=>'Z');
end if;
end process;
but if I comment out the line under 'if RD='1'' thus
process(RD, WR, RST, sramreadpipe, SRAM_DATA)
begin
if RST='1' then -- if no reset in progress
if RD='1' then -- if no read in progress
-- DATA<=(others=>'Z'); -- high-z the bus
else -- if theres a read in progress
if falling_edge(RD) then-- check for any just-starting reads
DATA<="0101010101010101";
end if; -- ..
end if; -- ..
else
DATA<=(others=>'Z');
end if;
end process;
the system behaves as expected (ie, only setting the DATA bus when
RD=0). I know I could use 'if RD='0'' instead of the falling_edge, but
this is a bad idea because I'm going to need actions only to be carried
out on the falling edge later on.. Can anyone give me a hand with this?
Ta muchly.
-Alan