punk@1: import Trace::*; punk@1: punk@1: `define MAX_VOICES 4 punk@1: `define MAX_CORES 16 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_CORES+2)) PathId; 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@1: typedef struct punk@1: { punk@1: MemAddr startAddr; punk@1: CorePath route; punk@1: } FullPath deriving(Eq, Bits); punk@1: punk@1: Vector#(MAX_VOICES, FullPath) routeTable; punk@1: routeTable[0] = {startAddr: 12, route: {1, 2, 3, 0, endId, endId, endId, endId}} punk@1: punk@1: punk@1: