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

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

?? reg_4_pack_clrset.v

?? 用VHDL語(yǔ)言實(shí)現(xiàn)的pic16f84
?? V
字號(hào):
// ----------------------------------------------------------------------------
// reg_4_pack_clrset.v
// 
// AUTHOR         : John Clayton
// ----------------------------------------------------------------------------
// Release History
//   VERSION DATE        AUTHOR            DESCRIPTION
//   ------- ----------- ----------------- ------------------------------------
//   1.0     08/27/01    John Clayton      Created this file from 
//                                         "reg_4_pack.v"
//   1.1     04/16/02    John Clayton      Made reset asynchronous
// ----------------------------------------------------------------------------
// PURPOSE: This module implements a set of four addresses and a data bus of
//          the given width.  These addresses can be either R/W 
//          (full registers) or they can be Read-Only (no storage provided).
//          See NOTES below for further details of operation.
// ----------------------------------------------------------------------------
// Parameters
//   NAME                 RANGE    DESCRIPTION                DEFAULT
//   -------------------- -------- -------------------------- -----------------
//   SIZE_R0_PP           1..16    Number of bits in register   8
//   SIZE_R1_PP           1..16    Number of bits in register   8
//   SIZE_R2_PP           1..16    Number of bits in register   8
//   SIZE_R3_PP           1..16    Number of bits in register   8
//   READ_ONLY_REGS_PP    0..3     Number of regs which are read only    0
//   DATA_BUS_SIZE_PP     4..??    Sets the width of the data bus 16
//
// ----------------------------------------------------------------------------
// USABILITY FACTORS
//   Reset Strategy   : active high, synchronous to rising edge of clk_i
//   Clock Domains    : clk_i
//   Critical Timing  : None
//   Test Features    : None
//   Asynchronous I/F : None
//   Scan Methodology : None
//   Instantiations   : N/A
//   Other            : N/A
// ----------------------------------------------------------------------------
// NOTES
// 
// The reg_4_pack_clrset address vector "adr_i" selects among four locations
// present in the module.  In order to read data from a register location, the
// we_i line must be inactive (low), and the "sel_i" signal must also be
// active (high.)  Then, the unit will drive the data bus.
//
// Writing is similar - drive we_i active (high), make sel_i high, drive the
// write data onto the data bus, and provide a "posedge clk_i" to store the
// data into the selected register.
//
// The registers are composed of d-flip-flops (DFFs), clocked by clk_i.
//
// There is a preset/clear function added into this module, controlled by
// the "pre" and "clr" input vectors.  A "1" in the corresponding bit
// position has the effect of presetting or clearing the associated register.
// The order of priority is as follows:  rst, clr, set, then normal read
// and write operations.  The clr and set operations are synchronous.  They
// occur at the rising clock edge.
//
// A parameter allows setting the number of "read-only" locations.
// The convention for this parameter is the following:  The lower numbered N 
// registers become read-only locations, and the upper (4-N) registers remain 
// as R/W (storage registers,) for a setting of READ_ONLY_REGS_PP = N.
// Thus, for N=2, then r0 and r1 are "read-only" locations (no actual 
// registers are synthesized,) but r2 and r3 remain as read/write registers.
//
// -FHDR-----------------------------------------------------------------------

//`resetall
//`timescale 1ns/100ps

module reg_4_pack_clrset(
clk_i,
rst_i,
sel_i,
we_i,
adr_i,
clr_i,
set_i,
dat_io,
r0,
r1,
r2,
r3
);
// Parameter declarations

parameter SIZE_R0_PP = 8;         // Determines size of register in bits.
parameter SIZE_R1_PP = 8;         // Determines size of register in bits.
parameter SIZE_R2_PP = 8;         // Determines size of register in bits.
parameter SIZE_R3_PP = 8;         // Determines size of register in bits.
parameter READ_ONLY_REGS_PP = 0;  // Determines how many regs are read only.
parameter DATA_BUS_SIZE_PP = 16;  // Sets the width of the data bus.

// I/O declarations
input clk_i;                      // System clock input
input rst_i;                      // Reset signal
input sel_i;                      // Reg block "chip select"
input we_i;                       // write enable signal
input [1:0] adr_i;                // Register address field
input [3:0] clr_i;                // Each bit clears one register
input [3:0] set_i;                // Each bit sets one register

inout [DATA_BUS_SIZE_PP-1:0] dat_io;  // DSP data bus

inout [SIZE_R0_PP-1:0] r0;        // Register I/O
inout [SIZE_R1_PP-1:0] r1;        // Register I/O
inout [SIZE_R2_PP-1:0] r2;        // Register I/O
inout [SIZE_R3_PP-1:0] r3;        // Register I/O


// Internal declarations

// Local signals to hold register values
reg [SIZE_R0_PP-1:0] r0_local;
reg [SIZE_R1_PP-1:0] r1_local;
reg [SIZE_R2_PP-1:0] r2_local;
reg [SIZE_R3_PP-1:0] r3_local;

