comparison modules/bluespec/Pygar/core/audioCorePipeline.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 2c8166d205d5
children 0475235d1513
comparison
equal deleted inserted replaced
35:14f7a7ace3f5 36:99519a031813
42 `include "asim/provides/scratchpad_memory.bsh" 42 `include "asim/provides/scratchpad_memory.bsh"
43 `include "asim/provides/mem_services.bsh" 43 `include "asim/provides/mem_services.bsh"
44 `include "asim/dict/VDEV_SCRATCH.bsh" 44 `include "asim/dict/VDEV_SCRATCH.bsh"
45 45
46 `include "asim/rrr/remote_client_stub_AUDIOCORERRR.bsh" 46 `include "asim/rrr/remote_client_stub_AUDIOCORERRR.bsh"
47 //`include "asim/rrr/remote_server_stub_AUDIOCORERRR.bsh" 47 `include "asim/rrr/remote_server_stub_AUDIOCORERRR.bsh"
48 48
49 module [CONNECTED_MODULE] mkConnectedApplication (); 49 module [CONNECTED_MODULE] mkConnectedApplication ();
50 Core core <- mkCore; 50 Core core <- mkCore;
51 Reg#(int) cycle <- mkReg(0); 51 Reg#(int) cycle <- mkReg(0);
52 52
58 // Services Samples 58 // Services Samples
59 ClientStub_AUDIOCORERRR client_stub <- mkClientStub_AUDIOCORERRR(); 59 ClientStub_AUDIOCORERRR client_stub <- mkClientStub_AUDIOCORERRR();
60 // Make this big enough so that several outstanding requests may be supported 60 // Make this big enough so that several outstanding requests may be supported
61 FIFO#(Bit#(MainMemTagSz)) tags <- mkSizedFIFO(8); 61 FIFO#(Bit#(MainMemTagSz)) tags <- mkSizedFIFO(8);
62 62
63 //-----------------------------------------------------------
64 // Debug port
65
66 ServerStub_AUDIOCORERRR server_stub <- mkServerStub_AUDIOCORERRR();
67
68
63 // this is for the tracing 69 // this is for the tracing
64 rule printCycles; 70 rule printCycles;
65 cycle <= cycle+1; 71 cycle <= cycle+1;
66 $fdisplay(stderr, " => Cycle = %d", cycle); 72 $fdisplay(stderr, " => Cycle = %d", cycle);
67 endrule 73 endrule
97 client_stub.makeRequest_SendProcessedStream(zeroExtend(pack(endOfFileTag)),?); 103 client_stub.makeRequest_SendProcessedStream(zeroExtend(pack(endOfFileTag)),?);
98 tagged Sample .sample:client_stub.makeRequest_SendProcessedStream(zeroExtend(pack(sampleTag)), zeroExtend(pack(sample))); 104 tagged Sample .sample:client_stub.makeRequest_SendProcessedStream(zeroExtend(pack(sampleTag)), zeroExtend(pack(sample)));
99 endcase 105 endcase
100 endrule 106 endrule
101 107
108 //***** SERVER Side *****
109
110 rule feedInput;
111 let command <- server_stub.acceptRequest_SendUnprocessedStream();
112 AudioProcessorControl ctrl = unpack(truncate(command.ctrl));
113 if(ctrl == EndOfFile)
114 begin
115 $display("lsp: PROCESSOR received EOF ");
116 core.sampleInput.put(tagged EndOfFile);
117 end
118 else
119 begin
120 $display("lsp: PROCESSOR received Data ");
121 core.sampleInput.put(tagged Sample unpack(truncate(command.sample)));
122 end
123 endrule
102 endmodule 124 endmodule