annotate core/src/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 7393cd19371e
children
rev   line source
punk@1 1 import Trace::*;
punk@1 2 import Vector::*;
punk@1 3
punk@1 4 `define MAX_VOICES 4
punk@1 5 `define MAX_CORES 16
punk@1 6 `define MAX_PATH_IDS 18
punk@1 7 `define MAX_PATH_LENGTH 8
punk@1 8
punk@1 9 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type
punk@1 10
punk@1 11 typedef Bit#(32) MemAddr;
punk@1 12 typedef Int#(TLog#(`MAX_PATH_IDS)) PathId;
rlm@2 13 typedef Int#(24) Sample;
rlm@2 14 typedef Int#(TLog#(`MAX_VOICES)) VoiceId;
punk@7 15 typedef Bit#(8) Volume; // This is arbitrarily set to 8 bits or max val 256
punk@1 16
punk@1 17 //The mixer is identified as PathId 0, path end is max
punk@1 18 PathId mixerId = 0;
punk@1 19 PathId endId = `MAX_CORES+1;
punk@1 20
punk@1 21 // Path is array of path ids
punk@1 22 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath;
punk@4 23 CorePath emptyCore = replicate(endId);
punk@4 24
punk@1 25 typedef struct
punk@1 26 {
punk@4 27 VoiceId voice;
punk@1 28 MemAddr startAddr;
punk@1 29 CorePath route;
punk@7 30 Volume outVol;
punk@4 31 } FullPath deriving (Bits, Eq);
punk@1 32