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.

Who can tell me what difference of them? (VHDL)

Status
Not open for further replies.

75 sinfocia

Newbie level 2
Newbie level 2
Joined
May 19, 2002
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
27
signal rd,dr : std_logic;
ad_bus,ram_bus : inout;
:cry:
1.
process(rd) ---- right.
begin
if (rd='0' and dr='1') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;

2.
process(rd) ---- error.
begin
if (rd='0') then
if dr='1' then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
end if;
ad_bus<=ad_bus_out;
end process;

3.
process(rd,dr) ---- right.
begin
if (rd='0') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;

4.
process(rd) ---- error.
begin
if (rd='0') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;
 

Hi,

It's not clear what's dr, ad_bus_out and what you really want to implement for those 2 signals. One thing you should keep in mind is to make the sensitivitly list complete in process if you want to use process.

Or else, Another way maybe just as simple as:
ad_bus <= ram_bus when rd = '0' else
"(others => 'Z');
 

The process 2 is wrong because it will generate latch, when rd = 1, what is the result ?
But I can't understand where is wrong in process 4
 

75 sinfocia said:
signal rd,dr : std_logic;
ad_bus,ram_bus : inout;
:cry:
1.
process(rd) ---- right.
begin
if (rd='0' and dr='1') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;

2.
process(rd) ---- error.
begin
if (rd='0') then
if dr='1' then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
end if;
ad_bus<=ad_bus_out;
end process;

3.
process(rd,dr) ---- right.
begin
if (rd='0') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;

4.
process(rd) ---- error.
begin
if (rd='0') then
ad_bus_out<=ram_bus;
else
ad_bus_out<="ZZZZZZZZ";
end if;
ad_bus<=ad_bus_out;
end process;

May be you have conflict with other design part
when dr signal not used in examples 2 and 4?
 

Hi,
I think first thing is to complete your sensitive list of your process ,otherwise you can't simulate it correctly.
 

All of four blocks are sensitivity list incomplete. Vhdl is a strong type language, don't you get a error message about that when you compile the codes?
 

Hi,
2 is error because the designer want to latch "z" state . it's illegal.
 

Hi
4 is simulated in error because incomplete sensitive list but can be synthesis correctly and gate simulation correctly.
 

please read the VHDL book carefully, all the sensitive list should include in the process. or you will get a error result.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top