Mercurial > pygar
view modules/bluespec/Pygar/core/PathTypes.bsv @ 42:ced2ebd41347 pygar svn.43
[svn r43] bunch of updates that almost work...
author | punk |
---|---|
date | Wed, 05 May 2010 01:09:09 -0400 |
parents | 2c8166d205d5 |
children | 4d87fa55a776 |
line wrap: on
line source
1 import Trace::*;2 import Vector::*;4 `include "asim/provides/audio_pipe_types.bsh"6 `define MAX_VOICES 47 `define MAX_CORES 168 `define MAX_PATH_IDS 189 `define MAX_PATH_LENGTH 811 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type13 typedef Bit#(32) MemAddr;14 typedef Int#(TLog#(`MAX_PATH_IDS)) PathId;15 //typedef Int#(16) Sample;16 typedef Int#(TLog#(`MAX_VOICES)) VoiceId;17 typedef Bit#(8) Volume; // This is arbitrarily set to 8 bits or max val 25619 //The mixer is identified as PathId 0, path end is max20 PathId mixerId = 0;21 PathId endId = `MAX_CORES+1;23 // Path is array of path ids24 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath;25 CorePath emptyCore = replicate(endId);27 typedef struct28 {29 VoiceId voice;30 MemAddr startAddr;31 CorePath route;32 Volume outVol;33 } FullPath deriving (Bits, Eq);35 typedef Maybe#(AudioProcessorUnit) AudioPipeUnit; // deriving (Bits, Eq);37 typedef struct38 {39 VoiceId voice;40 AudioPipeUnit data;41 } AudioStream deriving (Bits, Eq);