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

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [ram_word_offset.v] - Diff between revs 8 and 9

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

Rev 8 Rev 9
Line 30... Line 30...
// from http://www.opencores.org/lgpl.shtml
// from http://www.opencores.org/lgpl.shtml
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
 
 
module ram_word_offset (
module ram_word_offset (
   input [0:6] addr_t, addr_u,
   input [0:6] addr_t, addr_u,
   output reg  [0:14] offset
   output reg  [0:9] offset
   );
   );
 
 
   always @(*) begin
   always @(*) begin
      case({addr_t[2:6], addr_u})
      case({addr_t[2:6], addr_u})
         12'b00001_01_00001: offset = 15'd0;
         12'b00001_01_00001: offset = 10'd0;
         12'b00001_01_00010: offset = 15'd12;
         12'b00001_01_00010: offset = 10'd12;
         12'b00001_01_00100: offset = 15'd24;
         12'b00001_01_00100: offset = 10'd24;
         12'b00001_01_01000: offset = 15'd36;
         12'b00001_01_01000: offset = 10'd36;
         12'b00001_01_10000: offset = 15'd48;
         12'b00001_01_10000: offset = 10'd48;
         12'b00001_10_00001: offset = 15'd60;
         12'b00001_10_00001: offset = 10'd60;
         12'b00001_10_00010: offset = 15'd72;
         12'b00001_10_00010: offset = 10'd72;
         12'b00001_10_00100: offset = 15'd84;
         12'b00001_10_00100: offset = 10'd84;
         12'b00001_10_01000: offset = 15'd96;
         12'b00001_10_01000: offset = 10'd96;
         12'b00001_10_10000: offset = 15'd108;
         12'b00001_10_10000: offset = 10'd108;
 
 
         12'b00010_01_00001: offset = 15'd120;
         12'b00010_01_00001: offset = 10'd120;
         12'b00010_01_00010: offset = 15'd132;
         12'b00010_01_00010: offset = 10'd132;
         12'b00010_01_00100: offset = 15'd144;
         12'b00010_01_00100: offset = 10'd144;
         12'b00010_01_01000: offset = 15'd156;
         12'b00010_01_01000: offset = 10'd156;
         12'b00010_01_10000: offset = 15'd168;
         12'b00010_01_10000: offset = 10'd168;
         12'b00010_10_00001: offset = 15'd180;
         12'b00010_10_00001: offset = 10'd180;
         12'b00010_10_00010: offset = 15'd192;
         12'b00010_10_00010: offset = 10'd192;
         12'b00010_10_00100: offset = 15'd204;
         12'b00010_10_00100: offset = 10'd204;
         12'b00010_10_01000: offset = 15'd216;
         12'b00010_10_01000: offset = 10'd216;
         12'b00010_10_10000: offset = 15'd228;
         12'b00010_10_10000: offset = 10'd228;
 
 
         12'b00100_01_00001: offset = 15'd240;
         12'b00100_01_00001: offset = 10'd240;
         12'b00100_01_00010: offset = 15'd252;
         12'b00100_01_00010: offset = 10'd252;
         12'b00100_01_00100: offset = 15'd264;
         12'b00100_01_00100: offset = 10'd264;
         12'b00100_01_01000: offset = 15'd276;
         12'b00100_01_01000: offset = 10'd276;
         12'b00100_01_10000: offset = 15'd288;
         12'b00100_01_10000: offset = 10'd288;
         12'b00100_10_00001: offset = 15'd300;
         12'b00100_10_00001: offset = 10'd300;
         12'b00100_10_00010: offset = 15'd312;
         12'b00100_10_00010: offset = 10'd312;
         12'b00100_10_00100: offset = 15'd324;
         12'b00100_10_00100: offset = 10'd324;
         12'b00100_10_01000: offset = 15'd336;
         12'b00100_10_01000: offset = 10'd336;
         12'b00100_10_10000: offset = 15'd348;
         12'b00100_10_10000: offset = 10'd348;
 
 
         12'b01000_01_00001: offset = 15'd360;
         12'b01000_01_00001: offset = 10'd360;
         12'b01000_01_00010: offset = 15'd372;
         12'b01000_01_00010: offset = 10'd372;
         12'b01000_01_00100: offset = 15'd384;
         12'b01000_01_00100: offset = 10'd384;
         12'b01000_01_01000: offset = 15'd396;
         12'b01000_01_01000: offset = 10'd396;
         12'b01000_01_10000: offset = 15'd408;
         12'b01000_01_10000: offset = 10'd408;
         12'b01000_10_00001: offset = 15'd420;
         12'b01000_10_00001: offset = 10'd420;
         12'b01000_10_00010: offset = 15'd432;
         12'b01000_10_00010: offset = 10'd432;
         12'b01000_10_00100: offset = 15'd444;
         12'b01000_10_00100: offset = 10'd444;
         12'b01000_10_01000: offset = 15'd456;
         12'b01000_10_01000: offset = 10'd456;
         12'b01000_10_10000: offset = 15'd468;
         12'b01000_10_10000: offset = 10'd468;
 
 
         12'b10000_01_00001: offset = 15'd480;
         12'b10000_01_00001: offset = 10'd480;
         12'b10000_01_00010: offset = 15'd492;
         12'b10000_01_00010: offset = 10'd492;
         12'b10000_01_00100: offset = 15'd504;
         12'b10000_01_00100: offset = 10'd504;
         12'b10000_01_01000: offset = 15'd516;
         12'b10000_01_01000: offset = 10'd516;
         12'b10000_01_10000: offset = 15'd528;
         12'b10000_01_10000: offset = 10'd528;
         12'b10000_10_00001: offset = 15'd540;
         12'b10000_10_00001: offset = 10'd540;
         12'b10000_10_00010: offset = 15'd552;
         12'b10000_10_00010: offset = 10'd552;
         12'b10000_10_00100: offset = 15'd564;
         12'b10000_10_00100: offset = 10'd564;
         12'b10000_10_01000: offset = 15'd576;
         12'b10000_10_01000: offset = 10'd576;
         12'b10000_10_10000: offset = 15'd588;
         12'b10000_10_10000: offset = 10'd588;
 
 
         default:      offset = 15'd0;
         default:      offset = 15'd0;
      endcase;
      endcase;
   end;
   end;
 
 

powered by: WebSVN 2.1.0

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