⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hmac_top.v

📁 hmac的verilog代码, 通过控制字选择进行sha1运算或hmac运算
💻 V
字号:
/////////////////////////////////////////////////////////    module describe// name: 		hmac_top// function:	the top module of the sha1-ip// writer:		zy// data:		2006/03/14// version:		1.0// feature:		////////////////////////////////////////////////////////module hmac_top(clk,en,wr,reset,addr,datain,digestresult,sha1int,wr_wait);input clk;input en;input wr;input reset;input [3:0] addr;input [31:0] datain;output [31:0] digestresult;output sha1int;output wr_wait;wire [511:0] dataout;wire dataready;wire wtready;wire paderror;wire [31:0] wt;wire digestready;wire [159:0] digestout;wire [31:0] digestresult;wire hashready;wire expadflgreg;wire sha1int;wire [4:0] ctrlword;wire [2:0] maskword;wire localreset;wire [1:0] procsel;wire keyready;reg wr_wait;always @(en)begin	wr_wait<=~en;endmodectrlunit modectrlunit_hmac(clk,reset,en,wr,addr,datain[4:0],ctrlword,maskword);resetgenunit resetgenunit_hmac(reset,ctrlword[1],localreset);datapadunit datapadunit_hmac(en,clk,localreset,wr,ctrlword[0],datain,addr,hashready,ctrlword[2],digestout,dataout,dataready,expadflgreg,paderror,procsel,keyready,digestready);wprounit wprounit_hmac(clk,localreset,dataout,dataready,wt,wtready);shacaoreunit shacaoreunit_hmac(clk,localreset,wtready,wt,procsel,ctrlword[3],ctrlword[4],ctrlword[2],hashready,digestout);hashoutput hashoutput_hmac(clk,en,localreset,wr,maskword,addr,digestout,paderror,digestready,keyready,digestresult,sha1int);endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -