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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? decoder.v

?? 用verilog寫的很好的cpu core
?? 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
//



module decoder (clk, rst, op_in, ram_rd_sel, ram_wr_sel, wr_bit, 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
// wr_bit       if write 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 ram_rd_sel, ram_wr_sel, src_sel1, src_sel2, psw_set, alu_op, cy_sel, imm_sel, wr, pc_wr, pc_sel, comp_sel, wr_bit;
output src_sel3, rom_addr_sel, ext_addr_sel, wad2, rd, reti, write_x;

reg reti, write_x;
reg [1:0] psw_set, ram_rd_sel, src_sel1, src_sel2, imm_sel, pc_sel, cy_sel;
reg [3:0] alu_op;
reg wr,  wr_bit, src_sel3, rom_addr_sel, ext_addr_sel, pc_wr, wad2;
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)
begin
  if (rst) begin
    ram_rd_sel = 2'bxx;
    ram_wr_sel = `RWS_DC;
    src_sel1 = `ASS_DC;
    src_sel2 = `ASS_DC;
    alu_op = `ALU_NOP;
    imm_sel = `IDS_DC;
    wr = 1'b0;
    psw_set = `PS_NOT;
    cy_sel = `CY_0;
    pc_wr = `PCW_N;
    pc_sel = `PIS_DC;
    comp_sel = `CSS_DC;
    wr_bit = 1'b0;
    src_sel3 = `AS3_DC;
    rom_addr_sel = `RAS_PC;
    ext_addr_sel = `EAS_DC;
    wad2 = `WAD_N;
  end else begin
    case (state)
      2'b01: begin
    casex (op)
      `ACALL :begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_SP;
          src_sel1 = `ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_PCH;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `AJMP : begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_DC;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `LCALL :begin
          ram_rd_sel = 2'bxx;
          ram_wr_sel = `RWS_SP;
          src_sel1 = `ASS_IMM;
          src_sel2 = 2'bxx;
          alu_op = `ALU_NOP;
          imm_sel = `IDS_PCH;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          comp_sel = `CSS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      default begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_N;
          pc_sel = `PIS_DC;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DC;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
      end
    endcase
    end
    2'b10:
    casex (op)
      `CJNE_R : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_I : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_D : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `CJNE_C : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `DJNZ_R : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `DJNZ_D : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_DES;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JB : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JBC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_D;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b1;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b1;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_CY;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JMP : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = `PCW_Y;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNB : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_BIT;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNC : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;
          src_sel3 = `AS3_DC;
          comp_sel = `CSS_CY;
          wr_bit = 1'b0;
          wad2 = `WAD_N;
          rom_addr_sel = `RAS_PC;
          ext_addr_sel = `EAS_DC;
        end
      `JNZ : begin
          ram_rd_sel = `RRS_DC;
          ram_wr_sel = `RWS_DC;
          src_sel1 = `ASS_DC;
          src_sel2 = `ASS_DC;
          alu_op = `ALU_NOP;
          wr = 1'b0;
          psw_set = `PS_NOT;
          cy_sel = `CY_0;
          pc_wr = !eq;
          pc_sel = `PIS_ALU;
          imm_sel = `IDS_DC;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产自产v一区二区三区c| 欧美疯狂做受xxxx富婆| 亚洲香蕉伊在人在线观| 国产亚洲成aⅴ人片在线观看| 色婷婷国产精品久久包臀| 精品一区二区三区的国产在线播放| 亚洲视频在线一区观看| 日韩欧美国产午夜精品| 欧美亚洲自拍偷拍| 高清不卡一区二区| 久久精品国产亚洲aⅴ| 亚洲九九爱视频| 日本一区二区久久| 精品久久久网站| 日韩一区二区在线播放| 91成人看片片| 91免费在线播放| 东方aⅴ免费观看久久av| 久久精品国产久精国产| 午夜国产精品一区| 亚洲男女一区二区三区| 欧美激情一区二区三区蜜桃视频 | 亚洲美女视频在线| 久久精品亚洲麻豆av一区二区 | 日韩精品一区二| 欧美午夜电影一区| 色诱亚洲精品久久久久久| 99久久精品国产毛片| 成人性色生活片| 国产a久久麻豆| 国产91在线看| 岛国精品在线播放| 不卡一区在线观看| 99vv1com这只有精品| 91在线视频18| 91丨porny丨国产| 1024成人网| 国产精品自拍在线| 午夜亚洲福利老司机| 亚洲视频在线观看一区| 亚洲国产成人私人影院tom| 国产校园另类小说区| 欧美一区二区人人喊爽| 精品国免费一区二区三区| 欧美精品免费视频| 在线观看av一区二区| 欧美最猛性xxxxx直播| 色88888久久久久久影院按摩| 一本一道久久a久久精品| 日本精品视频一区二区三区| 色网站国产精品| 欧美日韩午夜影院| 日韩精品一区二区三区四区| 精品免费视频.| 国产欧美日韩视频在线观看| 国产精品毛片高清在线完整版| 国产精品乱码久久久久久| 1000部国产精品成人观看| 亚洲美女免费在线| 日韩高清一级片| 久久91精品国产91久久小草| 国产伦理精品不卡| 99久久婷婷国产综合精品电影 | 久久久99免费| 中文字幕一区二区三区在线观看 | 性欧美大战久久久久久久久| 三级一区在线视频先锋| 美女一区二区三区| 成人综合在线视频| 欧美在线观看一二区| 欧美xxxx老人做受| 亚洲色图第一区| 奇米色一区二区三区四区| 国产麻豆日韩欧美久久| 在线亚洲一区二区| 精品国产伦一区二区三区观看体验 | 欧美日本免费一区二区三区| 日韩免费福利电影在线观看| 国产精品福利影院| 亚洲国产日韩a在线播放| 久久成人av少妇免费| 99久久久精品| 精品国产三级电影在线观看| 亚洲欧洲一区二区在线播放| 亚洲国产精品久久人人爱| 韩国成人福利片在线播放| 91年精品国产| 久久噜噜亚洲综合| 午夜精品久久久久久久99水蜜桃| 国产乱码精品一区二区三区av| 91亚洲精品一区二区乱码| 日韩欧美国产综合| 亚洲狠狠爱一区二区三区| 国产mv日韩mv欧美| 91精品国产综合久久福利| 国产精品蜜臀av| 麻豆极品一区二区三区| 91久久线看在观草草青青| 久久婷婷色综合| 午夜精品久久久久久不卡8050| 国产剧情av麻豆香蕉精品| 91麻豆精品国产91久久久久久| 一色屋精品亚洲香蕉网站| 久久er精品视频| 7777精品伊人久久久大香线蕉的 | 欧美日韩mp4| 亚洲欧洲中文日韩久久av乱码| 国内成人精品2018免费看| 欧美日韩国产中文| 伊人开心综合网| youjizz久久| 国产欧美视频一区二区| 麻豆成人av在线| 欧美高清视频在线高清观看mv色露露十八| 国产精品国产三级国产a| 国产精品一区二区视频| 欧美一区二区免费| 日一区二区三区| 欧美日韩一级二级| 一区二区三区高清| 91网站在线观看视频| 国产女人18水真多18精品一级做| 久久精品国产一区二区三| 91精品国产欧美一区二区| 日韩精品一二三四| 欧美裸体一区二区三区| 亚洲第四色夜色| 欧美午夜电影网| 亚洲电影欧美电影有声小说| 在线观看一区二区视频| 亚洲综合免费观看高清完整版| 色8久久人人97超碰香蕉987| 亚洲视频电影在线| 91久久免费观看| 亚洲妇熟xx妇色黄| 91精品福利在线一区二区三区| 五月综合激情婷婷六月色窝| 欧美日韩激情一区二区| 日韩国产欧美在线视频| 制服.丝袜.亚洲.中文.综合| 日韩精品电影在线| 日韩女优电影在线观看| 美女在线视频一区| 久久欧美一区二区| 国产91在线|亚洲| 中文字幕在线视频一区| 97久久精品人人做人人爽50路| 亚洲欧美在线视频观看| 91久久精品网| 午夜精彩视频在线观看不卡| 欧美一区二区三区在线观看视频| 蜜臀精品一区二区三区在线观看| 日韩精品中文字幕一区| 国产成人一级电影| 亚洲日本护士毛茸茸| 欧美午夜不卡视频| 日本大胆欧美人术艺术动态| 26uuu另类欧美亚洲曰本| 国产91清纯白嫩初高中在线观看| 国产精品毛片无遮挡高清| 色噜噜狠狠一区二区三区果冻| 天堂在线一区二区| 精品国产一区二区亚洲人成毛片 | 久久免费美女视频| 成人app网站| 午夜影视日本亚洲欧洲精品| 日韩一区二区在线看片| 粉嫩在线一区二区三区视频| 亚洲欧美日韩电影| 日韩欧美www| 一本色道亚洲精品aⅴ| 蜜臀av一区二区| 国产精品久久久久久久久果冻传媒 | 欧美三级资源在线| 免费观看91视频大全| 国产精品日日摸夜夜摸av| 欧美色手机在线观看| 韩国成人精品a∨在线观看| 亚洲精品亚洲人成人网| 日韩免费观看高清完整版| 波多野结衣中文字幕一区| 视频在线在亚洲| 国产精品久久看| 日韩一区二区三区三四区视频在线观看| 国产高清视频一区| 日日摸夜夜添夜夜添国产精品| 日本一区二区成人| 欧美一区二区日韩| 在线视频欧美精品| 国产精品一品二品| 午夜日韩在线电影| 亚洲特级片在线| 精品对白一区国产伦| 一本色道久久综合精品竹菊| 久久99国产乱子伦精品免费| 亚洲综合清纯丝袜自拍| 国产网站一区二区| 精品免费视频一区二区| 欧美女孩性生活视频| 91视频国产观看|