- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking for a Verilog equivalent of a tr-state device (chip-select) on the output pin of my FPGA. I only want to drive a multi-drop bus when selected and go high-impedance when not. What is the easiest way to accomplish this?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An output is tri-stated by assigning the logic state 'Z'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
out_pin : out std_logic; -- is the pin of the fgpa (shall be put in the entity)
signal out_signal, ena : std_logic; -- are internal signal with ena select out_pin <= out_signal when 1, 'Z' when others; In this case ena is active low and is the equivalent of your output enable, when active outpin takes the signal that you want to put out on the pin, whereas when 0 it put it in tri-state.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I am looking for a Verilog equivalent of a tr-state device (chip-select) on the output pin of my FPGA. I only want to drive a multi-drop bus when selected and go high-impedance when not. What is the easiest way to accomplish this? --- Quote End --- Hi, you can do it in this way: module tri_state_test ( in, ena, out); input in; input ena; output out; assign out = (ena) ? in : 1'bz; endmodule Kind regards GPK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the response!
I also found the primitive buffif0. Looks like there are few possibilities.
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