Mercurial > pygar
view core/src/PathTypes.bsv @ 9:a66d70a89c85 pygar svn.10
[svn r10] added week 3 progress report. Please tell me what you think!
author | rlm |
---|---|
date | Fri, 23 Apr 2010 06:08:21 -0400 |
parents | 7393cd19371e |
children |
line wrap: on
line source
1 import Trace::*;2 import Vector::*;4 `define MAX_VOICES 45 `define MAX_CORES 166 `define MAX_PATH_IDS 187 `define MAX_PATH_LENGTH 89 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type11 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 typedef Bit#(8) Volume; // This is arbitrarily set to 8 bits or max val 25617 //The mixer is identified as PathId 0, path end is max18 PathId mixerId = 0;19 PathId endId = `MAX_CORES+1;21 // Path is array of path ids22 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath;23 CorePath emptyCore = replicate(endId);25 typedef struct26 {27 VoiceId voice;28 MemAddr startAddr;29 CorePath route;30 Volume outVol;31 } FullPath deriving (Bits, Eq);