summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--rtl/gfx/gfx_pipes.sv9
2 files changed, 4 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 01e4c15..f8574ec 100644
--- a/Makefile
+++ b/Makefile
@@ -203,5 +203,6 @@ $(OBJ_DIR)/%.mk: \
--Mdir $(dir $@) --top $(word 1,$(subst /, ,$*)) -FI $(ROOT)/$(TB_DIR)/verilator.hpp \
$(filter %.sv %.cpp,$(patsubst tb/%,../tb/%,$^)) \
$(if $(filter $(TOP),$(word 1,$(subst /, ,$*))),, \
- --vpi --public-flat-rw -LDFLAGS "$(COCOTB_LDFLAGS) $(LIBPYTHON)" \
+ --vpi --public-flat-rw --unroll-count 128 \
+ -LDFLAGS "$(COCOTB_LDFLAGS) $(LIBPYTHON)" \
$(shell $(COCOTB_CONFIG) --share)/lib/verilator/verilator.cpp)
diff --git a/rtl/gfx/gfx_pipes.sv b/rtl/gfx/gfx_pipes.sv
index 390a481..09b1d43 100644
--- a/rtl/gfx/gfx_pipes.sv
+++ b/rtl/gfx/gfx_pipes.sv
@@ -17,13 +17,8 @@ module gfx_pipes
if (!stall) begin
pipes[0] <= in;
- /* Esto tiene que ir así porque Verilator no soporta <= en for
- * loops a las que no logre hacerle unrolling. Nótese que el
- * orden de iteración descendiente es necesario porque estamos
- * usando un blocking assignment dentro de always_ff.
- */
- for (integer i = DEPTH - 1; i > 0; --i)
- pipes[i] = pipes[i - 1];
+ for (integer i = 1; i < DEPTH; ++i)
+ pipes[i] <= pipes[i - 1];
end
endmodule