Sfoglia il codice sorgente

cores/e1: Minor synth improvement on CRC core

Writing the condition like this prevents yosys from creating a Set/Reset
FF which can improve packing (avoid a different control set)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 5 anni fa
parent
commit
f147c005db
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      cores/e1/rtl/e1_crc4.v

+ 1 - 1
cores/e1/rtl/e1_crc4.v

@@ -49,7 +49,7 @@ module e1_crc4 #(
 	wire [3:0] state_fb_mux;
 	wire [3:0] state_upd_mux;
 
-	assign state_fb_mux  = in_first ? INIT : state;
+	assign state_fb_mux  = (INIT & {4{in_first}}) | (state & {4{~in_first}}); // in_first ? INIT : state
 	assign state_upd_mux = (state_fb_mux[3] != in_bit) ? POLY : 0;
 
 	always @(posedge clk)