R
rekz
Guest
my code is the following:
module PC(in, Clk, out);
input Clk;
input[31:0] in;
output[31:0] out;
reg[31:0] out;
reg[31:0] PC;
initial
PC <= 32'b0000000000000000000000000000000;
always @(posedge Clk) begin
PC <= in;
out <= PC;
end
endmodule
it is just a code for a program counter, I've set the initial value of
the program counter to 0, however when I launch iSim and even before
running the code.. I checked the PC value and it's not 0. Why is this?
module PC(in, Clk, out);
input Clk;
input[31:0] in;
output[31:0] out;
reg[31:0] out;
reg[31:0] PC;
initial
PC <= 32'b0000000000000000000000000000000;
always @(posedge Clk) begin
PC <= in;
out <= PC;
end
endmodule
it is just a code for a program counter, I've set the initial value of
the program counter to 0, however when I launch iSim and even before
running the code.. I checked the PC value and it's not 0. Why is this?