1 |
2 |
trurl |
-------------------------------------------------------------------
|
2 |
|
|
--!
|
3 |
|
|
--! PDP-8 Processor
|
4 |
|
|
--!
|
5 |
|
|
--! \brief
|
6 |
|
|
--! RK05 Disk Simulation Type Definitions
|
7 |
|
|
--!
|
8 |
|
|
--! \details
|
9 |
|
|
--! This package contains all the type information that is
|
10 |
|
|
--! required to use the RK05 Disk Drive simulator package.
|
11 |
|
|
--!
|
12 |
|
|
--! \file
|
13 |
|
|
--! rk05_types.vhd
|
14 |
|
|
--!
|
15 |
|
|
--! \author
|
16 |
|
|
--! Rob Doyle - doyle (at) cox (dot) net
|
17 |
|
|
--!
|
18 |
|
|
--------------------------------------------------------------------
|
19 |
|
|
--
|
20 |
|
|
-- Copyright (C) 2011, 2012 Rob Doyle
|
21 |
|
|
--
|
22 |
|
|
-- This source file may be used and distributed without
|
23 |
|
|
-- restriction provided that this copyright statement is not
|
24 |
|
|
-- removed from the file and that any derivative work contains
|
25 |
|
|
-- the original copyright notice and the associated disclaimer.
|
26 |
|
|
--
|
27 |
|
|
-- This source file is free software; you can redistribute it
|
28 |
|
|
-- and/or modify it under the terms of the GNU Lesser General
|
29 |
|
|
-- Public License as published by the Free Software Foundation;
|
30 |
|
|
-- version 2.1 of the License.
|
31 |
|
|
--
|
32 |
|
|
-- This source is distributed in the hope that it will be
|
33 |
|
|
-- useful, but WITHOUT ANY WARRANTY; without even the implied
|
34 |
|
|
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
35 |
|
|
-- PURPOSE. See the GNU Lesser General Public License for more
|
36 |
|
|
-- details.
|
37 |
|
|
--
|
38 |
|
|
-- You should have received a copy of the GNU Lesser General
|
39 |
|
|
-- Public License along with this source; if not, download it
|
40 |
|
|
-- from http://www.gnu.org/licenses/lgpl.txt
|
41 |
|
|
--
|
42 |
|
|
--------------------------------------------------------------------
|
43 |
|
|
--
|
44 |
|
|
-- Comments are formatted for doxygen
|
45 |
|
|
--
|
46 |
|
|
|
47 |
|
|
library ieee;
|
48 |
|
|
use ieee.std_logic_1164.all;
|
49 |
|
|
use ieee.numeric_std.all;
|
50 |
|
|
use work.sd_types.all;
|
51 |
|
|
use work.cpu_types.all;
|
52 |
|
|
|
53 |
|
|
--
|
54 |
|
|
--! RK05 Disk Simulation Type Definitions Package
|
55 |
|
|
--
|
56 |
|
|
|
57 |
|
|
package rk05_types is
|
58 |
|
|
|
59 |
|
|
subtype rk05CYL_t is std_logic_vector(0 to 7); --! RK05 Cylinder Number
|
60 |
|
|
subtype rk05SECT_t is std_logic_vector(0 to 3); --! RK05 Sector Number
|
61 |
|
|
subtype rk05HEAD_t is std_logic; --! RK05 Head Number
|
62 |
|
|
subtype rk05DRIVE_t is std_logic_vector(0 to 1); --! RK05 Drive Number
|
63 |
|
|
subtype rk05WRINH_t is std_logic; --! Write Inhibit
|
64 |
|
|
subtype rk05MNT_t is std_logic; --! Mounted
|
65 |
|
|
subtype rk05LEN_t is std_logic; --! 128/256 word access
|
66 |
|
|
subtype rk05RECAL_t is std_logic; --! Recalibrate
|
67 |
|
|
subtype rk05drvNUM_t is integer range -1 to 3; --! Drive Array Index
|
68 |
|
|
|
69 |
|
|
constant DRIVE0 : rk05drvNUM_t := 0; --! Drive 0 Index
|
70 |
|
|
constant DRIVE1 : rk05drvNUM_t := 1; --! Drive 1 Index
|
71 |
|
|
constant DRIVE2 : rk05drvNUM_t := 2; --! Drive 2 Index
|
72 |
|
|
constant DRIVE3 : rk05drvNUM_t := 3; --! Drive 3 Index
|
73 |
|
|
constant DRIVENULL : rk05drvNUM_t := -1; --! Drive 4 (not valid)
|
74 |
|
|
|
75 |
|
|
--!
|
76 |
|
|
--! RK05 Op
|
77 |
|
|
--!
|
78 |
|
|
|
79 |
|
|
type rk05OP_t is (rk05opNOP,
|
80 |
|
|
rk05opCLR,
|
81 |
|
|
rk05opRECAL,
|
82 |
|
|
rk05opSEEK,
|
83 |
|
|
rk05opWRPROT,
|
84 |
|
|
rk05opREAD,
|
85 |
|
|
rk05opWRITE);
|
86 |
|
|
|
87 |
|
|
--!
|
88 |
|
|
--! RK05 State
|
89 |
|
|
--!
|
90 |
|
|
|
91 |
|
|
type rk05STATE_t is (rk05stIDLE,
|
92 |
|
|
rk05stBUSY,
|
93 |
|
|
rk05stDONE);
|
94 |
|
|
|
95 |
|
|
--!
|
96 |
|
|
--! RK05 Status
|
97 |
|
|
--!
|
98 |
|
|
|
99 |
|
|
type rk05STAT_t is record
|
100 |
|
|
active : std_logic; --! Disk Activity (one-shot)
|
101 |
|
|
state : rk05STATE_t; --! Controller State
|
102 |
|
|
mounted : rk05MNT_t; --! Mounted
|
103 |
|
|
recal : rk05RECAL_t; --! Recalibrate
|
104 |
|
|
wrinh : rk05WRINH_t; --! Write Inhibit
|
105 |
|
|
sdOP : sdOP_t; --! OP
|
106 |
|
|
sdLEN : sdLEN_t; --! 128/256 word access
|
107 |
|
|
sdMEMaddr : addr_t; --! Memory Address
|
108 |
|
|
sdDISKaddr : sdDISKaddr_t; --! Linear Disk Address
|
109 |
|
|
end record;
|
110 |
|
|
|
111 |
|
|
--!
|
112 |
|
|
--! Disk Array Types
|
113 |
|
|
--!
|
114 |
|
|
|
115 |
|
|
type rk05OP_tt is array(0 to 3) of rk05OP_t; --! Array of RK05 OPs
|
116 |
|
|
type rk05STAT_tt is array(0 to 3) of rk05STAT_t; --! Array of RK05 Status
|
117 |
|
|
|
118 |
|
|
end rk05_types;
|