Skip to content

Commit 8ddd5c1

Browse files
committed
corrected errors
1 parent 5bc4b2f commit 8ddd5c1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/user_peripherals/trng/TRNG_20RO7FF_PC.sv

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module tqvp_TRNG_20RO7FF_PC #(
2626
output [7:0] data_out // Data out from the peripheral, set this in accordance with the supplied address
2727
);
2828

29-
reg [SIZE_RO:0] oscillator_ring [N_RO] = 0;
29+
reg [N_RO:0][SIZE_RO:0] oscillator_ring = 0;
3030
reg [N_RO:0] oscillator_ring_Q = 0;
3131

3232
reg [7:0] ro_data = 0;
@@ -40,22 +40,22 @@ module tqvp_TRNG_20RO7FF_PC #(
4040

4141
for (j = 0; j < N_RO; j = j + 1) begin
4242
for (i = 1; i <= SIZE_RO; i = i + 1) begin
43-
[i]oscillator_ring[j] = ~[i-1]oscillator_ring[j];
43+
oscillator_ring[j][i] = ~oscillator_ring[j][i-1];
4444
end
45-
[0]oscillator_ring[j] = ~[SIZE_RO]oscillator_ring[j];
45+
oscillator_ring[j][0] = ~oscillator_ring[j][SIZE_RO];
4646
end
4747
end
4848

4949
always_ff @(posedge clk) begin //sampling FF logic
5050
for (i = 0; i < N_RO; i = i + 1) begin
51-
oscillator_ring_Q[i] = [SIZE_RO]oscillator_ring[i]
51+
oscillator_ring_Q[i] = oscillator_ring[i][SIZE_RO];
5252
end
5353
end
5454

5555
always_comb @(*) begin // xor logic
56-
xorA = oscillator_ring_Q[0] ^ oscillator_ring_Q[1]
56+
xorA = oscillator_ring_Q[0] ^ oscillator_ring_Q[1];
5757
for (i = 2; i < N_RO; i = i + 1) begin
58-
xorA = xorA ^ oscillator_ring_Q[i]
58+
xorA = xorA ^ oscillator_ring_Q[i];
5959
end
6060
end
6161

0 commit comments

Comments
 (0)