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

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [ram_band_addr.v] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 eightycc
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// IBM 650 Reconstruction in Verilog (i650)
4
// 
5
// This file is part of the IBM 650 Reconstruction in Verilog (i650) project
6
// http:////www.opencores.org/project,i650
7
//
8
// Description:
9
//   Convert "static" portion of a 650 address into a binary origin that is a
10
//   multiple of 600. Used to address RAM representing general storage. In the
11
//   real 650 this would be the band address which would select a band of five
12
//   drum tracks.
13
// 
14
// Additional Comments: 
15
//
16
// Copyright (c) 2015 Robert Abeles
17
//
18
// This source file is free software; you can redistribute it
19
// and/or modify it under the terms of the GNU Lesser General
20
// Public License as published by the Free Software Foundation;
21
// either version 2.1 of the License, or (at your option) any
22
// later version.
23
//
24
// This source is distributed in the hope that it will be
25
// useful, but WITHOUT ANY WARRANTY; without even the implied
26
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
27
// PURPOSE.  See the GNU Lesser General Public License for more
28
// details.
29
//
30
// You should have received a copy of the GNU Lesser General
31
// Public License along with this source; if not, download it
32
// from http://www.opencores.org/lgpl.shtml
33
//////////////////////////////////////////////////////////////////////////////////
34
 
35
module ram_band_addr (
36
   input       addr_th_q1,
37
   input [0:6] addr_h,
38
   input       addr_t_b5,
39
   output reg  [0:14] origin
40
   );
41
 
42
   always @(*) begin
43
      case({addr_th_q1, addr_h, addr_t_b5})
44
         9'b0_01_00001_0: origin = 15'd0;
45
         9'b0_01_00001_1: origin = 15'd600;
46
         9'b0_01_00010_0: origin = 15'd1200;
47
         9'b0_01_00010_1: origin = 15'd1800;
48
         9'b0_01_00100_0: origin = 15'd2400;
49
         9'b0_01_00100_1: origin = 15'd3000;
50
         9'b0_01_01000_0: origin = 15'd3600;
51
         9'b0_01_01000_1: origin = 15'd4200;
52
         9'b0_01_10000_0: origin = 15'd4800;
53
         9'b0_01_10000_1: origin = 15'd5400;
54
 
55
         9'b0_10_00001_0: origin = 15'd6000;
56
         9'b0_10_00001_1: origin = 15'd6600;
57
         9'b0_10_00010_0: origin = 15'd7200;
58
         9'b0_10_00010_1: origin = 15'd7800;
59
         9'b0_10_00100_0: origin = 15'd8400;
60
         9'b0_10_00100_1: origin = 15'd9000;
61
         9'b0_10_01000_0: origin = 15'd9600;
62
         9'b0_10_01000_1: origin = 15'd10200;
63
         9'b0_10_10000_0: origin = 15'd10800;
64
         9'b0_10_10000_1: origin = 15'd11400;
65
 
66
         9'b1_01_00001_0: origin = 15'd12000;
67
         9'b1_01_00001_1: origin = 15'd12600;
68
         9'b1_01_00010_0: origin = 15'd13200;
69
         9'b1_01_00010_1: origin = 15'd13800;
70
         9'b1_01_00100_0: origin = 15'd14400;
71
         9'b1_01_00100_1: origin = 15'd15000;
72
         9'b1_01_01000_0: origin = 15'd15600;
73
         9'b1_01_01000_1: origin = 15'd16200;
74
         9'b1_01_10000_0: origin = 15'd16800;
75
         9'b1_01_10000_1: origin = 15'd17400;
76
 
77
         9'b1_10_00001_0: origin = 15'd18000;
78
         9'b1_10_00001_1: origin = 15'd18600;
79
         9'b1_10_00010_0: origin = 15'd19200;
80
         9'b1_10_00010_1: origin = 15'd19800;
81
         9'b1_10_00100_0: origin = 15'd20400;
82
         9'b1_10_00100_1: origin = 15'd21000;
83
         9'b1_10_01000_0: origin = 15'd21600;
84
         9'b1_10_01000_1: origin = 15'd22200;
85
         9'b1_10_10000_0: origin = 15'd22800;
86
         9'b1_10_10000_1: origin = 15'd23400;
87
 
88
         default:      origin = 15'd0;
89
      endcase;
90
   end;
91
 
92
endmodule

powered by: WebSVN 2.1.0

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