Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / dev / usb-devices / combined / name.fth
CommitLineData
920dae64
AT
1\ ========== Copyright Header Begin ==========================================
2\
3\ Hypervisor Software File: name.fth
4\
5\ Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
6\
7\ - Do no alter or remove copyright notices
8\
9\ - Redistribution and use of this software in source and binary forms, with
10\ or without modification, are permitted provided that the following
11\ conditions are met:
12\
13\ - Redistribution of source code must retain the above copyright notice,
14\ this list of conditions and the following disclaimer.
15\
16\ - Redistribution in binary form must reproduce the above copyright notice,
17\ this list of conditions and the following disclaimer in the
18\ documentation and/or other materials provided with the distribution.
19\
20\ Neither the name of Sun Microsystems, Inc. or the names of contributors
21\ may be used to endorse or promote products derived from this software
22\ without specific prior written permission.
23\
24\ This software is provided "AS IS," without a warranty of any kind.
25\ ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
26\ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
27\ PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
28\ MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
29\ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
30\ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
31\ OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
32\ FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
33\ DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
34\ ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
35\ SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
36\
37\ You acknowledge that this software is not designed, licensed or
38\ intended for use in the design, construction, operation or maintenance of
39\ any nuclear facility.
40\
41\ ========== Copyright Header End ============================================
42id: @(#)name.fth 1.3 00/07/12
43purpose:
44copyright: Copyright 1998, 2000 Sun Microsystems, Inc. All Rights Reserved
45
46: name-prop ( addr len -- ) encode-string " name" property ;
47
48: cm-name ( -- ) " communications" name-prop ;
49
50: hub-name ( -- ) " hub" name-prop ;
51
52: device-name ( -- ) " device" name-prop ;
53
54: create-device-name ( dev-descrip-addr -- )
55 dup d-descript-class c@
56 case 2 of cm-name endof
57 9 of hub-name endof
58 device-name \ default
59 endcase drop
60;
61
62: snd-ctrl-name ( -- ) " sound-control" name-prop ;
63
64: sound-name ( -- ) " sound" name-prop ;
65
66: midi-name ( -- ) " midi" name-prop ;
67
68: audio-name ( int-descrip-addr -- int-descrip-addr )
69 dup i-descript-sub c@
70 case 1 of snd-ctrl-name endof
71 2 of sound-name endof
72 3 of midi-name endof
73 sound-name
74 endcase
75;
76
77: line-name ( -- ) " line" name-prop ;
78
79: modem-name ( -- ) " modem" name-prop ;
80
81: tele-name ( -- ) " telephone" name-prop ;
82
83: isdn-name ( -- ) " isdn" name-prop ;
84
85: ether-name ( -- ) " ethernet" name-prop ;
86
87: atm-name ( -- ) " atm-network" name-prop ;
88
89: control-name ( -- ) " control" name-prop ;
90
91: comm-name ( int-descrip-addr -- int-descrip-addr )
92 dup i-descript-sub c@
93 case 1 of line-name endof
94 2 of modem-name endof
95 3 of tele-name endof
96 4 of isdn-name endof
97 5 of isdn-name endof
98 6 of ether-name endof
99 7 of atm-name endof
100 control-name
101 endcase
102;
103
104: kbd-name ( -- ) " keyboard" name-prop ;
105
106: mse-name ( -- ) " mouse" name-prop ;
107
108: input-name ( -- ) " input" name-prop ;
109
110: kbd-mse-name ( int-descrip-addr -- int-descrip-addr )
111 dup i-descript-sub c@ 1 <> if input-name exit then
112 dup i-descript-protocol c@
113 case 1 of kbd-name endof
114 2 of mse-name endof
115 input-name
116 endcase
117;
118
119: phys-name ( -- ) " physical" name-prop ;
120
121: printer-name ( -- ) " printer" name-prop ;
122
123: storage-name ( -- ) " storage" name-prop ;
124
125: data-name ( -- ) " data" name-prop ;
126
127: security-name ( -- ) " security" name-prop ;
128
129: firm-name ( -- ) " firmware" name-prop ;
130
131: irda-name ( -- ) " IrDA" name-prop ;
132
133: app-name ( int-descrip-addr -- int-descrip-addr )
134 dup i-descript-sub c@
135 case 1 of firm-name endof
136 2 of irda-name endof
137 device-name
138 endcase
139;
140
141: create-combined-name ( dev-descrip-addr int-descrip-addr -- )
142 dup i-descript-class c@
143 case 1 of audio-name drop endof
144 2 of comm-name drop endof
145 3 of kbd-mse-name drop endof
146 5 of phys-name drop endof
147 7 of printer-name drop endof
148 8 of storage-name drop endof
149 9 of hub-name drop endof
150 a of data-name drop endof
151 d of security-name drop endof
152 fe of app-name drop endof
153 rot create-device-name
154 endcase drop
155;