- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wonder what is the equivalence of this Verilog statement? assign data = (cs && oe && ! we) ? data_out : 8'bz;Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing
data <= data_out when cs = '1' and oe = '1' and we = '0' else (others => 'Z'); I don't personally speak Verilog but I'm guessing that the gist is: when the boolean expression "cs and oe and not we" is 1, assign data_out to data otherwise tri-state data. I hope that's nough to make sense of the VHDL above anyway.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
THanks Batflink! It should be it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry I should have said that the above only applies if you are trying to construct a stand-alone concurrent statement. If this is a line in a process then you need to use an "if" clause, i.e:
process (clk)
begin
if rising_edge (clk) then
if (cs = '1' and oe = '1' and we = '0' ) then
data <= data_out;
else
data <= (others => 'Z');
end if;
end if;
end process;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I should have said that the above only applies if you are trying to construct a stand-alone concurrent statement --- Quote End --- That's the same with Verilog assign. It doesn't work in an always block.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page