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

Subversion Repositories 8051

[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_decoder.v] - Diff between revs 117 and 118

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

Rev 117 Rev 118
Line 43... Line 43...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.15  2003/04/09 15:49:42  simont
 
// Register oc8051_sfr dato output, add signal wait_data.
 
//
// Revision 1.14  2003/01/13 14:14:40  simont
// Revision 1.14  2003/01/13 14:14:40  simont
// replace some modules
// replace some modules
//
//
// Revision 1.13  2002/10/23 16:53:39  simont
// Revision 1.13  2002/10/23 16:53:39  simont
// fix bugs in instruction interface
// fix bugs in instruction interface
Line 100... Line 103...
 
 
input clk, rst, eq, mem_wait, wait_data;
input clk, rst, eq, mem_wait, wait_data;
input [7:0] op_in;
input [7:0] op_in;
 
 
output wr_o, bit_addr, pc_wr, rmw, istb, src_sel3;
output wr_o, bit_addr, pc_wr, rmw, istb, src_sel3;
output [1:0] psw_set, cy_sel, comp_sel;
output [1:0] psw_set, cy_sel, wr_sfr_o, comp_sel;
output [2:0] mem_act, src_sel1, src_sel2, ram_rd_sel_o, ram_wr_sel_o, pc_sel, wr_sfr_o, op1_c;
output [2:0] mem_act, src_sel1, src_sel2, ram_rd_sel_o, ram_wr_sel_o, pc_sel, op1_c;
output [3:0] alu_op_o;
output [3:0] alu_op_o;
output rd;
output rd;
 
 
reg rmw;
reg rmw;
reg src_sel3, wr,  bit_addr, pc_wr;
reg src_sel3, wr,  bit_addr, pc_wr;
reg [1:0] comp_sel, psw_set, cy_sel;
reg [1:0] comp_sel, psw_set, cy_sel, wr_sfr;
reg [3:0] alu_op;
reg [3:0] alu_op;
reg [2:0] src_sel2, mem_act, src_sel1, ram_wr_sel, ram_rd_sel, pc_sel, wr_sfr;
reg [2:0] src_sel2, mem_act, src_sel1, ram_wr_sel, ram_rd_sel, pc_sel;
 
 
//
//
// state        if 2'b00 then normal execution, sle instructin that need more than one clock
// state        if 2'b00 then normal execution, sle instructin that need more than one clock
// op           instruction buffer
// op           instruction buffer
reg  [1:0] state;
reg  [1:0] state;
Line 1623... Line 1626...
          cy_sel <= #1 `OC8051_CY_0;
          cy_sel <= #1 `OC8051_CY_0;
          src_sel3 <= #1 `OC8051_AS3_DC;
          src_sel3 <= #1 `OC8051_AS3_DC;
          wr_sfr <= #1 `OC8051_WRS_N;
          wr_sfr <= #1 `OC8051_WRS_N;
        end
        end
      `OC8051_DIV : begin
      `OC8051_DIV : begin
          ram_wr_sel <= #1 `OC8051_RWS_DC;
          ram_wr_sel <= #1 `OC8051_RWS_B;
          src_sel1 <= #1 `OC8051_AS1_ACC;
          src_sel1 <= #1 `OC8051_AS1_ACC;
          src_sel2 <= #1 `OC8051_AS2_RAM;
          src_sel2 <= #1 `OC8051_AS2_RAM;
          alu_op <= #1 `OC8051_ALU_DIV;
          alu_op <= #1 `OC8051_ALU_DIV;
          wr <= #1 1'b0;
          wr <= #1 1'b1;
          psw_set <= #1 `OC8051_PS_OV;
          psw_set <= #1 `OC8051_PS_OV;
          cy_sel <= #1 `OC8051_CY_0;
          cy_sel <= #1 `OC8051_CY_0;
          src_sel3 <= #1 `OC8051_AS3_DC;
          src_sel3 <= #1 `OC8051_AS3_DC;
          wr_sfr <= #1 `OC8051_WRS_BA;
          wr_sfr <= #1 `OC8051_WRS_ACC2;
        end
        end
      `OC8051_MUL : begin
      `OC8051_MUL : begin
          ram_wr_sel <= #1 `OC8051_RWS_DC;
          ram_wr_sel <= #1 `OC8051_RWS_B;
          src_sel1 <= #1 `OC8051_AS1_ACC;
          src_sel1 <= #1 `OC8051_AS1_ACC;
          src_sel2 <= #1 `OC8051_AS2_RAM;
          src_sel2 <= #1 `OC8051_AS2_RAM;
          alu_op <= #1 `OC8051_ALU_MUL;
          alu_op <= #1 `OC8051_ALU_MUL;
          wr <= #1 1'b0;
          wr <= #1 1'b1;
          psw_set <= #1 `OC8051_PS_OV;
          psw_set <= #1 `OC8051_PS_OV;
          cy_sel <= #1 `OC8051_CY_0;
          cy_sel <= #1 `OC8051_CY_0;
          src_sel3 <= #1 `OC8051_AS3_DC;
          src_sel3 <= #1 `OC8051_AS3_DC;
          wr_sfr <= #1 `OC8051_WRS_BA;
          wr_sfr <= #1 `OC8051_WRS_ACC2;
        end
        end
      default begin
      default begin
          ram_wr_sel <= #1 `OC8051_RWS_DC;
          ram_wr_sel <= #1 `OC8051_RWS_DC;
          src_sel1 <= #1 `OC8051_AS1_DC;
          src_sel1 <= #1 `OC8051_AS1_DC;
          src_sel2 <= #1 `OC8051_AS2_DC;
          src_sel2 <= #1 `OC8051_AS2_DC;

powered by: WebSVN 2.1.0

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