- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my design, I have a inout port. Then I search it, found most examples, they only put the high impedance for output direction as (case 1):
inout [7:0 ]data_io; reg [7:0] out_a; wire [7:0] in_b; reg rnw; assign data_io = (rnw==1'b0) out_a : 8'bZ; /// when read, assign io as high impedance assign in_b = data_io; But I think we may also put high impedance in both direction like (case 2): inout [7:0 ]data_io; reg [7:0] out_a; wire [7:0] in_b; reg rnw; assign data_io = (rnw==1'b0) out_a : 8'bZ; /// when read, assign io as high impedance assign in_b = (rnw==1'b1) data_io : 8'bZ; /// when write, read high impedance So my question is, will put high impedance in both directions (like case 2) cause problems? My understanding is it won't cause problem. The difference between case 1 and case 2 is, in case 1, the "in_b" will equal the output date during write operation. Thanks.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- In my design, I have a inout port. Then I search it, found most examples, they only put the high impedance for output direction as (case 1): inout [7:0 ]data_io; reg [7:0] out_a; wire [7:0] in_b; reg rnw; assign data_io = (rnw==1'b0) out_a : 8'bZ; /// when read, assign io as high impedance assign in_b = data_io; But I think we may also put high impedance in both direction like (case 2): inout [7:0 ]data_io; reg [7:0] out_a; wire [7:0] in_b; reg rnw; assign data_io = (rnw==1'b0) out_a : 8'bZ; /// when read, assign io as high impedance assign in_b = (rnw==1'b1) data_io : 8'bZ; /// when write, read high impedance So my question is, will put high impedance in both directions (like case 2) cause problems? My understanding is it won't cause problem. The difference between case 1 and case 2 is, in case 1, the "in_b" will equal the output date during write operation. Thanks. --- Quote End --- the idea of two directions is: (1) pin as output, so you drive it, external device is meant to apply z (2) pin as input, external device drives it and you just read it so use z in order not to read your own drive(in contention with external drive) so in short either you drive it or external device but never both. But either can read it anytime. you can if it helps your design apply z to input buffer if available at io 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