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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [bench/] [verilog/] [tb_openMSP430.v] - Diff between revs 103 and 106

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

Rev 103 Rev 106
Line 29... Line 29...
//
//
// *Author(s):
// *Author(s):
//              - Olivier Girard,    olgirard@gmail.com
//              - Olivier Girard,    olgirard@gmail.com
//
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// $Rev: 103 $
// $Rev: 106 $
// $LastChangedBy: olivier.girard $
// $LastChangedBy: olivier.girard $
// $LastChangedDate: 2011-03-05 15:44:48 +0100 (Sat, 05 Mar 2011) $
// $LastChangedDate: 2011-03-25 23:01:03 +0100 (Fri, 25 Mar 2011) $
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
`include "timescale.v"
`include "timescale.v"
`ifdef OMSP_NO_INCLUDE
`ifdef OMSP_NO_INCLUDE
`else
`else
`include "openMSP430_defines.v"
`include "openMSP430_defines.v"
Line 63... Line 63...
 
 
// Peripherals interface
// Peripherals interface
wire         [7:0] per_addr;
wire         [7:0] per_addr;
wire        [15:0] per_din;
wire        [15:0] per_din;
wire        [15:0] per_dout;
wire        [15:0] per_dout;
wire         [1:0] per_wen;
wire         [1:0] per_we;
wire               per_en;
wire               per_en;
 
 
// Digital I/O
// Digital I/O
wire               irq_port1;
wire               irq_port1;
wire               irq_port2;
wire               irq_port2;
Line 130... Line 130...
wire               puc;
wire               puc;
reg                nmi;
reg                nmi;
reg         [13:0] irq;
reg         [13:0] irq;
wire        [13:0] irq_acc;
wire        [13:0] irq_acc;
wire        [13:0] irq_in;
wire        [13:0] irq_in;
 
reg                cpu_en;
 
 
// Debug interface
// Debug interface
 
reg                dbg_en;
wire               dbg_freeze;
wire               dbg_freeze;
wire               dbg_uart_txd;
wire               dbg_uart_txd;
reg                dbg_uart_rxd;
reg                dbg_uart_rxd;
reg         [15:0] dbg_uart_buf;
reg         [15:0] dbg_uart_buf;
 
 
Line 190... Line 192...
  end
  end
 
 
initial
initial
  begin
  begin
     reset_n       = 1'b1;
     reset_n       = 1'b1;
     #100;
     #93;
     reset_n       = 1'b0;
     reset_n       = 1'b0;
     #600;
     #593;
     reset_n       = 1'b1;
     reset_n       = 1'b1;
  end
  end
 
 
initial
initial
  begin
  begin
     error         = 0;
     error         = 0;
     stimulus_done = 1;
     stimulus_done = 1;
     irq           = 14'b0000;
     irq           = 14'b0000;
     nmi           = 1'b0;
     nmi           = 1'b0;
 
     cpu_en        = 1'b1;
 
     dbg_en        = 1'b0;
     dbg_uart_rxd  = 1'b1;
     dbg_uart_rxd  = 1'b1;
     dbg_uart_buf  = 16'h0000;
     dbg_uart_buf  = 16'h0000;
     p1_din        = 8'h00;
     p1_din        = 8'h00;
     p2_din        = 8'h00;
     p2_din        = 8'h00;
     p3_din        = 8'h00;
     p3_din        = 8'h00;
Line 275... Line 279...
    .dmem_wen     (dmem_wen),          // Data Memory write enable (low active)
    .dmem_wen     (dmem_wen),          // Data Memory write enable (low active)
    .irq_acc      (irq_acc),           // Interrupt request accepted (one-hot signal)
    .irq_acc      (irq_acc),           // Interrupt request accepted (one-hot signal)
    .mclk         (mclk),              // Main system clock
    .mclk         (mclk),              // Main system clock
    .per_addr     (per_addr),          // Peripheral address
    .per_addr     (per_addr),          // Peripheral address
    .per_din      (per_din),           // Peripheral data input
    .per_din      (per_din),           // Peripheral data input
    .per_wen      (per_wen),           // Peripheral write enable (high active)
    .per_we       (per_we),            // Peripheral write enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .pmem_addr    (pmem_addr),         // Program Memory address
    .pmem_addr    (pmem_addr),         // Program Memory address
    .pmem_cen     (pmem_cen),          // Program Memory chip enable (low active)
    .pmem_cen     (pmem_cen),          // Program Memory chip enable (low active)
    .pmem_din     (pmem_din),          // Program Memory data input (optional)
    .pmem_din     (pmem_din),          // Program Memory data input (optional)
    .pmem_wen     (pmem_wen),          // Program Memory write enable (low active) (optional)
    .pmem_wen     (pmem_wen),          // Program Memory write enable (low active) (optional)
    .puc          (puc),               // Main system reset
    .puc          (puc),               // Main system reset
    .smclk_en     (smclk_en),          // SMCLK enable
    .smclk_en     (smclk_en),          // SMCLK enable
 
 
