Mercurial > pygar
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/bluespec/Pygar/core/PathTypes.bsv Fri Apr 23 02:32:05 2010 -0400 1.3 @@ -0,0 +1,31 @@ 1.4 +import Trace::*; 1.5 +import Vector::*; 1.6 + 1.7 +`define MAX_VOICES 4 1.8 +`define MAX_CORES 16 1.9 +`define MAX_PATH_IDS 18 1.10 +`define MAX_PATH_LENGTH 8 1.11 + 1.12 +// The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type 1.13 + 1.14 +typedef Bit#(32) MemAddr; 1.15 +typedef Int#(TLog#(`MAX_PATH_IDS)) PathId; 1.16 +typedef Int#(24) Sample; 1.17 +typedef Int#(TLog#(`MAX_VOICES)) VoiceId; 1.18 + 1.19 + 1.20 +//The mixer is identified as PathId 0, path end is max 1.21 +PathId mixerId = 0; 1.22 +PathId endId = `MAX_CORES+1; 1.23 + 1.24 +// Path is array of path ids 1.25 +typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath; 1.26 +CorePath emptyCore = replicate(endId); 1.27 + 1.28 +typedef struct 1.29 +{ 1.30 + VoiceId voice; 1.31 + MemAddr startAddr; 1.32 + CorePath route; 1.33 +} FullPath deriving (Bits, Eq); 1.34 +