# HG changeset patch # User punk # Date 1271907432 14400 # Node ID 7393cd19371e63fa3d16d550820c2d03f5c72d89 # Parent cdad17407328d071ae406ca8dc5a42ada2ab2536 [svn r8] added volume to routing table and types diff -r cdad17407328 -r 7393cd19371e core/src/PathTypes.bsv --- a/core/src/PathTypes.bsv Wed Apr 21 23:22:10 2010 -0400 +++ b/core/src/PathTypes.bsv Wed Apr 21 23:37:12 2010 -0400 @@ -12,7 +12,7 @@ typedef Int#(TLog#(`MAX_PATH_IDS)) PathId; typedef Int#(24) Sample; typedef Int#(TLog#(`MAX_VOICES)) VoiceId; - +typedef Bit#(8) Volume; // This is arbitrarily set to 8 bits or max val 256 //The mixer is identified as PathId 0, path end is max PathId mixerId = 0; @@ -27,5 +27,6 @@ VoiceId voice; MemAddr startAddr; CorePath route; + Volume outVol; } FullPath deriving (Bits, Eq); diff -r cdad17407328 -r 7393cd19371e core/src/RoutingTable.bsv --- a/core/src/RoutingTable.bsv Wed Apr 21 23:22:10 2010 -0400 +++ b/core/src/RoutingTable.bsv Wed Apr 21 23:37:12 2010 -0400 @@ -3,12 +3,13 @@ import PathTypes::*; function FullPath genEmptyPaths (Integer a) ; - FullPath empt = FullPath {voice: fromInteger(a), startAddr: 0, route: emptyCore}; + FullPath empt = FullPath {voice: fromInteger(a), startAddr: 0, route: emptyCore, outVol: 0}; return (empt); endfunction interface RoutingTable; method FullPath getPath(Integer voiceNo); + method getMixerScalar(); endinterface module mkRoutingTable(RoutingTable); @@ -25,6 +26,7 @@ routeTable[0].startAddr = 0; //where is this really going to come from? routeTable[0].route[0] = 3; routeTable[0].route[1] = mixerId; + routeTable[0].outVol = 200; //rest are already initialized toinvalid // or if you just want to update a straight list, this longer emplate works. @@ -40,13 +42,17 @@ return outPath; endfunction routeTable[1].route = createVoice1Route; - routeTable[1].startAddr = 0; + routeTable[1].startAddr = 0; + routeTable[1].outVol = 200; + //remaining voices are all initialized to empty. method FullPath getPath(Integer a); return routeTable[a]; endmethod + + method Integer( endmodule