reg [DATA_BUS_SIZE_PP-1:0] data_out;


//---------------------------------------------------------------
// This is the writing side of the registers
always @(posedge clk_i or posedge rst_i)
begin
  if (rst_i)       // Asynchronous reset
  begin
    r0_local <= 0;
    r1_local <= 0;
    r2_local <= 0;
    r3_local <= 0;
  end
  else
  begin            // Clock edge
    if (we_i && sel_i)
      case (adr_i)
        2'b00 :
          if (SIZE_R0_PP > 1) r0_local <= dat_io[SIZE_R0_PP-1:0];
          else if (SIZE_R0_PP == 1) r0_local <= dat_io[0];
        2'b01 :
          if (SIZE_R1_PP > 1) r1_local <= dat_io[SIZE_R1_PP-1:0];
          else if (SIZE_R1_PP == 1) r1_local <= dat_io[0];
        2'b10 :
          if (SIZE_R2_PP > 1) r2_local <= dat_io[SIZE_R2_PP-1:0];
          else if (SIZE_R2_PP == 1) r2_local <= dat_io[0];
        2'b11 :
          if (SIZE_R3_PP > 1) r3_local <= dat_io[SIZE_R3_PP-1:0];
          else if (SIZE_R3_PP == 1) r3_local <= dat_io[0];
      endcase
    if (set_i[0] | clr_i[0]) r0_local <= {SIZE_R0_PP{set_i[0]}};
    if (set_i[1] | clr_i[1]) r1_local <= {SIZE_R0_PP{set_i[1]}};
    if (set_i[2] | clr_i[2]) r2_local <= {SIZE_R0_PP{set_i[2]}};
    if (set_i[3] | clr_i[3]) r3_local <= {SIZE_R0_PP{set_i[3]}};
  end

end // End of always block

// This is the reading side of the registers

always @(
         adr_i
         or r0_local
         or r1_local
         or r2_local
         or r3_local
         or r0
         or r1
         or r2
         or r3
        )
  begin
    case (adr_i)
    2'b00 : 
      data_out <= (READ_ONLY_REGS_PP > 0)?r0:r0_local;
    2'b01 : 
      data_out <= (READ_ONLY_REGS_PP > 1)?r1:r1_local;
    2'b10 : 
      data_out <= (READ_ONLY_REGS_PP > 2)?r2:r2_local;
    2'b11 : 
      data_out <= (READ_ONLY_REGS_PP > 3)?r3:r3_local;
    endcase
  end // End of always block