// INPUTs
// INPUTs
 
    .cpu_en       (cpu_en),            // Enable CPU code execution
 
    .dbg_en       (dbg_en),            // Debug interface enable
    .dbg_uart_rxd (dbg_uart_rxd),      // Debug interface: UART RXD
    .dbg_uart_rxd (dbg_uart_rxd),      // Debug interface: UART RXD
    .dco_clk      (dco_clk),           // Fast oscillator (fast clock)
    .dco_clk      (dco_clk),           // Fast oscillator (fast clock)
    .dmem_dout    (dmem_dout),         // Data Memory data output
    .dmem_dout    (dmem_dout),         // Data Memory data output
    .irq          (irq_in),            // Maskable interrupts
    .irq          (irq_in),            // Maskable interrupts
    .lfxt_clk     (lfxt_clk),          // Low frequency oscillator (typ 32kHz)
    .lfxt_clk     (lfxt_clk),          // Low frequency oscillator (typ 32kHz)
Line 350... Line 356...
    .p5_din       (p5_din),            // Port 5 data input
    .p5_din       (p5_din),            // Port 5 data input
    .p6_din       (p6_din),            // Port 6 data input
    .p6_din       (p6_din),            // Port 6 data input
    .per_addr     (per_addr),          // Peripheral address
    .per_addr     (per_addr),          // Peripheral address
    .per_din      (per_din),           // Peripheral data input
    .per_din      (per_din),           // Peripheral data input
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_wen      (per_wen),           // Peripheral write enable (high active)
    .per_we       (per_we),            // Peripheral write enable (high active)
    .puc          (puc)                // Main system reset
    .puc          (puc)                // Main system reset
);
);
 
 
//
//
// Timers
// Timers
Line 380... Line 386...
    .irq_ta0_acc  (irq_acc[9]),        // Interrupt request TACCR0 accepted
    .irq_ta0_acc  (irq_acc[9]),        // Interrupt request TACCR0 accepted
    .mclk         (mclk),              // Main system clock
    .mclk         (mclk),              // Main system clock
    .per_addr     (per_addr),          // Peripheral address
    .per_addr     (per_addr),          // Peripheral address
    .per_din      (per_din),           // Peripheral data input
    .per_din      (per_din),           // Peripheral data input
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_wen      (per_wen),           // Peripheral write enable (high active)
    .per_we       (per_we),            // Peripheral write enable (high active)
    .puc          (puc),               // Main system reset
    .puc          (puc),               // Main system reset
    .smclk_en     (smclk_en),          // SMCLK enable (from CPU)
    .smclk_en     (smclk_en),          // SMCLK enable (from CPU)
    .ta_cci0a     (ta_cci0a),          // Timer A compare 0 input A
    .ta_cci0a     (ta_cci0a),          // Timer A compare 0 input A
    .ta_cci0b     (ta_cci0b),          // Timer A compare 0 input B
    .ta_cci0b     (ta_cci0b),          // Timer A compare 0 input B
    .ta_cci1a     (ta_cci1a),          // Timer A compare 1 input A
    .ta_cci1a     (ta_cci1a),          // Timer A compare 1 input A
Line 406... Line 412...
// INPUTs
// INPUTs
    .mclk         (mclk),              // Main system clock
    .mclk         (mclk),              // Main system clock
    .per_addr     (per_addr),          // Peripheral address
    .per_addr     (per_addr),          // Peripheral address
    .per_din      (per_din),           // Peripheral data input
    .per_din      (per_din),           // Peripheral data input
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_wen      (per_wen),           // Peripheral write enable (high active)
    .per_we       (per_we),            // Peripheral write enable (high active)
    .puc          (puc)                // Main system reset
    .puc          (puc)                // Main system reset
);
);
 
 
template_periph_16b template_periph_16b_0 (
template_periph_16b template_periph_16b_0 (
 
 
Line 420... Line 426...
// INPUTs
// INPUTs
    .mclk         (mclk),              // Main system clock
    .mclk         (mclk),              // Main system clock
    .per_addr     (per_addr),          // Peripheral address
    .per_addr     (per_addr),          // Peripheral address
    .per_din      (per_din),           // Peripheral data input
    .per_din      (per_din),           // Peripheral data input
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_en       (per_en),            // Peripheral enable (high active)
    .per_wen      (per_wen),           // Peripheral write enable (high active)
    .per_we       (per_we),            // Peripheral write enable (high active)
    .puc          (puc)                // Main system reset
    .puc          (puc)                // Main system reset
);
);
 
 
 
 
//
//

powered by: WebSVN 2.1.0

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