diff common/InterfaceTypes.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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/common/InterfaceTypes.bsv	Tue Apr 13 17:34:33 2010 -0400
     1.3 @@ -0,0 +1,28 @@
     1.4 +import Trace::*;
     1.5 +
     1.6 +`define MAX_VOICES      4
     1.7 +`define MAX_CORES       16
     1.8 +`define MAX_PATH_LENGTH 8
     1.9 +
    1.10 +// The path is hardwired and so should never be stored in a register.  Therefore int type rather than Bit type
    1.11 +
    1.12 +typedef Bit#(32) MemAddr;
    1.13 +typedef Int#(TLog#(MAX_CORES+2))  PathId;
    1.14 +
    1.15 +//The mixer is identified as PathId 0, path end is max 
    1.16 +PathId mixerId = 0;
    1.17 +PathId endId = MAX_CORES+1;
    1.18 +
    1.19 +// Path is array of path ids
    1.20 +typedef Vector#(MAX_PATH_LENGTH,  PathId) CorePath;
    1.21 +typedef struct
    1.22 +{
    1.23 +  MemAddr   startAddr;
    1.24 +  CorePath  route;
    1.25 + } FullPath deriving(Eq, Bits);
    1.26 +	     
    1.27 +Vector#(MAX_VOICES, FullPath) routeTable;
    1.28 +routeTable[0] = {startAddr: 12, route: {1, 2, 3, 0, endId, endId, endId, endId}}
    1.29 +
    1.30 +
    1.31 +