Altera_Forum
Honored Contributor
17 years agoProblem with Ports in Verilog and Quartus II
First off, I am a newbie and am probably doing something dumb, but I am getting frustrated that I can't figure out what's wrong. I am using Verilog and Quartus II, ver 8.
I am working on a design and the ports are not reading correctly. I searched the web and found the following design example from Altera and it is doing the same thing. BTW I reduced the bus widths to 3 from 8 in the original. http://www.altera.com/support/examples/verilog/ver_bidirec.html module bidir (oe, clk, inp, outp, bidir); input oe; input clk; input [2:0] inp; output [2:0] outp; inout [2:0] bidir; reg [2:0] a; reg [2:0] b; assign bidir = oe ? a : 3'bZ ; assign outp = b; always @ (posedge clk) begin b <= bidir; a <= inp; end endmodule Everything compiles and seems to simulate correctly, except the outputs are not what I expect.- "bidir" - always high-z
- "bidir results" - looks like what I expect on "bidir"
- "outp" - is high-z for some of the time of simulation