picorv32: add reset signal
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 7 Aug 2018 06:59:34 +0000 (08:59 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 7 Aug 2018 06:59:34 +0000 (08:59 +0200)
litex/soc/cores/cpu/picorv32/core.py

index ace7ee93ae14f44d3c866a8ec6092e970eece7bb..fb271209e36cab54085c9661e426640bc10e2259 100644 (file)
@@ -7,6 +7,7 @@ from litex.soc.interconnect import wishbone
 
 class PicoRV32(Module):
     def __init__(self, platform, progaddr_reset, variant):
+        self.reset = Signal()
         self.ibus = i = wishbone.Interface()
         self.dbus = d = wishbone.Interface()
         self.interrupt = Signal(32)
@@ -50,7 +51,7 @@ class PicoRV32(Module):
 
             # clock / reset
             i_clk=ClockSignal(),
-            i_resetn=~ResetSignal(),
+            i_resetn=~(ResetSignal() | self.reset),
 
             # trap
             o_trap=self.trap,