Mercurial > pygar
annotate modules/bluespec/Pygar/core/PathTypes.bsv @ 8:74716e9a81cc pygar svn.9
[svn r9] Pygar now has the proper directory structure to play nicely with awb. Also, the apm file for audio-core willcompile successfully.
author | rlm |
---|---|
date | Fri, 23 Apr 2010 02:32:05 -0400 |
parents | |
children | 2c8166d205d5 |
rev | line source |
---|---|
rlm@8 | 1 import Trace::*; |
rlm@8 | 2 import Vector::*; |
rlm@8 | 3 |
rlm@8 | 4 `define MAX_VOICES 4 |
rlm@8 | 5 `define MAX_CORES 16 |
rlm@8 | 6 `define MAX_PATH_IDS 18 |
rlm@8 | 7 `define MAX_PATH_LENGTH 8 |
rlm@8 | 8 |
rlm@8 | 9 // The path is hardwired and so should never be stored in a register. Therefore int type rather than Bit type |
rlm@8 | 10 |
rlm@8 | 11 typedef Bit#(32) MemAddr; |
rlm@8 | 12 typedef Int#(TLog#(`MAX_PATH_IDS)) PathId; |
rlm@8 | 13 typedef Int#(24) Sample; |
rlm@8 | 14 typedef Int#(TLog#(`MAX_VOICES)) VoiceId; |
rlm@8 | 15 |
rlm@8 | 16 |
rlm@8 | 17 //The mixer is identified as PathId 0, path end is max |
rlm@8 | 18 PathId mixerId = 0; |
rlm@8 | 19 PathId endId = `MAX_CORES+1; |
rlm@8 | 20 |
rlm@8 | 21 // Path is array of path ids |
rlm@8 | 22 typedef Vector#(`MAX_PATH_LENGTH, PathId) CorePath; |
rlm@8 | 23 CorePath emptyCore = replicate(endId); |
rlm@8 | 24 |
rlm@8 | 25 typedef struct |
rlm@8 | 26 { |
rlm@8 | 27 VoiceId voice; |
rlm@8 | 28 MemAddr startAddr; |
rlm@8 | 29 CorePath route; |
rlm@8 | 30 } FullPath deriving (Bits, Eq); |
rlm@8 | 31 |