mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
feat(rtl): migrate CAM interface to handshake protocol with integrated noise generation
BREAKING CHANGE: CAM write and query interface replaced with standard valid/ready handshake. wr_en/wr_row/wr_hash → wr_valid/wr_ready/wr_addr/write_hash. External noise_mask_lanes_flat removed; noise generation now handled internally by cam_noisy module with configurable rate via parameters. - cam_top: add parameters (NOISE_EN, NOISE_RATE_NUM/DEN, NOISE_GEN/SAMPLE_BITS, NOISE_SEED) - cam_top: replace cam_core with cam_noisy (integrated noise generation) - match_engine: remove external noise_mask_lanes_flat input - hw/sim: update Makefile with noise parameters and compile args - hw/sim/model: add generate_write_flip_mask() and xorshift64() matching RTL behavior - hw/sim/tests: adapt testbench to new handshake protocol
This commit is contained in:
@@ -16,9 +16,6 @@ module match_engine (
|
||||
// To/from cam_core
|
||||
output logic [(`LANES)*(`ROW_BITS)-1:0] rd_addr_lanes_flat,
|
||||
input logic [(`LANES)*(`HASH_BITS)-1:0] rd_hash_lanes_flat
|
||||
`ifdef SIM_NOISE
|
||||
,input logic [(`LANES)*(`HASH_BITS)-1:0] noise_mask_lanes_flat
|
||||
`endif
|
||||
`ifdef SIM_DEBUG
|
||||
,output logic [(`NUM_ROWS)*(`SCORE_BITS)-1:0] score_debug_flat
|
||||
`endif
|
||||
@@ -68,11 +65,7 @@ module match_engine (
|
||||
assign rd_addr_lanes_flat[lane*`ROW_BITS +: `ROW_BITS] = lane_row[lane];
|
||||
assign row_hash = rd_hash_lanes_flat[lane*`HASH_BITS +: `HASH_BITS];
|
||||
|
||||
`ifdef SIM_NOISE
|
||||
assign effective_hash = row_hash ^ noise_mask_lanes_flat[lane*`HASH_BITS +: `HASH_BITS];
|
||||
`else
|
||||
assign effective_hash = row_hash;
|
||||
`endif
|
||||
|
||||
assign match_bits = ~(query_q ^ effective_hash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user