亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? oc8051_decoder.v

?? 8051 IP核VERILOG代碼
?? V
?? 第 1 頁 / 共 5 頁
字號:
//////////////////////////////////////////////////////////////////////
////                                                              ////
////  8051 core decoder                                           ////
////                                                              ////
////  This file is part of the 8051 cores project                 ////
////  http://www.opencores.org/cores/8051/                        ////
////                                                              ////
////  Description                                                 ////
////   Main 8051 core module. decodes instruction and creates     ////
////   control sigals.                                            ////
////                                                              ////
////  To Do:                                                      ////
////   nothing                                                    ////
////                                                              ////
////  Author(s):                                                  ////
////      - Simon Teran, simont@opencores.org                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
////                                                              ////
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
////                                                              ////
//// This source file may be used and distributed without         ////
//// restriction provided that this copyright statement is not    ////
//// removed from the file and that any derivative work contains  ////
//// the original copyright notice and the associated disclaimer. ////
////                                                              ////
//// This source file is free software; you can redistribute it   ////
//// and/or modify it under the terms of the GNU Lesser General   ////
//// Public License as published by the Free Software Foundation; ////
//// either version 2.1 of the License, or (at your option) any   ////
//// later version.                                               ////
////                                                              ////
//// This source is distributed in the hope that it will be       ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
//// PURPOSE.  See the GNU Lesser General Public License for more ////
//// details.                                                     ////
////                                                              ////
//// You should have received a copy of the GNU Lesser General    ////
//// Public License along with this source; if not, download it   ////
//// from http://www.opencores.org/lgpl.shtml                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
//
// ver: 1
//

// synopsys translate_off
`include "oc8051_timescale.v"
// synopsys translate_on

`include "oc8051_defines.v"



module oc8051_decoder (clk, rst, op_in, ram_rd_sel, ram_wr_sel, bit_addr, wr, src_sel1, src_sel2, src_sel3, alu_op, psw_set, cy_sel, imm_sel, pc_wr, pc_sel,
                comp_sel, eq, rom_addr_sel, ext_addr_sel, wad2, rd, write_x, reti);

// clk          clock
// rst          reset
// op_in        operation code
// ram_rd_sel   select, whitch address will be send to ram for read
// ram_wr_sel   select, whitch address will be send to ram for write
// wr           write - if 1 then we will write to ram
// src_sel1     select alu source 1
// src_sel2     select alu source 2
// src_sel3     select alu source 3
// alu_op       alu operation
// psw_set      will we remember cy, ac, ov from alu
// cy_sel       carry in alu select
// comp_sel     compare source select
// eq   compare result
// bit_addr     if instruction is bit addresable
// wad2         wrihe acc from destination 2
// imm_sel      immediate select
// pc_wr        pc write
// pc_sel       pc select
// rom_addr_sel rom address select (alu destination or pc)
// ext_addr_sel external address select (dptr or Ri)
// rd           read from rom
// write_x      write to external rom
// reti         return from interrupt


input clk, rst, eq;
input [7:0] op_in;

output wr, reti, write_x, bit_addr, src_sel3, rom_addr_sel, ext_addr_sel, pc_wr, wad2;
output [1:0] ram_rd_sel, src_sel1, src_sel2, psw_set, imm_sel, cy_sel, pc_sel;
output [2:0] ram_wr_sel, comp_sel;
output [3:0] alu_op;
output rd;

reg reti, write_x;
reg wr,  bit_addr, src_sel3, rom_addr_sel, ext_addr_sel, pc_wr, wad2;
reg [1:0] psw_set, ram_rd_sel, src_sel1, src_sel2, imm_sel, pc_sel, cy_sel;
reg [3:0] alu_op;
reg [2:0] comp_sel, ram_wr_sel;

//
// state        if 2'b00 then normal execution, sle instructin that need more than one clock
// op           instruction buffer
reg [1:0] state;
reg [7:0] op;

//
// if state = 2'b00 then read nex instruction
assign rd = !state[0] & !state[1];

