Mercurial > pygar
comparison common/InterfaceTypes.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 |
comparison
equal
deleted
inserted
replaced
0:6d1ff93e3afa | 1:91a1f76ddd62 |
---|---|
1 import Trace::*; | |
2 | |
3 `define MAX_VOICES 4 | |
4 `define MAX_CORES 16 | |
5 `define MAX_PATH_LENGTH 8 | |
6 | |
7 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type | |
8 | |
9 typedef Bit#(32) MemAddr; | |
10 typedef Int#(TLog#(MAX_CORES+2)) PathId; | |
11 | |
12 //The mixer is identified as PathId 0, path end is max | |
13 PathId mixerId = 0; | |
14 PathId endId = MAX_CORES+1; | |
15 | |
16 // Path is array of path ids | |
17 typedef Vector#(MAX_PATH_LENGTH, PathId) CorePath; | |
18 typedef struct | |
19 { | |
20 MemAddr startAddr; | |
21 CorePath route; | |
22 } FullPath deriving(Eq, Bits); | |
23 | |
24 Vector#(MAX_VOICES, FullPath) routeTable; | |
25 routeTable[0] = {startAddr: 12, route: {1, 2, 3, 0, endId, endId, endId, endId}} | |
26 | |
27 | |
28 |