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

Subversion Repositories i650

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

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 9 eightycc
`include "defines.v"
35 7 eightycc
 
36
module ram_band_addr (
37 9 eightycc
   input [0:6] addr_th, addr_h, addr_t,
38 7 eightycc
   output reg  [0:14] origin
39
   );
40
 
41
   always @(*) begin
42 9 eightycc
      case ({addr_th[`biq_q1], addr_h, addr_t[`biq_b5]})
43 7 eightycc
         9'b0_01_00001_0: origin = 15'd0;
44
         9'b0_01_00001_1: origin = 15'd600;
45
         9'b0_01_00010_0: origin = 15'd1200;
46
         9'b0_01_00010_1: origin = 15'd1800;
47
         9'b0_01_00100_0: origin = 15'd2400;
48
         9'b0_01_00100_1: origin = 15'd3000;
49
         9'b0_01_01000_0: origin = 15'd3600;
50
         9'b0_01_01000_1: origin = 15'd4200;
51
         9'b0_01_10000_0: origin = 15'd4800;
52
         9'b0_01_10000_1: origin = 15'd5400;
53
 
54
         9'b0_10_00001_0: origin = 15'd6000;
55
         9'b0_10_00001_1: origin = 15'd6600;
56
         9'b0_10_00010_0: origin = 15'd7200;
57
         9'b0_10_00010_1: origin = 15'd7800;
58
         9'b0_10_00100_0: origin = 15'd8400;
59
         9'b0_10_00100_1: origin = 15'd9000;
60
         9'b0_10_01000_0: origin = 15'd9600;
61
         9'b0_10_01000_1: origin = 15'd10200;
62
         9'b0_10_10000_0: origin = 15'd10800;
63
         9'b0_10_10000_1: origin = 15'd11400;
64
 
65
         9'b1_01_00001_0: origin = 15'd12000;
66
         9'b1_01_00001_1: origin = 15'd12600;
67
         9'b1_01_00010_0: origin = 15'd13200;
68
         9'b1_01_00010_1: origin = 15'd13800;
69
         9'b1_01_00100_0: origin = 15'd14400;
70
         9'b1_01_00100_1: origin = 15'd15000;
71
         9'b1_01_01000_0: origin = 15'd15600;
72
         9'b1_01_01000_1: origin = 15'd16200;
73
         9'b1_01_10000_0: origin = 15'd16800;
74
         9'b1_01_10000_1: origin = 15'd17400;
75
 
76
         9'b1_10_00001_0: origin = 15'd18000;
77
         9'b1_10_00001_1: origin = 15'd18600;
78
         9'b1_10_00010_0: origin = 15'd19200;
79
         9'b1_10_00010_1: origin = 15'd19800;
80
         9'b1_10_00100_0: origin = 15'd20400;
81
         9'b1_10_00100_1: origin = 15'd21000;
82
         9'b1_10_01000_0: origin = 15'd21600;
83
         9'b1_10_01000_1: origin = 15'd22200;
84
         9'b1_10_10000_0: origin = 15'd22800;
85
         9'b1_10_10000_1: origin = 15'd23400;
86
 
87
         default:      origin = 15'd0;
88
      endcase;
89
   end;
90
 
91
endmodule

powered by: WebSVN 2.1.0

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