annotate common/PathTypes.bsv @ 37:0475235d1513 pygar svn.38

[svn r38] fixed audiocorepipe
author punk
date Tue, 04 May 2010 19:25:30 -0400
parents 7e1510b47336
children
rev   line source
punk@16 1 import Trace::*;
punk@16 2 import Vector::*;
punk@16 3
punk@16 4 `define MAX_VOICES 4
punk@16 5 `define MAX_CORES 16
punk@16 6 `define MAX_PATH_IDS 18
punk@16 7 `define MAX_PATH_LENGTH 8
punk@16 8
punk@16 9 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type
punk@16 10
punk@16 11 typedef Bit#(32) MemAddr;
punk@16 12 typedef Int#(TLog#(`MAX_PATH_IDS)) PathId;
punk@16 13 typedef Int#(24) Sample;
punk@16 14 typedef Int#(TLog#(`MAX_VOICES)) VoiceId;
punk@16 15
punk@16 16
punk@16 17 //The mixer is identified as PathId 0, path end is max
punk@16 18 PathId mixerId = 0;
punk@16 19 PathId endId = `MAX_CORES+1;
punk@16 20
punk@16 21 // Path is array of path ids
punk@16 22 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath;
punk@16 23 CorePath emptyCore = replicate(endId);
punk@16 24
punk@16 25 typedef struct
punk@16 26 {
punk@16 27 VoiceId voice;
punk@16 28 MemAddr startAddr;
punk@16 29 CorePath route;
punk@16 30 } FullPath deriving (Bits, Eq);
punk@16 31