aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/rosc_entropy_core.v19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rtl/rosc_entropy_core.v b/src/rtl/rosc_entropy_core.v
index eb9dd6e..cd70f8a 100644
--- a/src/rtl/rosc_entropy_core.v
+++ b/src/rtl/rosc_entropy_core.v
@@ -60,9 +60,10 @@ module rosc_entropy_core(
//----------------------------------------------------------------
// Parameters.
//----------------------------------------------------------------
- parameter DEBUG_DELAY = 32'h002c4b40;
- parameter NUM_SHIFT_BITS = 8'h20;
- parameter SAMPLE_CLK_CYCLES = 8'hff;
+ localparam ADDER_WIDTH = 1;
+ localparam DEBUG_DELAY = 32'h002c4b40;
+ localparam NUM_SHIFT_BITS = 8'h20;
+ localparam SAMPLE_CLK_CYCLES = 8'hff;
//----------------------------------------------------------------
@@ -123,18 +124,20 @@ module rosc_entropy_core(
//----------------------------------------------------------------
// module instantiations.
//
- // 32 1-bit wide oscillators. We want them to run as fast as
- // possible to maximize differences over time.
+ // 32 oscillators each ADDER_WIDTH wide. We want them to run
+ // as fast as possible to maximize differences over time.
+ // We also only sample the oscillators SAMPLE_CLK_CYCLES number
+ // of cycles.
//----------------------------------------------------------------
genvar i;
generate
for(i = 0 ; i < 32 ; i = i + 1)
begin: oscillators
- rosc #(.WIDTH(1)) rosc_array(.clk(clk),
+ rosc #(.WIDTH(ADDER_WIDTH)) rosc_array(.clk(clk),
.we(rosc_we),
.reset_n(reset_n),
- .opa(opa),
- .opb(opb),
+ .opa(opa[(ADDER_WIDTH - 1) : 0]),
+ .opb(opb[(ADDER_WIDTH - 1) : 0]),
.dout(rosc_dout[i])
);
end