Mercurial > pygar
view modules/bluespec/Pygar/core/PathTypes.bsv @ 76:8bd0e4d37ad2 pygar svn.77 tip
[svn r77] I don't know why my last change didn't go through grumble grumble....
author | rlm |
---|---|
date | Wed, 12 May 2010 08:58:23 -0400 |
parents | 9b4f237e77e1 |
children |
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 Int#(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);