OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [rtl/] [verilog/] [periph/] [omsp_timerA.v] - Diff between revs 117 and 134

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 117 Rev 134
Line 34... Line 34...
//
//
// *Author(s):
// *Author(s):
//              - Olivier Girard,    olgirard@gmail.com
//              - Olivier Girard,    olgirard@gmail.com
//
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// $Rev: 117 $
// $Rev: 134 $
// $LastChangedBy: olivier.girard $
// $LastChangedBy: olivier.girard $
// $LastChangedDate: 2011-06-23 21:30:51 +0200 (Thu, 23 Jun 2011) $
// $LastChangedDate: 2012-03-22 21:31:06 +0100 (Thu, 22 Mar 2012) $
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
`ifdef OMSP_TA_NO_INCLUDE
`ifdef OMSP_TA_NO_INCLUDE
`else
`else
`include "omsp_timerA_defines.v"
`include "omsp_timerA_defines.v"
`endif
`endif
Line 133... Line 133...
                       TACCTL2    = 'h66,
                       TACCTL2    = 'h66,
                       TACCR2     = 'h76,
                       TACCR2     = 'h76,
                       TAIV       = 'h2E;
                       TAIV       = 'h2E;
 
 
// Register one-hot decoder utilities
// Register one-hot decoder utilities
parameter              DEC_SZ     =  2**DEC_WD;
parameter              DEC_SZ     =  (1 << DEC_WD);
parameter [DEC_SZ-1:0] BASE_REG   =  {{DEC_SZ-1{1'b0}}, 1'b1};
parameter [DEC_SZ-1:0] BASE_REG   =  {{DEC_SZ-1{1'b0}}, 1'b1};
 
 
// Register one-hot decoder
// Register one-hot decoder
parameter [DEC_SZ-1:0] TACTL_D    = (BASE_REG << TACTL),
parameter [DEC_SZ-1:0] TACTL_D    = (BASE_REG << TACTL),
                       TAR_D      = (BASE_REG << TAR),
                       TAR_D      = (BASE_REG << TAR),
Line 363... Line 363...
wire taclk_s;
wire taclk_s;
wire inclk_s;
wire inclk_s;
 
 
omsp_sync_cell sync_cell_taclk (
omsp_sync_cell sync_cell_taclk (
    .data_out (taclk_s),
    .data_out (taclk_s),
    .clk      (mclk),
 
    .data_in  (taclk),
    .data_in  (taclk),
 
    .clk       (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
 
 
omsp_sync_cell sync_cell_inclk (
omsp_sync_cell sync_cell_inclk (
    .data_out (inclk_s),
    .data_out (inclk_s),
    .clk      (mclk),
 
    .data_in  (inclk),
    .data_in  (inclk),
 
    .clk       (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
 
 
 
 
// Clock edge detection (TACLK & INCLK)
// Clock edge detection (TACLK & INCLK)
Line 477... Line 477...
wire cci1_s;
wire cci1_s;
wire cci2_s;
wire cci2_s;
 
 
omsp_sync_cell sync_cell_cci0 (
omsp_sync_cell sync_cell_cci0 (
    .data_out (cci0_s),
    .data_out (cci0_s),
    .clk      (mclk),
 
    .data_in  (cci0),
    .data_in  (cci0),
 
    .clk      (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
omsp_sync_cell sync_cell_cci1 (
omsp_sync_cell sync_cell_cci1 (
    .data_out (cci1_s),
    .data_out (cci1_s),
    .clk      (mclk),
 
    .data_in  (cci1),
    .data_in  (cci1),
 
    .clk      (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
omsp_sync_cell sync_cell_cci2 (
omsp_sync_cell sync_cell_cci2 (
    .data_out (cci2_s),
    .data_out (cci2_s),
    .clk      (mclk),
 
    .data_in  (cci2),
    .data_in  (cci2),
 
    .clk      (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
 
 
// Register CCIx for edge detection
// Register CCIx for edge detection
reg cci0_dly;
reg cci0_dly;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.