humairalis
Newbie level 6
- Joined
- Dec 22, 2009
- Messages
- 14
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- khi
- Activity points
- 1,468
mr fibble you are a genious
thankssss alooottt
One of the perks of being a hand puppet with glowing red eyes. ;-) Anyways, glad you got it working now.
Incidentally, did you fix the "WARNING: For instance uut/\[2].ark /, width 33 of formal port Out is not equal to width 31 of actual." warning? That sometimes is an indication that you might accidentally be using the wrong bit width. Which will then result in it working for a limited testbench, but then breaking bad in some cases.
Yeah, reading your code a bit more ... You have things like "input [32:0] In;" ... but then later on you assign In = 32'h00000000; ...
[32:0] gets you a 33 bit word. If you want a 32-bit word you want to use "input [31:0] In;" etc. So you may want to go over your code and see if everything is really 32 bits wide where you think it is...
Code Verilog - [expand] 1 2 3 4 5 6 7 genvar i; generate for (i=0;i<=3;i=i+1) begin AddRoundKey ark(In[i*32+:32], clk, Key[i*32+:32], Out01[i*32+:32], reset); ShiftRow sr1(Out01[i*32+:32], clk, Out32[i*32+:32], reset); end endgenerate
ShiftRow sr1(Out01[i*32+:32], clk, Out32[i*32+:32], reset);
this line is the 74th one
dont know why i am getting out of range 159 index
however i = max 3 and if i multiply 3*32+32 so max of 127 should be there
If you want the delay to be in real hardware (as opposed to just simulation), then you will have to use a counter or something like it.
If the delay is ONLY IN SIMULATION then you can use something like #1234 to delay 1234 time-units. But do keep in mind that delays done with # are only useful in simulation. This does NOT synthesize to anything in hardware.
See this for an example on delays, to be used in testbenches: https://www.asic-world.com/verilog/vbehave4.html
So do 4 fetch actions to get all the 128 bytes?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?