Mercurial > pygar
view core/src/PathTypes.bsv @ 2:996f1d6cd010 pygar svn.3
[svn r3] added pseudo code for Mixer, and defined Samples and VoiceID in PathTypes.
author | rlm |
---|---|
date | Wed, 14 Apr 2010 15:02:32 -0400 |
parents | 91a1f76ddd62 |
children | c4438eca4bc4 |
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;17 //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 typedef struct24 {25 MemAddr startAddr;26 CorePath route;27 } FullPath deriving(Eq, Bits);29 vector#(`MAX_VOICES, FullPath) routeTable;30 CorePath aroute = {1, 2};31 routeTable = {{12, aroute},{1, aroute}};