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

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [gen_store.v] - Diff between revs 11 and 12

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

Rev 11 Rev 12
Line 46... Line 46...
   );
   );
 
 
   reg [0:4] gs_mem [0:32767];   // Rounded size up from 24000 to next 2^n. 
   reg [0:4] gs_mem [0:32767];   // Rounded size up from 24000 to next 2^n. 
 
 
   //-----------------------------------------------------------------------------
   //-----------------------------------------------------------------------------
   // 
   // Calculate the early (next digit) and on-time RAM addresses. Console read
 
   // and write are implementation extensions.
   //-----------------------------------------------------------------------------
   //-----------------------------------------------------------------------------
   wire [0:14] band_addr, gs_addr, gs_addr_early;
   wire [0:14] band_addr, gs_addr, gs_addr_early;
   ram_band_addr rba(addr_th, addr_h, addr_t, band_addr);
   ram_band_addr rba(addr_th, addr_h, addr_t, band_addr);
   wire console_acc = console_read_gs | console_write_gs;
   wire console_acc = console_read_gs | console_write_gs;
   assign gs_addr = console_acc? console_ram_addr : (band_addr + dynamic_addr);
   assign gs_addr = console_acc? console_ram_addr : (band_addr + dynamic_addr);
   assign gs_addr_early = console_acc? console_ram_addr
   // The % operator fixes a spurious warning from XST synthesis due to use of a
                        : (band_addr + ((dynamic_addr + 1) % 600)) % 32768;
   // 32-bit mux for ? operator. Uses no gates. 
 
   assign gs_addr_early = (console_acc? console_ram_addr
 
                        : (band_addr + ((dynamic_addr + 1) % 600))) % 32768;
 
 
 
   //-----------------------------------------------------------------------------
 
   // These 650 write errors are not possible for this implementation.
 
   //-----------------------------------------------------------------------------
   assign double_write = 0;
   assign double_write = 0;
   assign no_write = 0;
   assign no_write = 0;
 
 
 
   //-----------------------------------------------------------------------------
 
   // A : Read from RAM at on-time address.
 
   //-----------------------------------------------------------------------------
   always @(posedge ap) begin
   always @(posedge ap) begin
      if (rst) begin
      if (rst) begin
         gs_out <= `biq_blank;
         gs_out <= `biq_blank;
      end else begin
      end else begin
         gs_out <= gs_mem[gs_addr];
         gs_out <= gs_mem[gs_addr];
      end
      end
   end;
   end;
 
 
 
   //-----------------------------------------------------------------------------
 
   // D : Write to RAM at early address.
 
   //-----------------------------------------------------------------------------
   always @(posedge dp) begin
   always @(posedge dp) begin
      if (write_gate)
      if (write_gate)
         gs_mem[gs_addr_early] <= gs_in;
         gs_mem[gs_addr_early] <= gs_in;
   end;
   end;
 
 

powered by: WebSVN 2.1.0

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