korgull
Junior Member level 1
- Joined
- Jun 5, 2008
- Messages
- 18
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- MN, United States
- Activity points
- 1,418
verilog specify
Hi,
I am currently modeling an AES design with a 256-bit key. My dilemma is that I have a case where the key expansion pipeline is quicker than the pipeline which does the actual encryption. I have an example in VHDL to which the author parameterized the delay for the key expansion so that it matches the encryption pipeline and each generated key arrives at the proper time during the addRoundKey cycle.
Now, I do not see an easy way to do this in Verilog, so I have been manually specifying registers as I need them and tap off to the encryption rounds when I need it:
Is there an easier way to do this that I am not aware of? Or is this how it is done in Verilog?
thanks!
Hi,
I am currently modeling an AES design with a 256-bit key. My dilemma is that I have a case where the key expansion pipeline is quicker than the pipeline which does the actual encryption. I have an example in VHDL to which the author parameterized the delay for the key expansion so that it matches the encryption pipeline and each generated key arrives at the proper time during the addRoundKey cycle.
Now, I do not see an easy way to do this in Verilog, so I have been manually specifying registers as I need them and tap off to the encryption rounds when I need it:
Code:
// Key Expansion Delay circuits
delayReg128 D0 (.IN(KEY[127:0]), .CLK(CLOCK), .OUT(KEYDLY0));
delayReg128 D1 (.IN(KEYDLY0), .CLK(CLOCK), .OUT(KEYDLY1));
delayReg256 D2 (.IN(KXP1), .CLK(CLOCK), .OUT(KEYDLY2));
delayReg128 D3 (.IN(KEYDLY2[255:128]), .CLK(CLOCK), .OUT(KEYDLY3));
delayReg128 D4 (.IN(KEYDLY2[127:0]), .CLK(CLOCK), .OUT(KEYDLY4));
delayReg128 D5 (.IN(KEYDLY4), .CLK(CLOCK), .OUT(KEYDLY5));
delayReg128 D6 (.IN(KEYDLY5), .CLK(CLOCK), .OUT(KEYDLY6));
delayReg256 D7 (.IN(KXP2), .CLK(CLOCK), .OUT(KEYDLY7));
[blah.. blah. blah..
Is there an easier way to do this that I am not aware of? Or is this how it is done in Verilog?
thanks!