-
Notifications
You must be signed in to change notification settings - Fork 0
/
atmtypes.ads
49 lines (39 loc) · 1.58 KB
/
atmtypes.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
with Ada.text_io; use Ada.Text_IO;
with Ada.Exceptions; use Ada.Exceptions;
-- This file contains all of the data types, variables and constants
-- used by the ATM switch simulator system.
package ATMtypes is
subtype ATMHeader is INTEGER;
subtype ATMBody is INTEGER;
subtype PortType is NATURAL;
------------------------------------------------------------------------------
type ATMCell is
record
Port : PortType;
CellHeader : ATMHeader;
CellBody : ATMBody;
end record;
type LinkStruct is
record
Port : PortType;
Switch : Integer;
end record;
type TransitCell is
record
ToPort : PortType;
ToSwitch : Integer;
CellHeader : ATMHeader;
CellBody : ATMBody;
end record;
------------------------------------------------------------------------------
Author : constant STRING := "A.R.Clark";
Version : constant STRING := "0.2";
Title : constant STRING := "ATM Switch Element Simulator";
DataFileName : constant STRING := "s01.dat";
MaxNumberOfNodes : constant INTEGER := 5; -- number of switches in network
MaxBufferSize : constant INTEGER := 19; -- maximumm number of cells in a buffer
NoRoutes : constant INTEGER := 19; -- number of entries in each switch's routing table
NoOfPorts : constant INTEGER := 2; -- number of input/output ports per switch
NoOfLoops : constant INTEGER := 5; -- number of times to run the simulation
fd : Ada.Text_IO.file_type;
end ATMtypes;