diff common/PathTypes.bsv @ 16:7e1510b47336 pygar svn.17

[svn r17] added rest of items for core
author punk
date Tue, 27 Apr 2010 22:54:50 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/common/PathTypes.bsv	Tue Apr 27 22:54:50 2010 -0400
     1.3 @@ -0,0 +1,31 @@
     1.4 +import Trace::*;
     1.5 +import Vector::*;
     1.6 +
     1.7 +`define MAX_VOICES       4
     1.8 +`define MAX_CORES       16
     1.9 +`define MAX_PATH_IDS    18
    1.10 +`define MAX_PATH_LENGTH 8
    1.11 +
    1.12 +// The path is hardwired and so should never be stored in a register.  Therefore int type rather than Bit type
    1.13 +
    1.14 +typedef Bit#(32) MemAddr;
    1.15 +typedef Int#(TLog#(`MAX_PATH_IDS))  PathId;
    1.16 +typedef Int#(24) Sample;
    1.17 +typedef Int#(TLog#(`MAX_VOICES)) VoiceId;
    1.18 +
    1.19 +
    1.20 +//The mixer is identified as PathId 0, path end is max 
    1.21 +PathId mixerId = 0;
    1.22 +PathId endId = `MAX_CORES+1;
    1.23 +
    1.24 +// Path is array of path ids
    1.25 +typedef Vector#(`MAX_PATH_LENGTH,  PathId) CorePath;
    1.26 +CorePath emptyCore = replicate(endId);
    1.27 +
    1.28 +typedef struct
    1.29 +{
    1.30 +  VoiceId   voice;
    1.31 +  MemAddr   startAddr;
    1.32 +  CorePath  route;
    1.33 +} FullPath deriving (Bits, Eq);
    1.34 +