diff core/src/PathTypes.bsv @ 1:91a1f76ddd62 pygar svn.2

[svn r2] Adding initial lab 5 source
author punk
date Tue, 13 Apr 2010 17:34:33 -0400
parents
children 996f1d6cd010
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core/src/PathTypes.bsv	Tue Apr 13 17:34:33 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 +
    1.17 +//The mixer is identified as PathId 0, path end is max 
    1.18 +PathId mixerId = 0;
    1.19 +PathId endId = `MAX_CORES+1;
    1.20 +
    1.21 +// Path is array of path ids
    1.22 +typedef Vector#(`MAX_PATH_LENGTH,  PathId) CorePath;
    1.23 +typedef struct
    1.24 +{
    1.25 +  MemAddr   startAddr;
    1.26 +  CorePath  route;
    1.27 + } FullPath deriving(Eq, Bits);
    1.28 +	     
    1.29 +vector#(`MAX_VOICES, FullPath) routeTable;
    1.30 +CorePath aroute = {1, 2};
    1.31 +routeTable  =  {{12, aroute},{1, aroute}};
    1.32 +
    1.33 + 
    1.34 +