0

When I try to simulate a module using Quartus prime's Simulation Waveform editor, the output of the module stays in the unknown state or don't care state ('X'). The module is the only one in the project along with the .vwf file.

Here is the module:

module pc (input clk, reset_n, branch, increment, input [7:0] newpc,
            output reg [7:0] pc);


parameter RESET_LOCATION = 8'h00;

    initial pc = 8'h00;

    always @(posedge clk or posedge reset_n) begin

        if (reset_n) begin

            pc <= RESET_LOCATION;

        end else begin

            if (increment) begin
                pc <= pc + 1;
            end else if (branch) begin 
                pc <= newpc;
            end 

        end

    end

endmodule

And here is the simulation:

enter image description here

1
  • @toolic you're right it's supposed to be active low. Commented Mar 25, 2019 at 18:36

1 Answer 1

0

I found the solution...

I am not sure why, but I need to create a new .vwf whenever I change the top level entity.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.