mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
feat(cam): migrate noise generation from xorshift64 to xorshift128
- Replace NOISE_GEN_BITS/NOISE_SAMPLE_BITS parameters with unified NOISE_BITS
- Use xorshift128 (random128) instead of xorshift64 for PRNG
- Add flip_mask_next combinational helper for single-cycle mask computation
- Add random_enable signal to advance PRNG only on accepted noisy writes
- Simplify FSM by removing mask_group_idx counter
- Update parameter validation: GROUP_BITS (= HASH_BITS/NOISE_BITS) must equal 64
- Update ref_model.py and tests to match new seed convention: {seed, seed}
- Update Makefile and sweep_noise.py with renamed parameters
This commit is contained in:
@@ -5,8 +5,7 @@ module cam_top #(
|
||||
parameter bit NOISE_EN = 1'b1,
|
||||
parameter int NOISE_RATE_NUM = 1,
|
||||
parameter int NOISE_RATE_DEN = 100,
|
||||
parameter int NOISE_GEN_BITS = 8,
|
||||
parameter int NOISE_SAMPLE_BITS = 8,
|
||||
parameter int NOISE_BITS = 8,
|
||||
parameter logic [63:0] NOISE_SEED = 64'hB504_F32D_B504_F32D
|
||||
) (
|
||||
input logic clk,
|
||||
@@ -63,8 +62,7 @@ module cam_top #(
|
||||
.NOISE_EN (NOISE_EN),
|
||||
.NOISE_RATE_NUM (NOISE_RATE_NUM),
|
||||
.NOISE_RATE_DEN (NOISE_RATE_DEN),
|
||||
.NOISE_GEN_BITS (NOISE_GEN_BITS),
|
||||
.NOISE_SAMPLE_BITS (NOISE_SAMPLE_BITS),
|
||||
.NOISE_BITS (NOISE_BITS),
|
||||
.NOISE_SEED (NOISE_SEED)
|
||||
) u_noisy (
|
||||
.clk (clk),
|
||||
|
||||
Reference in New Issue
Block a user