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