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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [rtl/] [verilog/] [omsp_execution_unit.v] - Diff between revs 103 and 105

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

Rev 103 Rev 105
Line 29... Line 29...
//
//
// *Author(s):
// *Author(s):
//              - Olivier Girard,    olgirard@gmail.com
//              - Olivier Girard,    olgirard@gmail.com
//
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// $Rev: 103 $
// $Rev: 105 $
// $LastChangedBy: olivier.girard $
// $LastChangedBy: olivier.girard $
// $LastChangedDate: 2011-03-05 15:44:48 +0100 (Sat, 05 Mar 2011) $
// $LastChangedDate: 2011-03-10 22:10:30 +0100 (Thu, 10 Mar 2011) $
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
`ifdef OMSP_NO_INCLUDE
`ifdef OMSP_NO_INCLUDE
`else
`else
`include "openMSP430_defines.v"
`include "openMSP430_defines.v"
`endif
`endif
Line 67... Line 67...
    inst_bw,                       // Decoded Inst: byte width
    inst_bw,                       // Decoded Inst: byte width
    inst_dest,                     // Decoded Inst: destination (one hot)
    inst_dest,                     // Decoded Inst: destination (one hot)
    inst_dext,                     // Decoded Inst: destination extended instruction word
    inst_dext,                     // Decoded Inst: destination extended instruction word
    inst_irq_rst,                  // Decoded Inst: reset interrupt
    inst_irq_rst,                  // Decoded Inst: reset interrupt
    inst_jmp,                      // Decoded Inst: Conditional jump
    inst_jmp,                      // Decoded Inst: Conditional jump
 
    inst_mov,                      // Decoded Inst: mov instruction
    inst_sext,                     // Decoded Inst: source extended instruction word
    inst_sext,                     // Decoded Inst: source extended instruction word
    inst_so,                       // Decoded Inst: Single-operand arithmetic
    inst_so,                       // Decoded Inst: Single-operand arithmetic
    inst_src,                      // Decoded Inst: source (one hot)
    inst_src,                      // Decoded Inst: source (one hot)
    inst_type,                     // Decoded Instruction type
    inst_type,                     // Decoded Instruction type
    mclk,                          // Main system clock
    mclk,                          // Main system clock
Line 107... Line 108...
input               inst_bw;       // Decoded Inst: byte width
input               inst_bw;       // Decoded Inst: byte width
input        [15:0] inst_dest;     // Decoded Inst: destination (one hot)
input        [15:0] inst_dest;     // Decoded Inst: destination (one hot)
input        [15:0] inst_dext;     // Decoded Inst: destination extended instruction word
input        [15:0] inst_dext;     // Decoded Inst: destination extended instruction word
input               inst_irq_rst;  // Decoded Inst: reset interrupt
input               inst_irq_rst;  // Decoded Inst: reset interrupt
input         [7:0] inst_jmp;      // Decoded Inst: Conditional jump
input         [7:0] inst_jmp;      // Decoded Inst: Conditional jump
 
input               inst_mov;      // Decoded Inst: mov instruction
input        [15:0] inst_sext;     // Decoded Inst: source extended instruction word
input        [15:0] inst_sext;     // Decoded Inst: source extended instruction word
input         [7:0] inst_so;       // Decoded Inst: Single-operand arithmetic
input         [7:0] inst_so;       // Decoded Inst: Single-operand arithmetic
input        [15:0] inst_src;      // Decoded Inst: source (one hot)
input        [15:0] inst_src;      // Decoded Inst: source (one hot)
input         [2:0] inst_type;     // Decoded Instruction type
input         [2:0] inst_type;     // Decoded Instruction type
input               mclk;          // Main system clock
input               mclk;          // Main system clock
Line 316... Line 318...
assign      mb_en     = ((e_state==`E_IRQ_1)  & ~inst_irq_rst)      |
assign      mb_en     = ((e_state==`E_IRQ_1)  & ~inst_irq_rst)      |
                        ((e_state==`E_IRQ_3)  & ~inst_irq_rst)      |
                        ((e_state==`E_IRQ_3)  & ~inst_irq_rst)      |
                        ((e_state==`E_SRC_RD) & ~inst_as[`IMM])     |
                        ((e_state==`E_SRC_RD) & ~inst_as[`IMM])     |
                         (e_state==`E_SRC_WR)                       |
                         (e_state==`E_SRC_WR)                       |
                        ((e_state==`E_EXEC)   & inst_so[`RETI])     |
                        ((e_state==`E_EXEC)   & inst_so[`RETI])     |
                         (e_state==`E_DST_RD)                       |
                        ((e_state==`E_DST_RD) & ~inst_type[`INST_SO]
 
                                              & ~inst_mov)            |
                         (e_state==`E_DST_WR);
                         (e_state==`E_DST_WR);
 
 
wire  [1:0] mb_wr_msk =  inst_alu[`EXEC_NO_WR]  ? 2'b00 :
wire  [1:0] mb_wr_msk =  inst_alu[`EXEC_NO_WR]  ? 2'b00 :
                        ~inst_bw                ? 2'b11 :
                        ~inst_bw                ? 2'b11 :
                         alu_out_add[0]         ? 2'b10 : 2'b01;
                         alu_out_add[0]         ? 2'b10 : 2'b01;

powered by: WebSVN 2.1.0

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