comparison core/src/PathTypes.bsv @ 1:91a1f76ddd62 pygar svn.2

[svn r2] Adding initial lab 5 source
author punk
date Tue, 13 Apr 2010 17:34:33 -0400
parents
children 996f1d6cd010
comparison
equal deleted inserted replaced
0:6d1ff93e3afa 1:91a1f76ddd62
1 import Trace::*;
2 import Vector::*;
3
4 `define MAX_VOICES 4
5 `define MAX_CORES 16
6 `define MAX_PATH_IDS 18
7 `define MAX_PATH_LENGTH 8
8
9 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type
10
11 typedef Bit#(32) MemAddr;
12 typedef Int#(TLog#(`MAX_PATH_IDS)) PathId;
13
14 //The mixer is identified as PathId 0, path end is max
15 PathId mixerId = 0;
16 PathId endId = `MAX_CORES+1;
17
18 // Path is array of path ids
19 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath;
20 typedef struct
21 {
22 MemAddr startAddr;
23 CorePath route;
24 } FullPath deriving(Eq, Bits);
25
26 vector#(`MAX_VOICES, FullPath) routeTable;
27 CorePath aroute = {1, 2};
28 routeTable = {{12, aroute},{1, aroute}};
29
30
31