rlm@8: import Trace::*; rlm@8: import Vector::*; rlm@8: rlm@8: `define MAX_VOICES 4 rlm@8: `define MAX_CORES 16 rlm@8: `define MAX_PATH_IDS 18 rlm@8: `define MAX_PATH_LENGTH 8 rlm@8: rlm@8: // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type rlm@8: rlm@8: typedef Bit#(32) MemAddr; rlm@8: typedef Int#(TLog#(`MAX_PATH_IDS)) PathId; rlm@8: typedef Int#(24) Sample; rlm@8: typedef Int#(TLog#(`MAX_VOICES)) VoiceId; rlm@8: rlm@8: rlm@8: //The mixer is identified as PathId 0, path end is max rlm@8: PathId mixerId = 0; rlm@8: PathId endId = `MAX_CORES+1; rlm@8: rlm@8: // Path is array of path ids rlm@8: typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath; rlm@8: CorePath emptyCore = replicate(endId); rlm@8: rlm@8: typedef struct rlm@8: { rlm@8: VoiceId voice; rlm@8: MemAddr startAddr; rlm@8: CorePath route; rlm@8: } FullPath deriving (Bits, Eq); rlm@8: