Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

Simulating Bidirectional IO

Altera_Forum
Honored Contributor II
1,018 Views

Consider this simple function whereby a bidirectional I/O bus is forced to a value of d255 or a hi-z state depending on the state of a select line; 

 

module bidir_io 

input select, 

inout [7:0] io_bus 

); 

assign io_bus = (select? 8'd255 : 8'bz);  

endmodule 

 

When simulated in Quartus I get the result shown in the attachment. Two versions of io_bus appear, one gets labeled "result" and properly shows the value of d255 when select is asserted. The other remains in the hi-z state all the time. This is OK, except the "result" bus gets expanded into its 8 constituent bits and gobbles up space in the window. Also, if there are other signals in the design, "result" always ends up as the last waveform in the display, not a convenient spot. Any way to get "result" to converge to a single, 8 bit bus? Am I being picky?
0 Kudos
0 Replies
Reply