top.v 264 B

12345678910111213
  1. `timescale 1ns/1ps
  2. module top (
  3. input clk,
  4. input reset_n,
  5. output [31:0] pc_out
  6. );
  7. reg [31:0] pc;
  8. always @(posedge clk or negedge reset_n) begin
  9. if (!reset_n) pc <= 0;
  10. else pc <= pc + 4;
  11. end
  12. assign pc_out = pc;
  13. endmodule