Mercurial > pygar
diff modules/bluespec/Pygar/core/Processor.bsv @ 36:99519a031813 pygar svn.37
[svn r37] moved the server into audioCorePipeline
author | punk |
---|---|
date | Tue, 04 May 2010 18:54:54 -0400 |
parents | 14f7a7ace3f5 |
children | 0475235d1513 |
line wrap: on
line diff
1.1 --- a/modules/bluespec/Pygar/core/Processor.bsv Tue May 04 12:14:24 2010 -0400 1.2 +++ b/modules/bluespec/Pygar/core/Processor.bsv Tue May 04 18:54:54 2010 -0400 1.3 @@ -46,7 +46,7 @@ 1.4 1.5 // Local includes 1.6 //`include "asim/provides/processor_library.bsh" (included above directly) 1.7 -`include "asim/rrr/remote_server_stub_AUDIOCORERRR.bsh" 1.8 + 1.9 `include "asim/provides/common_services.bsh" 1.10 `include "asim/dict/STATS_PROCESSOR.bsh" 1.11 `include "asim/provides/processor_library.bsh" 1.12 @@ -77,6 +77,7 @@ 1.13 1.14 // Interface to Audio Pipeline 1.15 interface Get#(AudioProcessorUnit) sampleOutput; 1.16 + interface Put#(AudioProcessorUnit) sampleInput; 1.17 1.18 endinterface 1.19 1.20 @@ -227,12 +228,6 @@ 1.21 module [CONNECTED_MODULE] mkProc( Proc ); 1.22 1.23 //----------------------------------------------------------- 1.24 - // Debug port 1.25 - 1.26 - ServerStub_AUDIOCORERRR server_stub <- mkServerStub_AUDIOCORERRR(); 1.27 - 1.28 - 1.29 - //----------------------------------------------------------- 1.30 // State 1.31 1.32 // Standard processor state 1.33 @@ -581,15 +576,6 @@ 1.34 num_cycles.incr(); 1.35 endrule 1.36 1.37 -(* conservative_implicit_conditions *) 1.38 - rule handleCPUToHost; 1.39 - let req <- server_stub.acceptRequest_ReadCPUToHost(); 1.40 - case (req) 1.41 - 0: server_stub.sendResponse_ReadCPUToHost(cp0_tohost); 1.42 - 1: server_stub.sendResponse_ReadCPUToHost(pc); 1.43 - 2: server_stub.sendResponse_ReadCPUToHost(zeroExtend(pack(stage))); 1.44 - endcase 1.45 - endrule 1.46 1.47 // for now, we don't do anything. 1.48 // rule connectAudioReqResp; 1.49 @@ -610,24 +596,7 @@ 1.50 cp0_progComp <= False; //only send one. And functions to reset 1.51 endrule 1.52 1.53 - // Server items & rules: 1.54 1.55 - rule feedInput; 1.56 - let command <- server_stub.acceptRequest_SendUnprocessedStream(); 1.57 - AudioProcessorControl ctrl = unpack(truncate(command.ctrl)); 1.58 - if(ctrl == EndOfFile) 1.59 - begin 1.60 - $display("lsp: PROCESSOR received EOF "); 1.61 - inAudioFifo.enq(tagged EndOfFile); 1.62 - end 1.63 - else 1.64 - begin 1.65 - $display("lsp: PROCESSOR received Data "); 1.66 - inAudioFifo.enq(tagged Sample unpack(truncate(command.sample))); 1.67 - end 1.68 - endrule 1.69 - 1.70 - 1.71 //----------------------------------------------------------- 1.72 // Methods 1.73 1.74 @@ -643,17 +612,20 @@ 1.75 1.76 interface Get statsEn_get = toGet(asReg(cp0_statsEn)); 1.77 1.78 -// interface CPUToHost tohost; 1.79 -// method Bit#(32) cpuToHost(int req); 1.80 -// return (case (req) 1.81 -// 0: cp0_tohost; 1.82 -// 1: pc; 1.83 -// 2: zeroExtend(pack(stage)); 1.84 -// endcase); 1.85 -// endmethod 1.86 -// endinterface 1.87 - 1.88 + /* 1.89 + interface CPUToHost tohost; 1.90 + method Bit#(32) cpuToHost(int req); 1.91 + return (case (req) 1.92 + 0: cp0_tohost; 1.93 + 1: pc; 1.94 + 2: zeroExtend(pack(stage)); 1.95 + endcase); 1.96 + endmethod 1.97 + endinterface 1.98 + */ 1.99 + 1.100 interface Get sampleOutput = fifoToGet(outAudioFifo); 1.101 + interface Put sampleInput = fifoToPut(inAudioFifo); 1.102 1.103 endmodule 1.104