66`default_nettype none
77
88module tqvp_TRNG_20RO7FF_PC # (
9- parameter SIZE_RO = 6 ; // size of the RO will be SIZE_RO + 1 inverter gates (7 in this case)
10- parameter N_RO = 20 ; // number of ROs in parallel
9+ parameter SIZE_RO = 6 , // size of the RO will be SIZE_RO + 1 inverter gates (7 in this case)
10+ N_RO = 20 // number of ROs in parallel
1111 )(
1212 input clk, // Clock - the TinyQV project clock is normally set to 64MHz.
1313 input rst_n, // Reset_n - low to reset.
@@ -36,7 +36,7 @@ module tqvp_TRNG_20RO7FF_PC #(
3636 integer i;
3737 integer j;
3838
39- always @ (* ) begin // Ring oscilators Construction logic
39+ always_comb @ (* ) begin // Ring oscilators Construction logic
4040
4141 for (j = 0 ; j < N_RO ; j = j + 1 ) begin
4242 for (i = 1 ; i <= SIZE_RO ; i = i + 1 ) begin
@@ -46,20 +46,20 @@ module tqvp_TRNG_20RO7FF_PC #(
4646 end
4747 end
4848
49- always @ (posedge clk) begin // sampling FF logic
49+ always_ff @ (posedge clk) begin // sampling FF logic
5050 for (i = 0 ; i < N_RO ; i = i + 1 ) begin
5151 oscillator_ring_Q[i] = [SIZE_RO ]oscillator_ring[i]
5252 end
5353 end
5454
55- always @ (* ) begin // xor logic
55+ always_comb @ (* ) begin // xor logic
5656 xorA = oscillator_ring_Q[0 ] ^ oscillator_ring_Q[1 ]
5757 for (i = 2 ; i < N_RO ; i = i + 1 ) begin
5858 xorA = xorA ^ oscillator_ring_Q[i]
5959 end
6060 end
6161
62- always @ (posedge clk or posedge ! rst_n) begin // shift register / 8bit data packager
62+ always_ff @ (posedge clk or posedge ! rst_n) begin // shift register / 8bit data packager
6363 if (! rst_n) begin
6464 counter <= 4'b0 ;
6565 ro_data <= 8'b0 ;
0 commit comments