comparison modules/bluespec/Pygar/core/Processor.bsv @ 50:2b18894f75e2 pygar svn.51

[svn r51] fixed processor- it works
author punk
date Wed, 05 May 2010 15:19:32 -0400
parents 61f6267cb3db
children 9fe5ed4af92d
comparison
equal deleted inserted replaced
49:61f6267cb3db 50:2b18894f75e2
500 // not actually an ALU instruction but don't have the format otherwise 500 // not actually an ALU instruction but don't have the format otherwise
501 5'd10 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(cp0_statsEn)) }); 501 5'd10 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(cp0_statsEn)) });
502 5'd20 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_fromhost }); 502 5'd20 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_fromhost });
503 5'd21 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_tohost }); 503 5'd21 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_tohost });
504 5'd25 : begin 504 5'd25 : begin
505 // $display( "**** EOF Requested\n "); 505 $display( "**** EOF Requested\n ");
506 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(cp0_audioEOF)) }); // Reading clears bit 506 let sample = inAudioFifo.first();
507 cp0_audioEOF <= False; 507 case (sample) matches
508 tagged EndOfFile :
509 begin
510 $display("PROCESSOR sent toC EOF");
511 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(True)) }); // Reading clears bit
512 inAudioFifo.deq;
513 end
514 tagged Sample .data:
515 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(False)) }); // Reading clears bit
516 endcase
508 end 517 end
509 5'd28 : begin 518 5'd28 : begin
510 // $display( "***** Reqesting Sample \n"); 519 $display( "***** Reqesting Sample \n");
511 let sample = inAudioFifo.first(); // is this going to cause perf. delay? 520 let sample = inAudioFifo.first(); // is this going to cause perf. delay?
512 if (sample matches tagged Sample .audio) // if it is EOF another rule sets the cp0_audioEOF 521 if (sample matches tagged Sample .audio) // if it is EOF another rule sets the cp0_audioEOF
513 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(audio)) }); // do I need pack? 522 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(audio)) }); // do I need pack?
514 else $display ( "Audio File EOF Reached. Invalid sample request."); 523 else $display ( "Audio File EOF Reached. Invalid sample request.");
515 inAudioFifo.deq(); 524 inAudioFifo.deq();
575 $display("rlm: PROCESSOR copies a datum\n"); 584 $display("rlm: PROCESSOR copies a datum\n");
576 outAudioFifo.enq(inAudioFifo.first()); 585 outAudioFifo.enq(inAudioFifo.first());
577 inAudioFifo.deq; 586 inAudioFifo.deq;
578 endrule 587 endrule
579 */ 588 */
580 589 /*
581 rule flagAudioEnd (inAudioFifo.first() matches tagged EndOfFile); 590 rule flagAudioEnd (inAudioFifo.first() matches tagged EndOfFile);
582 $display (" PROCESSOR End Audio Flag Set "); 591 $display (" PROCESSOR End Audio Flag Set ");
583 cp0_audioEOF <= True; 592 cp0_audioEOF <= True;
584 inAudioFifo.deq; 593 inAudioFifo.deq;
585 endrule 594 endrule
586 595 */
587 rule sendAudioEnd (cp0_progComp); 596 rule sendProcEnd (cp0_progComp);
588 $display (" PROCESSOR Says Program Complete "); 597 $display (" PROCESSOR Says Program Complete ");
589 outAudioFifo.enq(tagged EndOfFile); 598 outAudioFifo.enq(tagged EndOfFile);
590 cp0_progComp <= False; //only send one. And functions to reset 599 cp0_progComp <= False; //only send one. And functions to reset
591 endrule 600 endrule
592 601