aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2014-08-27 18:23:26 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2014-08-27 18:23:26 +0200
commit60572e981b333d407360bac64a6813586ac281b2 (patch)
treefa4fe6c59f23d729e207ac74d37dcbc5be3247ac
parent2fc429621ecbe36478a7fc415fd7c54936ff2a6f (diff)
Fixing synthesis warnings.
-rw-r--r--src/rtl/external_avalanche_entropy.v24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/rtl/external_avalanche_entropy.v b/src/rtl/external_avalanche_entropy.v
index 3f1c3f9..a5b6881 100644
--- a/src/rtl/external_avalanche_entropy.v
+++ b/src/rtl/external_avalanche_entropy.v
@@ -61,7 +61,8 @@ module external_avalanche_entropy(
input wire entropy_read,
output wire entropy_ready,
output wire [31 : 0] entropy_data,
- output wire [7 : 0] debug
+ output wire [7 : 0] debug,
+ output wire [7 : 0] debug2
);
@@ -149,6 +150,7 @@ module external_avalanche_entropy(
assign entropy_ready = entropy_ready_reg;
assign entropy_data = entropy_reg;
assign debug = debug_reg;
+ assign debug2 = debug_reg;
assign read_data = tmp_read_data;
assign error = tmp_error;
@@ -189,7 +191,7 @@ module external_avalanche_entropy(
entropy_ready_reg <= entropy_ready_new;
cycle_ctr_reg <= cycle_ctr_reg + 1'b1;
- seconds_ctr_reg <= cycle_ctr_reg + 1'b1;
+ seconds_ctr_reg <= cycle_ctr_new;
debug_ctr_reg <= debug_ctr_new;
if (bit_ctr_we)
@@ -318,16 +320,28 @@ module external_avalanche_entropy(
negflank_ctr_new = 32'h00000000;
negflank_ctr_we = 1'b0;
+ if (posflank_ctr_rst)
+ begin
+ posflank_ctr_new = 32'h00000000;
+ posflank_ctr_we = 1'b1;
+ end
+
+ if (negflank_ctr_rst)
+ begin
+ negflank_ctr_new = 32'h00000000;
+ negflank_ctr_we = 1'b1;
+ end
+
if ((flank0_reg) && (!flank1_reg))
begin
posflank_ctr_new = posflank_ctr_reg + 1'b1;
- posflank_ctr_we = 1'b0;
+ posflank_ctr_we = 1'b1;
end
if ((!flank0_reg) && (flank1_reg))
begin
negflank_ctr_new = negflank_ctr_reg + 1'b1;
- negflank_ctr_we = 1'b0;
+ negflank_ctr_we = 1'b1;
end
end // flank_counters
@@ -351,7 +365,7 @@ module external_avalanche_entropy(
if (seconds_ctr_reg == SECONDS_RATE)
begin
- seconds_ctr_new = 32'h00000000;
+ seconds_ctr_new = 32'h00000000;
posflank_sample_new = posflank_ctr_reg;
negflank_sample_new = negflank_ctr_reg;
totflank_sample_new = posflank_ctr_reg + negflank_ctr_reg;