OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fpga/] [experiments/] [memdelay/] [ram.v] - Diff between revs 297 and 300

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 297 Rev 300
Line 53... Line 53...
      counter[3:0] <= 4'h0;
      counter[3:0] <= 4'h0;
    end else begin
    end else begin
      if (counter[3:0] == 4'h0) begin
      if (counter[3:0] == 4'h0) begin
        if (stb & ~we) begin
        if (stb & ~we) begin
          // a read may need some clock cycles
          // a read may need some clock cycles
          counter <= `RD_CYCLES - 1;
          counter[3:0] <= `RD_CYCLES - 1;
        end
        end
        if (stb & we) begin
        if (stb & we) begin
          // a write may need some clock cycles
          // a write may need some clock cycles
          counter <= `WR_CYCLES - 1;
          counter[3:0] <= `WR_CYCLES - 1;
        end
        end
      end else begin
      end else begin
        counter[3:0] <= counter[3:0] - 1;
        counter[3:0] <= counter[3:0] - 1;
      end
      end
    end
    end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.