Line 34... |
Line 34... |
//
|
//
|
// *Author(s):
|
// *Author(s):
|
// - Olivier Girard, olgirard@gmail.com
|
// - Olivier Girard, olgirard@gmail.com
|
//
|
//
|
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
// $Rev: 103 $
|
// $Rev$
|
// $LastChangedBy: olivier.girard $
|
// $LastChangedBy$
|
// $LastChangedDate: 2011-03-05 15:44:48 +0100 (Sat, 05 Mar 2011) $
|
// $LastChangedDate$
|
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
`ifdef OMSP_NO_INCLUDE
|
`ifdef OMSP_NO_INCLUDE
|
`else
|
`else
|
`include "openMSP430_defines.v"
|
`include "openMSP430_defines.v"
|
`endif
|
`endif
|
Line 165... |
Line 165... |
`ifdef CLOCK_GATING
|
`ifdef CLOCK_GATING
|
wire mclk_wdtctl;
|
wire mclk_wdtctl;
|
omsp_clock_gate clock_gate_wdtctl (.gclk(mclk_wdtctl),
|
omsp_clock_gate clock_gate_wdtctl (.gclk(mclk_wdtctl),
|
.clk (mclk), .enable(wdtctl_wr), .scan_enable(scan_enable));
|
.clk (mclk), .enable(wdtctl_wr), .scan_enable(scan_enable));
|
`else
|
`else
|
|
wire UNUSED_scan_enable = scan_enable;
|
wire mclk_wdtctl = mclk;
|
wire mclk_wdtctl = mclk;
|
`endif
|
`endif
|
|
|
`ifdef NMI
|
`ifdef NMI
|
parameter [7:0] WDTNMIES_MASK = 8'h40;
|
parameter [7:0] WDTNMIES_MASK = 8'h40;
|
Line 240... |
Line 241... |
.clk_out (wdt_clk),
|
.clk_out (wdt_clk),
|
.clk_in0 (smclk),
|
.clk_in0 (smclk),
|
.clk_in1 (aclk),
|
.clk_in1 (aclk),
|
.reset (puc_rst),
|
.reset (puc_rst),
|
.scan_mode (scan_mode),
|
.scan_mode (scan_mode),
|
.select (wdtctl[2])
|
.select_in (wdtctl[2])
|
);
|
);
|
`else
|
`else
|
`ifdef WATCHDOG_NOMUX_ACLK
|
`ifdef WATCHDOG_NOMUX_ACLK
|
assign wdt_clk = aclk;
|
assign wdt_clk = aclk;
|
|
wire UNUSED_smclk = smclk;
|
`else
|
`else
|
|
wire UNUSED_aclk = aclk;
|
assign wdt_clk = smclk;
|
assign wdt_clk = smclk;
|
`endif
|
`endif
|
`endif
|
`endif
|
|
|
// Reset synchronizer for the watchdog local clock domain
|
// Reset synchronizer for the watchdog local clock domain
|
Line 469... |
Line 472... |
always @ (posedge mclk or posedge por)
|
always @ (posedge mclk or posedge por)
|
if (por) wdt_reset <= 1'b0;
|
if (por) wdt_reset <= 1'b0;
|
else wdt_reset <= wdtpw_error | (wdtifg_set & ~wdttmsel);
|
else wdt_reset <= wdtpw_error | (wdtifg_set & ~wdttmsel);
|
|
|
|
|
|
// LINT cleanup
|
|
wire UNUSED_smclk_en = smclk_en;
|
|
wire UNUSED_aclk_en = aclk_en;
|
|
|
|
|
//=============================================================================
|
//=============================================================================
|
// 6) WATCHDOG TIMER (FPGA IMPLEMENTATION)
|
// 6) WATCHDOG TIMER (FPGA IMPLEMENTATION)
|
//=============================================================================
|
//=============================================================================
|
`else
|
`else
|
Line 543... |
Line 550... |
always @ (posedge mclk or posedge por)
|
always @ (posedge mclk or posedge por)
|
if (por) wdt_reset <= 1'b0;
|
if (por) wdt_reset <= 1'b0;
|
else wdt_reset <= wdtpw_error | (wdtifg_set & ~wdttmsel);
|
else wdt_reset <= wdtpw_error | (wdtifg_set & ~wdttmsel);
|
|
|
|
|
|
// LINT cleanup
|
|
wire UNUSED_scan_mode = scan_mode;
|
|
wire UNUSED_smclk = smclk;
|
|
wire UNUSED_aclk = aclk;
|
`endif
|
`endif
|
|
wire [15:0] UNUSED_per_din = per_din;
|
|
|
endmodule // omsp_watchdog
|
endmodule // omsp_watchdog
|
|
|
`ifdef OMSP_NO_INCLUDE
|
`ifdef OMSP_NO_INCLUDE
|
`else
|
`else
|