Mercurial > pygar
comparison modules/bluespec/Pygar/core/Processor.bsv @ 42:ced2ebd41347 pygar svn.43
[svn r43] bunch of updates that almost work...
author | punk |
---|---|
date | Wed, 05 May 2010 01:09:09 -0400 |
parents | 0475235d1513 |
children | 4d87fa55a776 |
comparison
equal
deleted
inserted
replaced
41:16ba43f0a7c3 | 42:ced2ebd41347 |
---|---|
370 Bit#(32) zext_it_imm = zext(it.imm); | 370 Bit#(32) zext_it_imm = zext(it.imm); |
371 wbQ.enq(tagged WB_ALU {dest: it.rdst, data:(rf.rd1(it.rsrc) ^ zext_it_imm )}); | 371 wbQ.enq(tagged WB_ALU {dest: it.rdst, data:(rf.rd1(it.rsrc) ^ zext_it_imm )}); |
372 end | 372 end |
373 tagged LUI .it : | 373 tagged LUI .it : |
374 begin | 374 begin |
375 $display("PROCESSOR Instr LUI\n"); | |
375 Bit#(32) zext_it_imm = zext(it.imm); | 376 Bit#(32) zext_it_imm = zext(it.imm); |
376 wbQ.enq(tagged WB_ALU {dest: it.rdst, data:(zext_it_imm << 32'd16) }); | 377 wbQ.enq(tagged WB_ALU {dest: it.rdst, data:(zext_it_imm << 32'd16) }); |
377 end | 378 end |
378 | 379 |
379 tagged SLL .it : | 380 tagged SLL .it : |
454 newPC = { pc_plus4[31:28], it.target, 2'b0 }; | 455 newPC = { pc_plus4[31:28], it.target, 2'b0 }; |
455 branchTaken = True; | 456 branchTaken = True; |
456 end | 457 end |
457 | 458 |
458 tagged JR .it : | 459 tagged JR .it : |
459 begin | 460 begin |
461 $display("PROCESSOR inst JR\n"); | |
460 newPC = rf.rd1(it.rsrc); | 462 newPC = rf.rd1(it.rsrc); |
461 branchTaken = True; | 463 branchTaken = True; |
462 end | 464 end |
463 | 465 |
464 tagged JAL .it : | 466 tagged JAL .it : |
465 begin | 467 begin |
468 $display("PROCESSOR inst JAL\n"); | |
466 wbQ.enq(tagged WB_ALU {dest:31, data:pc_plus4 }); | 469 wbQ.enq(tagged WB_ALU {dest:31, data:pc_plus4 }); |
467 newPC = { pc_plus4[31:28], it.target, 2'b0 }; | 470 newPC = { pc_plus4[31:28], it.target, 2'b0 }; |
468 branchTaken = True; | 471 branchTaken = True; |
469 end | 472 end |
470 | 473 |
578 rule flagAudioEnd (inAudioFifo.first() matches tagged EndOfFile); | 581 rule flagAudioEnd (inAudioFifo.first() matches tagged EndOfFile); |
579 $display (" PROCESSOR End Audio Flag Set "); | 582 $display (" PROCESSOR End Audio Flag Set "); |
580 cp0_audioEOF <= True; | 583 cp0_audioEOF <= True; |
581 inAudioFifo.deq; | 584 inAudioFifo.deq; |
582 endrule | 585 endrule |
583 | 586 /* |
584 rule sendAudioEnd (cp0_progComp); | 587 rule sendAudioEnd (cp0_progComp); |
585 $display (" PROCESSOR Says Program Complete "); | 588 $display (" PROCESSOR Says Program Complete "); |
586 outAudioFifo.enq(tagged EndOfFile); | 589 outAudioFifo.enq(tagged EndOfFile); |
587 cp0_progComp <= False; //only send one. And functions to reset | 590 cp0_progComp <= False; //only send one. And functions to reset |
588 endrule | 591 endrule |
589 | 592 */ |
590 | 593 |
591 //----------------------------------------------------------- | 594 //----------------------------------------------------------- |
592 // Methods | 595 // Methods |
593 | 596 |
594 interface Client imem_client; | 597 interface Client imem_client; |