diff core/src/RoutingTable.bsv @ 7:7393cd19371e pygar svn.8

[svn r8] added volume to routing table and types
author punk
date Wed, 21 Apr 2010 23:37:12 -0400
parents c4438eca4bc4
children
line wrap: on
line diff
     1.1 --- a/core/src/RoutingTable.bsv	Wed Apr 21 23:22:10 2010 -0400
     1.2 +++ b/core/src/RoutingTable.bsv	Wed Apr 21 23:37:12 2010 -0400
     1.3 @@ -3,12 +3,13 @@
     1.4  import PathTypes::*;
     1.5  
     1.6  function FullPath genEmptyPaths (Integer a) ;
     1.7 -   FullPath empt = FullPath {voice: fromInteger(a), startAddr: 0, route: emptyCore};
     1.8 +   FullPath empt = FullPath {voice: fromInteger(a), startAddr: 0, route: emptyCore, outVol: 0};
     1.9     return (empt);
    1.10  endfunction
    1.11  
    1.12  interface RoutingTable;
    1.13     method FullPath getPath(Integer voiceNo);
    1.14 +   method getMixerScalar();
    1.15  endinterface
    1.16  
    1.17  module mkRoutingTable(RoutingTable);
    1.18 @@ -25,6 +26,7 @@
    1.19     routeTable[0].startAddr = 0;  //where is this really going to come from?
    1.20     routeTable[0].route[0] = 3;
    1.21     routeTable[0].route[1] = mixerId;
    1.22 +   routeTable[0].outVol = 200;
    1.23     //rest are already initialized toinvalid
    1.24  
    1.25     // or if you just want to update a straight list, this longer emplate works.
    1.26 @@ -40,13 +42,17 @@
    1.27        return outPath;
    1.28     endfunction
    1.29     routeTable[1].route = createVoice1Route;
    1.30 -   routeTable[1].startAddr = 0;
    1.31 +   routeTable[1].startAddr = 0;   
    1.32 +   routeTable[1].outVol = 200;
    1.33 +
    1.34  
    1.35     //remaining voices are all initialized to empty.
    1.36     
    1.37     method FullPath getPath(Integer a);
    1.38        return routeTable[a];
    1.39     endmethod
    1.40 +
    1.41 +   method Integer(
    1.42     
    1.43  endmodule
    1.44