//
// main block
// case of instruction set control signals
always @(rst or op_in or eq or state or op)
begin
  if (rst) begin
    ram_rd_sel = `OC8051_RRS_DC;
    ram_wr_sel = `OC8051_RWS_DC;
    src_sel1 = `OC8051_ASS_DC;
    src_sel2 = `OC8051_ASS_DC;
    alu_op = `OC8051_ALU_NOP;
    imm_sel = `OC8051_IDS_DC;
    wr = 1'b0;
    psw_set = `OC8051_PS_NOT;
    cy_sel = `OC8051_CY_0;
    pc_wr = `OC8051_PCW_N;
    pc_sel = `OC8051_PIS_DC;
    comp_sel = `OC8051_CSS_DC;
    bit_addr = 1'b0;
    src_sel3 = `OC8051_AS3_DC;
    rom_addr_sel = `OC8051_RAS_PC;
    ext_addr_sel = `OC8051_EAS_DC;
    wad2 = `OC8051_WAD_N;
  end else begin
    case (state)
      2'b01: begin
    casex (op)
      `OC8051_ACALL :begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_SP;
          src_sel1 = `OC8051_ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `OC8051_ALU_NOP;
          imm_sel = `OC8051_IDS_PCH;
          wr = 1'b1;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = `OC8051_PCW_N;
          pc_sel = `OC8051_PIS_DC;
          comp_sel = `OC8051_CSS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DC;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_AJMP : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = 2'bxx;
          alu_op = `OC8051_ALU_NOP;
          imm_sel = `OC8051_IDS_DC;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = `OC8051_PCW_N;
          pc_sel = `OC8051_PIS_DC;
          comp_sel = `OC8051_CSS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DC;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_LCALL :begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_SP;
          src_sel1 = `OC8051_ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `OC8051_ALU_NOP;
          imm_sel = `OC8051_IDS_PCH;
          wr = 1'b1;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = `OC8051_PCW_N;
          pc_sel = `OC8051_PIS_DC;
          comp_sel = `OC8051_CSS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DC;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      default begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = `OC8051_PCW_N;
          pc_sel = `OC8051_PIS_DC;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DC;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
      end
    endcase
    end
    2'b10:
    casex (op)
      `OC8051_CJNE_R : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = !eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_CJNE_I : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = !eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_CJNE_D : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = !eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_CJNE_C : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = !eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_DJNZ_R : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_DJNZ_D : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_DES;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_JB : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b0;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_BIT;
          bit_addr = 1'b0;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_JBC : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_D;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;
          wr = 1'b1;
          psw_set = `OC8051_PS_NOT;
          cy_sel = `OC8051_CY_0;
          pc_wr = eq;
          pc_sel = `OC8051_PIS_ALU;
          imm_sel = `OC8051_IDS_DC;
          src_sel3 = `OC8051_AS3_DC;
          comp_sel = `OC8051_CSS_BIT;
          bit_addr = 1'b1;
          wad2 = `OC8051_WAD_N;
          rom_addr_sel = `OC8051_RAS_PC;
          ext_addr_sel = `OC8051_EAS_DC;
        end
      `OC8051_JC : begin
          ram_rd_sel = `OC8051_RRS_DC;
          ram_wr_sel = `OC8051_RWS_DC;
          src_sel1 = `OC8051_ASS_DC;
          src_sel2 = `OC8051_ASS_DC;
          alu_op = `OC8051_ALU_NOP;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产综合| 日本网站在线观看一区二区三区 | 久久99精品久久久久久动态图| 精品一区二区影视| 在线精品国精品国产尤物884a| 欧美高清视频不卡网| 国产精品美女久久久久久久网站| 亚洲国产一二三| 成人av资源网站| 日韩精品一区二区三区视频播放 | 欧美在线视频你懂得| 久久久久亚洲综合| 日韩黄色免费电影| 91久久久免费一区二区| 国产精品久久网站| 国产精品白丝jk白祙喷水网站| 欧美日韩一二区| 亚洲一区二区综合| 99国产精品久久久久久久久久 | 欧美国产乱子伦| 麻豆精品一区二区综合av| 欧美日韩国产大片| 亚洲欧美韩国综合色| 99久久精品国产网站| 国产精品美女久久久久久久久| 国产在线视频一区二区| 日韩一区二区三区在线| 亚洲一区二区在线播放相泽| 99久久精品国产网站| 国产精品久久久久久久久果冻传媒| 国产剧情一区二区| 久久久久久久久久看片| 欧美自拍偷拍一区| 亚洲已满18点击进入久久| 色综合天天综合网天天狠天天| 中国av一区二区三区| 国产精品影音先锋| 亚洲国产高清不卡| 成人一道本在线| 亚洲欧洲美洲综合色网| 色综合天天综合狠狠| 亚洲精品久久嫩草网站秘色| 欧美伊人久久大香线蕉综合69| 亚洲午夜精品网| 91精品国产福利| 精品一区二区三区在线观看| 欧美电视剧在线看免费| 国产一区二区视频在线播放| 国产日韩v精品一区二区| 国产成人在线视频网址| 自拍偷拍国产精品| 欧美日韩一区二区三区在线看| 性感美女极品91精品| 在线成人高清不卡| 精品一区二区三区的国产在线播放| 日韩美女一区二区三区四区| 91精品国产91久久久久久最新毛片 | 欧美精品123区| 青青草国产成人99久久| 久久久久亚洲蜜桃| 91婷婷韩国欧美一区二区| 亚洲福利电影网| 精品国产91九色蝌蚪| 波多野洁衣一区| 天天爽夜夜爽夜夜爽精品视频| 欧美成人video| 99久久精品99国产精品| 午夜欧美一区二区三区在线播放 | 日本二三区不卡| 亚洲成人免费视频| 久久精品欧美日韩精品| 欧美日韩在线免费视频| 国产一区二区三区在线观看免费| 综合亚洲深深色噜噜狠狠网站| 欧美肥妇bbw| 99久久99久久精品免费看蜜桃| 午夜精品视频一区| 中文字幕一区二区三区av| 欧美肥胖老妇做爰| av在线一区二区三区| 日韩成人一级大片| 亚洲特黄一级片| www日韩大片| 欧美日韩小视频| 91在线视频在线| 国产精品亚洲成人| 日韩电影在线观看电影| 玉米视频成人免费看| 国产欧美一区二区精品久导航| 日本韩国欧美三级| 国产91对白在线观看九色| 日本 国产 欧美色综合| 亚洲自拍与偷拍| 国产精品国产三级国产| 欧美成人一区二区| 欧美二区在线观看| 欧洲一区二区av| 99re成人在线| 成人短视频下载| 国产成人一级电影| 久久超级碰视频| 日本伊人午夜精品| 婷婷一区二区三区| 一个色妞综合视频在线观看| 国产精品久久影院| 亚洲国产精品成人综合色在线婷婷| 日韩精品一区二区在线| 91精品国产欧美日韩| 欧美日本在线看| 欧美在线短视频| 色综合久久综合中文综合网| 99久久综合狠狠综合久久| 国产a视频精品免费观看| 国产精品一二一区| 国产在线麻豆精品观看| 精品中文字幕一区二区| 免费观看在线色综合| 91一区一区三区| 成人精品视频一区| 99久久伊人久久99| 91色在线porny| 在线亚洲高清视频| 欧美熟乱第一页| 欧美精品久久99| 日韩欧美精品在线| 久久久久久99久久久精品网站| 国产欧美一区二区三区网站| 国产精品久久影院| 一区二区三区四区中文字幕| 亚洲成av人综合在线观看| 视频一区国产视频| 精品在线亚洲视频| 国产精品99久久久久久久女警| 丁香一区二区三区| 色综合天天性综合| 在线播放日韩导航| 久久亚洲欧美国产精品乐播| 亚洲国产精品精华液2区45| 综合在线观看色| 视频一区在线播放| 国产精品亚洲成人| 色噜噜久久综合| 6080亚洲精品一区二区| 久久综合999| 亚洲久草在线视频| 免费成人在线网站| 成人午夜视频在线观看| 欧美在线免费观看亚洲| 精品少妇一区二区三区在线播放 | 国产另类ts人妖一区二区| 不卡av在线网| 5858s免费视频成人| 日韩中文字幕区一区有砖一区 | 欧美另类久久久品| 久久精品一区四区| 亚洲一二三区在线观看| 国产在线精品国自产拍免费| 91麻豆高清视频| 精品国一区二区三区| 中文字幕佐山爱一区二区免费| 青青草97国产精品免费观看| 粉嫩一区二区三区性色av| 欧美久久久久中文字幕| 中文字幕不卡的av| 日本系列欧美系列| 一本色道亚洲精品aⅴ| 精品美女一区二区三区| 亚洲一区二区三区中文字幕| 国产麻豆午夜三级精品| 欧美日韩黄色一区二区| 国产精品蜜臀av| 精品亚洲porn| 欧美二区三区的天堂| 亚洲品质自拍视频网站| 国产乱子伦视频一区二区三区| 欧美日韩精品三区| 亚洲男同性视频| 成人免费视频视频| 久久免费偷拍视频| 秋霞午夜av一区二区三区| 欧美午夜一区二区三区免费大片| 欧美国产成人在线| 韩国午夜理伦三级不卡影院| 7777女厕盗摄久久久| 一区二区三区产品免费精品久久75| 成人蜜臀av电影| 日本一区二区三区在线不卡| 久久99精品国产麻豆不卡| 91精品欧美一区二区三区综合在| 成人深夜福利app| 久久丝袜美腿综合| 国产自产2019最新不卡| 日韩欧美成人午夜| 日本不卡视频在线| 538在线一区二区精品国产| 一区二区成人在线| 91久久精品国产91性色tv | 亚洲一区二区三区视频在线播放| 99视频精品免费视频| 日韩理论电影院|