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

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

?? decoder.v

?? 利用verilog實(shí)現(xiàn)單片機(jī)的反向設(shè)計(jì)。編程環(huán)境為modelsim6.0
?? V
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
//////////////////////////////////////////////////////////////////////
////                                                              ////
////  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;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产尤物一区二区在线| 极品瑜伽女神91| 精品国产一区二区三区忘忧草| 国产.欧美.日韩| 免费观看日韩av| 亚洲激情图片一区| 国产欧美视频一区二区| 欧美一级精品在线| 色婷婷综合久色| 粗大黑人巨茎大战欧美成人| 奇米影视一区二区三区| 一区二区三区不卡视频| 日本一区二区三区四区| 精品国产免费视频| 欧美日本韩国一区二区三区视频| 欧美日韩黄色一区二区| 国产老女人精品毛片久久| 亚洲123区在线观看| 亚洲欧洲日韩一区二区三区| 久久午夜老司机| 日韩精品最新网址| 欧美精品vⅰdeose4hd| 色婷婷综合久色| 99久久国产综合色|国产精品| 国产美女视频91| 久草精品在线观看| 久久精品国产精品亚洲精品| 日日夜夜免费精品| 午夜在线电影亚洲一区| 一区二区三区美女视频| 亚洲私人影院在线观看| 国产精品国产三级国产三级人妇 | 91免费看片在线观看| 丁香网亚洲国际| 国产69精品久久久久毛片| 国产成人自拍网| 国产一区二区三区不卡在线观看| 国内精品久久久久影院一蜜桃| 美女脱光内衣内裤视频久久网站| 日韩av一区二区在线影视| 日本特黄久久久高潮| 男男gaygay亚洲| 久久er精品视频| 国产一区二区三区黄视频| 国产精华液一区二区三区| 国产精品综合一区二区三区| 国产成人免费视频| www.欧美.com| 在线免费观看一区| 欧美美女直播网站| 日韩一区二区三区免费看| 精品免费日韩av| 国产亚洲一区二区三区| 中文字幕一区二区三| 亚洲伦理在线精品| 亚洲国产精品影院| 免费观看日韩av| 国产成人在线观看| 91网站在线观看视频| 欧美三级电影在线看| 日韩一区二区免费高清| 国产欧美一区视频| 亚洲欧美另类久久久精品2019| 亚洲午夜羞羞片| 久久99精品国产| zzijzzij亚洲日本少妇熟睡| 欧美色大人视频| 久久午夜免费电影| 亚洲精品国久久99热| 奇米影视一区二区三区小说| 国产成人在线免费| 欧美性受xxxx| 久久综合久色欧美综合狠狠| 亚洲欧洲日韩女同| 男女性色大片免费观看一区二区| 国产精品77777竹菊影视小说| 97久久超碰精品国产| 91麻豆精品国产91久久久更新时间| 欧美精品一区二区高清在线观看| 国产精品国产a| 日本不卡高清视频| 成人av免费观看| 欧美一级淫片007| 中文字幕免费不卡在线| 天堂在线一区二区| 成人深夜在线观看| 在线91免费看| ●精品国产综合乱码久久久久| 视频一区中文字幕| 99国产欧美久久久精品| 91精品国产91热久久久做人人| 国产精品久久久久久久久搜平片 | 日本伊人色综合网| 成人av免费在线观看| 7777精品伊人久久久大香线蕉的| 中文字幕成人在线观看| 日韩va亚洲va欧美va久久| 9人人澡人人爽人人精品| 欧美一卡2卡3卡4卡| 亚洲精品一二三四区| 国产精品自在欧美一区| 欧美日韩精品一区二区三区四区| 国产精品天美传媒沈樵| 麻豆专区一区二区三区四区五区| 色94色欧美sute亚洲线路一久| 久久夜色精品国产噜噜av| 日韩主播视频在线| 91美女福利视频| 中文字幕欧美日韩一区| 精品一区二区三区免费视频| 欧美日韩激情一区二区三区| 亚洲精品一卡二卡| 99久久亚洲一区二区三区青草| 欧美精品一区男女天堂| 蜜臀久久99精品久久久画质超高清| 日本韩国精品一区二区在线观看| 国产精品伦一区| 国产一区二区三区蝌蚪| 欧美sm极限捆绑bd| 日韩av一二三| 欧美日韩亚洲综合一区二区三区| 亚洲伦理在线精品| 色偷偷久久一区二区三区| 日韩美女精品在线| 成人激情小说网站| 国产精品免费看片| 成人激情综合网站| 国产精品免费观看视频| 成人国产一区二区三区精品| 日本一区二区三区在线观看| 国产福利不卡视频| 欧美激情中文不卡| 成人av资源下载| 亚洲欧洲av在线| 91猫先生在线| 亚洲综合偷拍欧美一区色| 在线视频你懂得一区| 亚洲综合av网| 欧美日韩国产高清一区二区| 午夜a成v人精品| 日韩一区二区麻豆国产| 久久精品国产精品青草| 精品国产凹凸成av人网站| 国产美女av一区二区三区| 国产亚洲婷婷免费| 成人激情免费视频| 亚洲精品成人少妇| 欧美性感一类影片在线播放| 午夜精品久久久久久久99水蜜桃| 欧美久久一区二区| 另类的小说在线视频另类成人小视频在线 | 91精品国产麻豆国产自产在线 | 91在线视频在线| 亚洲欧美国产高清| 欧美男女性生活在线直播观看| 日韩主播视频在线| 久久久久久久电影| 91免费看`日韩一区二区| 亚洲一区在线观看视频| 日韩亚洲欧美一区| 成人一级视频在线观看| 一区二区三区四区中文字幕| 欧美欧美欧美欧美| 国产麻豆精品一区二区| 日韩一区中文字幕| 宅男在线国产精品| 国产不卡视频一区| 亚洲一区二区三区影院| 日韩欧美色电影| 成人精品一区二区三区中文字幕| 一区二区三区免费| 欧美精品一区二区蜜臀亚洲| 色综合网色综合| 免费国产亚洲视频| 中文字幕亚洲一区二区va在线| 欧美日韩午夜在线| 国产精品综合在线视频| 亚洲一二三专区| 国产亚洲精品aa午夜观看| 欧美主播一区二区三区美女| 精品一区二区三区在线观看国产| 综合色中文字幕| 欧美不卡123| 欧美综合一区二区三区| 国产一区二区三区在线看麻豆| 一区二区三区在线观看欧美| 久久日一线二线三线suv| 欧美在线一区二区三区| 国产精品一区免费在线观看| 亚洲国产乱码最新视频| 亚洲国产成人午夜在线一区| 91精品国产91综合久久蜜臀| 一本色道久久综合狠狠躁的推荐| 久久国产夜色精品鲁鲁99| 一区二区三区电影在线播| 久久久青草青青国产亚洲免观| 欧美日韩国产欧美日美国产精品| 成人精品免费看| 精品一区二区三区免费毛片爱| 亚洲第一精品在线|