Mercurial > pygar
diff 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 |
line wrap: on
line diff
1.1 --- a/modules/bluespec/Pygar/core/Processor.bsv Wed May 05 14:40:48 2010 -0400 1.2 +++ b/modules/bluespec/Pygar/core/Processor.bsv Wed May 05 15:19:32 2010 -0400 1.3 @@ -502,12 +502,21 @@ 1.4 5'd20 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_fromhost }); 1.5 5'd21 : wbQ.enq(tagged WB_ALU {dest:it.rdst, data:cp0_tohost }); 1.6 5'd25 : begin 1.7 -// $display( "**** EOF Requested\n "); 1.8 - wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(cp0_audioEOF)) }); // Reading clears bit 1.9 - cp0_audioEOF <= False; 1.10 + $display( "**** EOF Requested\n "); 1.11 + let sample = inAudioFifo.first(); 1.12 + case (sample) matches 1.13 + tagged EndOfFile : 1.14 + begin 1.15 + $display("PROCESSOR sent toC EOF"); 1.16 + wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(True)) }); // Reading clears bit 1.17 + inAudioFifo.deq; 1.18 + end 1.19 + tagged Sample .data: 1.20 + wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(False)) }); // Reading clears bit 1.21 + endcase 1.22 end 1.23 5'd28 : begin 1.24 -// $display( "***** Reqesting Sample \n"); 1.25 + $display( "***** Reqesting Sample \n"); 1.26 let sample = inAudioFifo.first(); // is this going to cause perf. delay? 1.27 if (sample matches tagged Sample .audio) // if it is EOF another rule sets the cp0_audioEOF 1.28 wbQ.enq(tagged WB_ALU {dest:it.rdst, data:zext(pack(audio)) }); // do I need pack? 1.29 @@ -577,14 +586,14 @@ 1.30 inAudioFifo.deq; 1.31 endrule 1.32 */ 1.33 - 1.34 +/* 1.35 rule flagAudioEnd (inAudioFifo.first() matches tagged EndOfFile); 1.36 $display (" PROCESSOR End Audio Flag Set "); 1.37 cp0_audioEOF <= True; 1.38 inAudioFifo.deq; 1.39 endrule 1.40 - 1.41 - rule sendAudioEnd (cp0_progComp); 1.42 +*/ 1.43 + rule sendProcEnd (cp0_progComp); 1.44 $display (" PROCESSOR Says Program Complete "); 1.45 outAudioFifo.enq(tagged EndOfFile); 1.46 cp0_progComp <= False; //only send one. And functions to reset