?? modectrlunit.v
字號:
///////////////////////////////////////////////////////// module describe// name: modectrlunit// function: record the ctrl word,the addr is 0;ctrlword[0] is the padflg.// writer: zy// data: 2006/03/14// version: 1.0// feature: ////////////////////////////////////////////////////////module modectrlunit(clk,reset,en,wr,addr,datain,ctrlword,maskword);input clk;input reset;input en;input wr;input [3:0] addr;input [4:0] datain;output [4:0] ctrlword;output [2:0] maskword;reg [4:0] ctrlword;//ctrl[0] is pad flag, ctrl[1] is soft reset,ctrl[2] is modsel, ctrl[3] is newhmac, ctrl[4] is ivrstreg [2:0] maskword;always @(posedge clk)begin if (!reset) begin ctrlword<=0; maskword<=0; end else if ((addr==0)&&(en)&&(!wr)) ctrlword<=datain; else if ((addr==15)&&(en)&&(!wr)) maskword<=datain[2:0]; else ctrlword[1]<=0;endendmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -