ismailov-e
Member level 1
- Joined
- Jan 26, 2015
- Messages
- 34
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Activity points
- 295
Hi
Who can help me please.
I want to make some loop operation. for example: use loop in register indexes
it outputs only one. but should counts.
Who can help me please.
I want to make some loop operation. for example: use loop in register indexes
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 reg [7:0] res; reg [7:0] buff for (i = 0; i < 8 ; i = i + 1) res <= buff[i+1:i] + i; module integers( clock, res ); input clock; output res; wire clock; reg [7:0] res; reg [7:0] buff = 0; genvar i; for (i = 0; i < 8 ; i = i + 1) begin always@ (negedge clock) begin res <= buff + i; end end
it outputs only one. but should counts.
Last edited by a moderator: