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