Added Changes to ModelSim from Modules folder (and small fix for ../hexfile path)

This commit is contained in:
TroubleElectrical committed 2026-10-16 12:59:50 +11:00
1 parent 2f652705cc
commit 91a5090528
21 files changed
+389 -1323

No files matched your search

+6 -3
View File
@@ -2,14 +2,17 @@
`define INSTRUCTION_COUNTER_H
module instruction_counter #(parameter width=5)(
input logic [0:0] clk, input logic [0:0] we,
input logic [0:0] clk, input logic [0:0] rst, input logic [0:0] we,
input logic [2**width-1:0] W,
output logic [2**width-1:0] addr
);
logic [2**width-1:0] pc;
always_ff @(posedge clk) begin
if (we) begin
always_ff @(posedge clk or posedge rst) begin
if (rst) begin
pc <= {(2**width){1'b0}};
end else if (we) begin
pc <= W;
end else begin
pc <= pc + 4;