Skip to content
Snippets Groups Projects
Commit 74607158 authored by dam1n19's avatar dam1n19
Browse files

Re-wired System Resets to fix reset test

parent 04638fac
Branches
Tags
1 merge request!1changed imem to rom to allow initial program loading, updated bootloader code...
......@@ -51,7 +51,7 @@ module nanosoc_ss_cpu #(
// System Reset Request Signals
input wire SYS_SYSRESETREQ, // System Request from System Managers
output wire SYS_PRMURESETREQ, // CPU Control Reset Request (PMU and Reset Unit)
output wire CPU_0_PRMURESETREQ, // CPU Control Reset Request (PMU and Reset Unit)
// Generated Clocks and Resets
output wire SYS_PORESETn, // System Power On Reset
......@@ -59,8 +59,8 @@ module nanosoc_ss_cpu #(
output wire SYS_HRESETn, // AHB and System reset
// Power Management Signals
input wire SYS_PMUENABLE, // Power Management Enable
output wire SYS_PMUDBGRESETREQ, // Power Management Debug Reset Req
input wire CPU_0_PMUENABLE, // Power Management Enable
output wire CPU_0_PMUDBGRESETREQ, // Power Management Debug Reset Req
// CPU 0 AHB Lite port
output wire [31:0] CPU_0_HADDR, // Address bus
......@@ -163,7 +163,7 @@ module nanosoc_ss_cpu #(
// System Reset Request Signals
.SYS_SYSRESETREQ(SYS_SYSRESETREQ),
.SYS_PRMURESETREQ(SYS_PRMURESETREQ),
.CORE_PRMURESETREQ(CPU_0_PRMURESETREQ),
// Generated Clocks and Resets
.SYS_PORESETn(SYS_PORESETn),
......@@ -171,8 +171,8 @@ module nanosoc_ss_cpu #(
.SYS_HRESETn(SYS_HRESETn),
// Power Management Signals
.SYS_PMUENABLE(SYS_PMUENABLE),
.SYS_PMUDBGRESETREQ(SYS_PMUDBGRESETREQ),
.CORE_PMUENABLE(CPU_0_PMUENABLE),
.CORE_PMUDBGRESETREQ(CPU_0_PMUDBGRESETREQ),
// AHB Lite port
.HADDR(CPU_0_HADDR),
......
......@@ -101,20 +101,20 @@ module nanosoc_ss_systemctrl #(
// CPU power/reset control
output wire SYS_REMAP_CTRL, // REMAP control bit
output wire SYS_WDOGRESETREQ, // Watchdog reset request
output wire SYS_LOCKUPRESET, // System Controller cfg - reset if lockup
output wire SYS_LOCKUPRESET, // System Controller Config - Reset if lockup
// System Reset Request Signals
input wire SYS_SYSRESETREQ, // System Request from System Managers
input wire SYS_PRMURESETREQ, // CPU Control Reset Request (PMU and Reset Unit)
input wire CPU_SYSRESETREQ, // System Request from CPUs
input wire CPU_PRMURESETREQ, // CPU Control Reset Request (PMU and Reset Unit)
// Power Management Control and Status
output wire SYS_PMUENABLE, // System Controller cfg - Enable PMU
input wire SYS_PMUDBGRESETREQ, // Power Management Debug Reset Req
// CPU Status Signals
input wire CPU_0_LOCKUP, // Processor status - Locked up
input wire CPU_0_SLEEPING,
input wire CPU_0_SLEEPDEEP,
input wire CPU_LOCKUP, // Processor status - Locked up
input wire CPU_SLEEPING,
input wire CPU_SLEEPDEEP,
// GPIO
input wire [15:0] P0_IN, // GPIO 0 inputs
......@@ -156,11 +156,11 @@ module nanosoc_ss_systemctrl #(
.NRST (SYS_SYSRESETn),
.APBACTIVE (apbactive),
.SLEEPING (CPU_0_SLEEPING),
.SLEEPDEEP (CPU_0_SLEEPDEEP),
.LOCKUP (CPU_0_LOCKUP),
.SLEEPING (CPU_SLEEPING),
.SLEEPDEEP (CPU_SLEEPDEEP),
.LOCKUP (CPU_LOCKUP),
.LOCKUPRESET (SYS_LOCKUPRESET),
.SYSRESETREQ (SYS_PRMURESETREQ),
.SYSRESETREQ (CPU_PRMURESETREQ),
.DBGRESETREQ (SYS_PMUDBGRESETREQ),
.CGBYPASS (SYS_TESTMODE),
.RSTBYPASS (SYS_TESTMODE),
......@@ -296,9 +296,9 @@ module nanosoc_ss_systemctrl #(
// CPU power/reset control
.REMAP_CTRL(SYS_REMAP_CTRL),
.APBACTIVE(apbactive),
.SYSRESETREQ(SYS_SYSRESETREQ),
.SYSRESETREQ(CPU_SYSRESETREQ),
.WDOGRESETREQ(SYS_WDOGRESETREQ),
.LOCKUP(CPU_0_LOCKUP),
.LOCKUP(CPU_LOCKUP),
.LOCKUPRESET(SYS_LOCKUPRESET),
.PMUENABLE(SYS_PMUENABLE),
......
......@@ -157,6 +157,12 @@ module nanosoc_system #(
wire [15:0] SYS_GPIO1_IRQ; // GPIO 0 IRQs
wire SYS_NMI; // watchdog_interrupt;
// Combined CPU Signals
wire CPU_SYSRESETREQ; // System Request from CPUs
wire CPU_PRMURESETREQ; // System Request from CPUs
wire CPU_LOCKUP; // Combined Lockup from CPUs
wire CPU_SLEEPDEEP; // Combined Sleepdeep from CPUs
wire CPU_SLEEPING; // Combined sleeping from CPUs
//--------------------------
// CPU Subsystem
......@@ -230,6 +236,9 @@ module nanosoc_system #(
wire CPU_0_RXEV; // Receive Event input
wire CPU_0_LOCKUP; // Wake up request from WIC
wire CPU_0_SYSRESETREQ; // System reset request
wire CPU_0_PRMURESETREQ; // PRMU reset request
wire CPU_0_PMUENABLE; // PRMU Enable
wire CPU_0_PMUDBGRESETREQ; // Power Management Debug Reset Req
wire CPU_0_SLEEPING; // Processor status - sleeping
wire CPU_0_SLEEPDEEP; // Processor status - deep sleep
......@@ -238,6 +247,10 @@ module nanosoc_system #(
//--------------------------
assign CPU_0_NMI = SYS_NMI;
// PRMU Wiring
//--------------------------
assign CPU_0_PMUENABLE = SYS_PMUENABLE;
// Instantiate Subsystem
//--------------------------
......@@ -270,7 +283,7 @@ module nanosoc_system #(
// System Reset Request Signals
.SYS_SYSRESETREQ(SYS_SYSRESETREQ),
.SYS_PRMURESETREQ(SYS_PRMURESETREQ),
.CPU_0_PRMURESETREQ(CPU_0_PRMURESETREQ),
// Generated Clocks and Resets
.SYS_PORESETn(SYS_PORESETn),
......@@ -278,8 +291,8 @@ module nanosoc_system #(
.SYS_HRESETn(SYS_HRESETn),
// Power Management Signals
.SYS_PMUENABLE(SYS_PMUENABLE),
.SYS_PMUDBGRESETREQ(SYS_PMUDBGRESETREQ),
.CPU_0_PMUENABLE(CPU_0_PMUENABLE),
.CPU_0_PMUDBGRESETREQ(CPU_0_PMUDBGRESETREQ),
// CPU 0 AHB Lite port
.CPU_0_HADDR(CPU_0_HADDR),
......@@ -804,13 +817,25 @@ module nanosoc_system #(
assign SYS_REMAP_CTRL [3:0] = { 3'b000, !SYSIO_REMAP_CTRL};
// Combined CPU Wiring
//--------------------------
assign CPU_SYSRESETREQ = CPU_0_SYSRESETREQ;
assign CPU_LOCKUP = CPU_0_LOCKUP;
assign CPU_PRMURESETREQ = CPU_0_PRMURESETREQ;
assign CPU_SLEEPING = CPU_0_SLEEPING;
assign CPU_SLEEPDEEP = CPU_0_SLEEPDEEP;
// Reset Request Wiring
//--------------------------
assign SYS_SYSRESETREQ = CPU_0_SYSRESETREQ
assign SYS_PMUDBGRESETREQ = CPU_0_PMUDBGRESETREQ;
assign SYS_SYSRESETREQ = CPU_SYSRESETREQ
| DEBUG_RESETREQ
| SYS_WDOGRESETREQ
| (SYS_LOCKUPRESET & CPU_0_LOCKUP);
| (SYS_LOCKUPRESET & CPU_LOCKUP);
// Instantiate Subsystem
//--------------------------
......@@ -908,17 +933,17 @@ module nanosoc_system #(
.SYS_LOCKUPRESET(SYS_LOCKUPRESET),
// System Reset Request Signals
.SYS_SYSRESETREQ(SYS_SYSRESETREQ),
.SYS_PRMURESETREQ(SYS_PRMURESETREQ),
.CPU_SYSRESETREQ(CPU_SYSRESETREQ),
.CPU_PRMURESETREQ(CPU_PRMURESETREQ),
// Power Management Control and Status
.SYS_PMUENABLE(SYS_PMUENABLE),
.SYS_PMUDBGRESETREQ(SYS_PMUDBGRESETREQ),
// CPU Status Signals
.CPU_0_LOCKUP(CPU_0_LOCKUP),
.CPU_0_SLEEPING(CPU_0_SLEEPING),
.CPU_0_SLEEPDEEP(CPU_0_SLEEPDEEP),
.CPU_LOCKUP(CPU_LOCKUP),
.CPU_SLEEPING(CPU_SLEEPING),
.CPU_SLEEPDEEP(CPU_SLEEPDEEP),
// GPIO
.P0_IN(P0_IN),
......
Subproject commit b2ba5b3f83e33c05c1107b3e1fa40f7f6af1e589
Subproject commit 2e3cb7902130b7bd3979f6cfdb97aa04d0a610a3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment