summaryrefslogtreecommitdiff
path: root/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'rtl')
-rw-r--r--rtl/core/mul.sv6
-rw-r--r--rtl/top/conspiracion.sv9
2 files changed, 11 insertions, 4 deletions
diff --git a/rtl/core/mul.sv b/rtl/core/mul.sv
index a05aff7..7c30d0c 100644
--- a/rtl/core/mul.sv
+++ b/rtl/core/mul.sv
@@ -22,7 +22,7 @@ module core_mul
ready // 1 cuando la multiplicación está lista
);
- logic wait_state;
+ logic[1:0] wait_state;
dword c, q;
assign ready = !start && wait_state == {$bits(wait_state){1'b0}};
@@ -34,7 +34,7 @@ module core_mul
dsp_mul it
(
.clock0(clk),
- .aclr0(rst_n),
+ .aclr0(0), //TODO: parece ser active-high, así que no puede ir a rst_n
.ena0(start || !ready),
.dataa_0(a),
.datab_0(b),
@@ -58,6 +58,6 @@ module core_mul
else if(wait_state > {$bits(wait_state){1'b0}})
wait_state <= wait_state - 1;
else if(start)
- wait_state <= 1;
+ wait_state <= {$bits(wait_state){1'b1}};
endmodule
diff --git a/rtl/top/conspiracion.sv b/rtl/top/conspiracion.sv
index c9e940f..4d09af8 100644
--- a/rtl/top/conspiracion.sv
+++ b/rtl/top/conspiracion.sv
@@ -3,9 +3,12 @@ module conspiracion
input wire clk_clk,
input wire rst_n,
input wire halt,
+`ifdef VERILATOR
input wire step,
- output wire cpu_halted,
output wire breakpoint,
+`endif
+ output wire cpu_halted,
+
output wire [12:0] memory_mem_a,
output wire [2:0] memory_mem_ba,
output wire memory_mem_ck,
@@ -92,6 +95,10 @@ module conspiracion
.bus_ready(ready),
.bus_write(write),
.bus_start(start),
+`ifndef VERILATOR
+ .step(0),
+ .breakpoint(),
+`endif
.*
);