Explorar el Código

Cleanup extra block code that looks ugly

Matt Coles hace 8 años
padre
commit
b4cbffd573
Se han modificado 1 ficheros con 4 adiciones y 12 borrados
  1. 4 12
      simple_fifo.v

+ 4 - 12
simple_fifo.v

33
     if (push & ~full) begin
33
     if (push & ~full) begin
34
       data[wr_ptr] <= data_in;
34
       data[wr_ptr] <= data_in;
35
       wr_ptr = wr_ptr + 1;
35
       wr_ptr = wr_ptr + 1;
36
-      if (wr_ptr == rd_ptr) begin
37
-        full <= 1'b1;
38
-      end
39
-      else begin
40
-        empty <= 1'b0;
41
-      end
36
+      if (wr_ptr == rd_ptr) full <= 1'b1;
37
+      else empty <= 1'b0;
42
     end
38
     end
43
     if (pop & ~empty) begin
39
     if (pop & ~empty) begin
44
       data_out <= data[rd_ptr];
40
       data_out <= data[rd_ptr];
45
       rd_ptr = rd_ptr + 1;
41
       rd_ptr = rd_ptr + 1;
46
-      if (wr_ptr == rd_ptr) begin
47
-        empty <= 1'b1;
48
-      end
49
-      else begin
50
-        full <= 1'b0;
51
-      end
42
+      if (wr_ptr == rd_ptr) empty <= 1'b1;
43
+      else full <= 1'b0;
52
     end
44
     end
53
   end
45
   end
54
 end
46
 end