comparison modules/bluespec/Pygar/core/Processor.bsv @ 25:220c14f5963c pygar svn.26

[svn r26] Not fully connected but passes audio successfully
author punk
date Wed, 28 Apr 2010 12:01:37 -0400
parents 90197e3375e2
children f5dfbe28fa59
comparison
equal deleted inserted replaced
24:3871f3530551 25:220c14f5963c
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE. 21 // THE SOFTWARE.
22
23 22
24 23
25 import Connectable::*; 24 import Connectable::*;
26 import GetPut::*; 25 import GetPut::*;
27 import ClientServer::*; 26 import ClientServer::*;
571 endcase 570 endcase
572 endrule 571 endrule
573 572
574 // for now, we don't do anything. 573 // for now, we don't do anything.
575 rule connectAudioReqResp; 574 rule connectAudioReqResp;
576 $display("rlm: PROCESSOR copies a datum\n"); 575 // $display("rlm: PROCESSOR copies a datum\n");
577 outAudioFifo.enq(inAudioFifo.first()); 576 outAudioFifo.enq(inAudioFifo.first());
578 inAudioFifo.deq; 577 inAudioFifo.deq;
579 endrule 578 endrule
580 579
581 // Server items & rules: 580 // Server items & rules:
582 581
583 rule feedInput; 582 rule feedInput;
584 let command <- server_stub.acceptRequest_SendUnprocessedStream(); 583 let command <- server_stub.acceptRequest_SendUnprocessedStream();
585 AudioProcessorControl ctrl = unpack(truncate(command.ctrl)); 584 AudioProcessorControl ctrl = unpack(truncate(command.ctrl));
586 $display("rlm: PROCESSOR: recieved data\n");
587 if(ctrl == EndOfFile) 585 if(ctrl == EndOfFile)
588 begin 586 begin
587 // $display("lsp: PROCESSOR received EOF ");
589 inAudioFifo.enq(tagged EndOfFile); 588 inAudioFifo.enq(tagged EndOfFile);
590 end 589 end
591 else 590 else
592 begin 591 begin
592 // $display("lsp: PROCESSOR received Data ");
593 inAudioFifo.enq(tagged Sample unpack(truncate(command.sample))); 593 inAudioFifo.enq(tagged Sample unpack(truncate(command.sample)));
594 end 594 end
595 endrule 595 endrule
596 596
597 597