Mercurial > pygar
comparison modules/bluespec/Pygar/core/PathTypes.bsv @ 8:74716e9a81cc pygar svn.9
[svn r9] Pygar now has the proper directory structure to play nicely with awb. Also, the apm file for audio-core willcompile successfully.
author | rlm |
---|---|
date | Fri, 23 Apr 2010 02:32:05 -0400 |
parents | |
children | 2c8166d205d5 |
comparison
equal
deleted
inserted
replaced
7:7393cd19371e | 8:74716e9a81cc |
---|---|
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 typedef Int#(24) Sample; | |
14 typedef Int#(TLog#(`MAX_VOICES)) VoiceId; | |
15 | |
16 | |
17 //The mixer is identified as PathId 0, path end is max | |
18 PathId mixerId = 0; | |
19 PathId endId = `MAX_CORES+1; | |
20 | |
21 // Path is array of path ids | |
22 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath; | |
23 CorePath emptyCore = replicate(endId); | |
24 | |
25 typedef struct | |
26 { | |
27 VoiceId voice; | |
28 MemAddr startAddr; | |
29 CorePath route; | |
30 } FullPath deriving (Bits, Eq); | |
31 |