assign dat_io = (~we_i && sel_i)?data_out:{DATA_BUS_SIZE_PP{1'bz}};

assign r0 = (READ_ONLY_REGS_PP <= 0)?r0_local:{SIZE_R0_PP{1'bz}};
assign r1 = (READ_ONLY_REGS_PP <= 1)?r1_local:{SIZE_R1_PP{1'bz}};
assign r2 = (READ_ONLY_REGS_PP <= 2)?r2_local:{SIZE_R2_PP{1'bz}};
assign r3 = (READ_ONLY_REGS_PP <= 3)?r3_local:{SIZE_R3_PP{1'bz}};

endmodule

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费成人av在线| 国产精品996| 日韩1区2区3区| 视频一区二区三区入口| 午夜电影久久久| 日韩av成人高清| 国产乱子伦视频一区二区三区| 蜜桃视频一区二区三区在线观看| 日韩高清在线不卡| 久久99国产精品免费| 国产成人福利片| 色婷婷av一区二区三区大白胸| 91啪亚洲精品| 欧美午夜精品一区二区蜜桃| 日韩欧美aaaaaa| 国产欧美日韩综合| 怡红院av一区二区三区| 日韩精品每日更新| 国产成人综合自拍| 欧美影院午夜播放| 久久久亚洲午夜电影| 亚洲欧美日韩在线不卡| 日本在线播放一区二区三区| 国产91精品露脸国语对白| 欧美综合一区二区| 欧美大白屁股肥臀xxxxxx| 欧美国产97人人爽人人喊| 婷婷激情综合网| jlzzjlzz国产精品久久| 日韩精品一区二区三区四区| 中文字幕一区av| 国产精品一级片| 欧美一区二区三区免费大片 | 97久久精品人人爽人人爽蜜臀| 在线精品观看国产| 中文字幕一区二区三区不卡| 日av在线不卡| 欧美视频在线一区| 亚洲天天做日日做天天谢日日欢| 国产在线播放一区| 日韩三级免费观看| 麻豆免费精品视频| 91精品国产美女浴室洗澡无遮挡| 亚洲女同女同女同女同女同69| 国产精品亚洲人在线观看| 精品电影一区二区| 久久国产日韩欧美精品| 日韩欧美一级二级| 日韩精品午夜视频| 91麻豆精品国产91久久久使用方法| 亚洲精品国产品国语在线app| 99视频一区二区三区| 国产精品乱子久久久久| 成人aaaa免费全部观看| 国产精品国产成人国产三级| av一本久道久久综合久久鬼色| 中文字幕av在线一区二区三区| 成人黄色电影在线 | 欧美性xxxxxxxx| 午夜视频在线观看一区二区| 欧美男男青年gay1069videost| 亚洲激情网站免费观看| 欧美一区二区三区视频| 日本不卡一二三| 国产亚洲人成网站| 欧洲一区二区三区在线| 日韩精品一二区| 国产日韩精品久久久| 91啪亚洲精品| 久久99久久99| 亚洲同性gay激情无套| 欧美精品少妇一区二区三区| 激情欧美一区二区三区在线观看| 国产精品美女一区二区在线观看| 在线一区二区三区四区| 国内外成人在线| 亚洲制服丝袜一区| 国产人成一区二区三区影院| 欧美日韩日日骚| 不卡视频在线观看| 免播放器亚洲一区| 亚洲另类在线制服丝袜| 久久亚洲一区二区三区明星换脸| av不卡一区二区三区| 精品制服美女丁香| 亚洲va国产天堂va久久en| 久久久九九九九| 久久综合九色综合97婷婷女人| 欧洲av在线精品| 99久久精品国产观看| 韩国精品免费视频| 视频在线观看国产精品| 一区二区三区在线视频免费观看| 久久天堂av综合合色蜜桃网| 在线播放日韩导航| 欧美日韩国产成人在线91| 一本大道久久精品懂色aⅴ| 国产一区二区三区免费看| 奇米色一区二区| 蜜桃精品视频在线| 丝袜诱惑制服诱惑色一区在线观看| 中文字幕一区在线| 亚洲三级免费观看| 中文字幕视频一区| 亚洲人成亚洲人成在线观看图片| 国产精品久久久久久久久图文区| 国产午夜亚洲精品不卡| 日本一区二区在线不卡| 久久久三级国产网站| 国产肉丝袜一区二区| 国产婷婷色一区二区三区| 久久久欧美精品sm网站| 亚洲国产高清aⅴ视频| 亚洲欧洲av另类| 亚洲一区二区三区四区五区黄 | 中文字幕一区二区三区四区| 国产精品嫩草99a| 一区二区三区四区视频精品免费| 亚洲午夜电影网| 国产在线不卡一卡二卡三卡四卡| 国产suv精品一区二区三区| 国产精品亚洲成人| 欧洲精品在线观看| 亚洲精品在线免费播放| 国产精品国产三级国产普通话蜜臀 | 成人h动漫精品| 欧美日精品一区视频| 欧美va在线播放| 亚洲视频一区在线| 日韩av电影免费观看高清完整版在线观看| 欧美日本免费一区二区三区| 精品国产乱码久久久久久蜜臀| 国产精品免费网站在线观看| 日韩成人av影视| 99久久99久久精品免费看蜜桃| 欧美精三区欧美精三区| 国产精品成人免费| 精东粉嫩av免费一区二区三区| 91福利资源站| 国产精品视频免费看| 九九久久精品视频| 欧美日韩不卡一区| 伊人一区二区三区| av男人天堂一区| 久久九九国产精品| 美国三级日本三级久久99| 色视频成人在线观看免| 亚洲视频一区在线观看| 国产成人aaa| 久久久99精品久久| 久草热8精品视频在线观看| 欧美日韩免费高清一区色橹橹| 中文一区一区三区高中清不卡| 另类成人小视频在线| 678五月天丁香亚洲综合网| 亚洲第一会所有码转帖| 91久久精品日日躁夜夜躁欧美| 国产精品污网站| eeuss鲁一区二区三区| 亚洲欧洲精品天堂一级 | 91国模大尺度私拍在线视频| 亚洲欧洲国产日本综合| 91日韩精品一区| 亚洲在线一区二区三区| 在线视频一区二区免费| 亚洲成av人片观看| 日韩午夜在线播放| 国产乱对白刺激视频不卡| 日本一区二区视频在线观看| av激情亚洲男人天堂| 洋洋成人永久网站入口| 91精选在线观看| 国产大陆亚洲精品国产| 亚洲视频网在线直播| 717成人午夜免费福利电影| 黄色日韩网站视频| 一区二区三区欧美在线观看| 91精品国产高清一区二区三区 | 欧美午夜在线观看| 久久精品免费看| 国产精品每日更新在线播放网址| 欧美亚洲精品一区| 国产原创一区二区三区| 亚洲综合在线观看视频| 精品美女一区二区| 欧美亚洲综合一区| 成人av免费在线播放| 日本亚洲欧美天堂免费| 成人免费小视频| 久久亚洲综合色| 欧美精品tushy高清| 99天天综合性| 日韩免费看的电影| 欧洲一区在线观看| www.在线欧美| 成人综合在线观看| 久久精品噜噜噜成人av农村| 亚洲成a人在线观看| 亚洲自拍欧美精品| **网站欧美大片在线观看|