|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
WARNING:Xst:1710 - FF/Latch <r0/out_23> (without init value) has a constant value of 0 in block <aes_key_expand_128>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <r0/out_22> (without init value) has a constant value of 0 in block <aes_key_expand_128>.
代码见下。。。。不知道问题出在哪。这个模块是在顶层模块下调用的,但是端口里的输入key的值是从另外一个子模块返回给顶层模块的,而且没有付初值,问题会处在这么?
- module aes_key_expand_128(clk, kld, key, wo_0, wo_1, wo_2, wo_3);
- input clk;
- input kld;
- input [127:0] key;
- output [31:0] wo_0, wo_1, wo_2, wo_3;
- reg [31:0] w[3:0];
- wire [31:0] tmp_w;
- wire [31:0] subword;
- wire [31:0] rcon;
- assign wo_0 = w[0];
- assign wo_1 = w[1];
- assign wo_2 = w[2];
- assign wo_3 = w[3];
- always @(posedge clk) w[0] <= #1 kld ? key[127:096] : w[0]^subword^rcon;
- always @(posedge clk) w[1] <= #1 kld ? key[095:064] : w[0]^w[1]^subword^rcon;
- always @(posedge clk) w[2] <= #1 kld ? key[063:032] : w[0]^w[2]^w[1]^subword^rcon;
- always @(posedge clk) w[3] <= #1 kld ? key[031:000] : w[0]^w[3]^w[2]^w[1]^subword^rcon;
- assign tmp_w = w[3];
- aes_sbox u0( .a(tmp_w[23:16]), .d(subword[31:24]));
- aes_sbox u1( .a(tmp_w[15:08]), .d(subword[23:16]));
- aes_sbox u2( .a(tmp_w[07:00]), .d(subword[15:08]));
- aes_sbox u3( .a(tmp_w[31:24]), .d(subword[07:00]));
- aes_rcon r0( .clk(clk), .kld(kld), .out(rcon));
- endmodule
复制代码 |
|