OpenCores
URL https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [rtl/] [Module_IO_Station.v] - Diff between revs 213 and 230

Show entire file | Details | Blame | View Log

Rev 213 Rev 230
Line 31... Line 31...
        input wire [3:0]                                          iId,
        input wire [3:0]                                          iId,
        output wire [`COMMIT_PACKET_SIZE-1:0]                     oCommitData,
        output wire [`COMMIT_PACKET_SIZE-1:0]                     oCommitData,
        output wire                                               oCommitResquest,
        output wire                                               oCommitResquest,
        input wire                                                iCommitGranted,
        input wire                                                iCommitGranted,
        output wire                                               oBusy,
        output wire                                               oBusy,
 
        //OMEM
   output wire [`DATA_ROW_WIDTH-1:0]                         oOMEMWriteAddress,
   output wire [`DATA_ROW_WIDTH-1:0]                         oOMEMWriteAddress,
   output wire [`DATA_ROW_WIDTH-1:0]                         oOMEMWriteData,
   output wire [`DATA_ROW_WIDTH-1:0]                         oOMEMWriteData,
   output wire                                               oOMEMWriteEnable
   output wire                                               oOMEMWriteEnable,
 
        //TMEM
 
        output wire [`DATA_ROW_WIDTH-1:0]                         oTMEMReadAddress,         //3 * 32 addresses to read from TMEM
 
        input wire [`DATA_ROW_WIDTH-1:0]                          iTMEMReadData,            //Contains the data read from the TMEM, 3 * 32 bit words
 
        input wire                                                iTMEMDataAvailable,                   //This is set to one once the TMEM read transaction is complete
 
   output wire                                               oTMEMDataRequest          //Set to one to indicate a TMEM read request
 
 
);
);
 
 
wire                           wExeDone;
wire                           wExeDone;
wire [2:0]                     wExeDoneTmp;
wire [2:0]                     wExeDoneTmp;
wire                           wRS_OMWRITE_Trigger;
wire                           wRS_OMWRITE_Trigger;
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandA;
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandA;
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandB;
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandB;
wire [`DATA_ROW_WIDTH-1:0]     wResult;
 
wire                           wCommitGranted;
wire                           wCommitGranted;
 
 
//ReservationStation_1Cycle RS
wire [2:0]                     wIOOperation;
ReservationStation RS
wire                           wIOTrigger,wIOTrigger_Pre;
 
wire                           ReadInProgress_Delay;
 
wire                           wExeDone_pre1,wExeDone_pre2,wExeDone_pre3,wExeDone_pre4;
 
wire                           wCommitResquest;
 
 
 
//assign oTMEMDataRequest    = (wIOTrigger && wIOOperation == `IO_OPERATION_TMREAD ) ? wIOTrigger : 1'b0;
 
wire ReadInProgress;
 
assign ReadInProgress = (wIOOperation == `IO_OPERATION_TMREAD) ? 1'b1 : 1'b0;
 
 
 
assign oTMEMDataRequest    = ((wIOTrigger | ~iTMEMDataAvailable) & ReadInProgress ) ? 1'b1:1'b0;//wIOTrigger : 1'b0;
 
 
 
 
 
assign oTMEMReadAddress    = wRS1_OperandA;             //Three separate 32 bit addresses comes here, for 3 addresses
 
 
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) WOP_FFD0 //TODO: This should be 1 bit
 
(       Clock, Reset, 1'b1 , wIOTrigger_Pre | wExeDone_pre1 | wExeDone_pre2, wIOTrigger );
 
 
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) WOP_CR //TODO: This should be 1 bit
 
(       Clock, Reset, ReadInProgress , wCommitResquest, oCommitResquest );
 
///////////////////////////
 
//
 
// wIOOperation     
 
//  000             OMEM
 
//  001             TMEM
 
//  010             MAILBOX
 
//  
 
///////////////////////////
 
wire wBusy;
 
 
 
ReservationStation_EX RS_EX
(
(
        .Clock(              Clock                           ),
        .Clock(              Clock                           ),
        .Reset(              Reset                           ),
        .Reset(              Reset                           ),
        .iIssueBus(          iIssueBus                       ),
        .iIssueBus(          iIssueBus                       ),
        .iCommitBus(         iCommitBus                      ),
        .iCommitBus(         iCommitBus                      ),
        .iMyId(              iId                             ),
        .iMyId(              iId                             ),
        .iExecutionDone(     wExeDone                        ),
        .iExecutionDone(     wExeDone                        ),
        .iResult(            wResult                         ),
        .iResult(            iTMEMReadData                   ),
        .iCommitGranted(     wCommitGranted                  ),
        .iCommitGranted(     wCommitGranted                  ),
        .oSrc1Latched(       wRS1_OperandB                   ),
        .oSrc1Latched(       wRS1_OperandB                   ),
        .oSrc0Latched(       wRS1_OperandA                   ),
        .oSrc0Latched(       wRS1_OperandA                   ),
        .oBusy(              oBusy                           ),
        .oBusy(              wBusy                           ),
        .oTrigger(           wRS_OMWRITE_Trigger             )
        .oScale(             wIOOperation                    ),
 
        .oTrigger(           wIOTrigger_Pre                  ),
 
        ///
 
        .oCommitRequest(     wCommitResquest                 ),
 
        .oId(              oCommitData[`COMMIT_RSID_RNG]                                 ),
 
        .oWE(              oCommitData[`COMMIT_WE_RNG]                                   ),
 
        .oDestination(     oCommitData[`COMMIT_DST_RNG]                                  ),
 
        .oResult(          {oCommitData[`X_RNG],oCommitData[`Y_RNG],oCommitData[`Z_RNG]} )
 
 
 
 
 
 
);
);
 
 
 
assign oBusy = (ReadInProgress)? /*oTMEMDataRequest*/ ~iTMEMDataAvailable : wBusy; /// | wIOTrigger_Pre |  wExeDone_pre1 | wExeDone_pre2 | wExeDone;
 
 
 
//assign oCommitResquest      = 1'b0;                             //This is always zero since we are not writting anything into the RF
 
//assign oCommitData          = `COMMIT_PACKET_SIZE'd0;    //This is always zero since we are not writting anything into the RF
 
assign oOMEMWriteEnable     = (wIOTrigger && wIOOperation == `IO_OPERATION_OMWRITE ) ? wIOTrigger : 1'b0;
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 96 ) FFD_SRC0
 
(       Clock, Reset, wIOTrigger_Pre , wRS1_OperandA, oOMEMWriteData );
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 96 ) FFD_SRC1
 
(       Clock, Reset, wIOTrigger_Pre , wRS1_OperandB, oOMEMWriteAddress );
 
 
assign oCommitResquest   = 1'b0;                                  //This is always zero since we are writting anything into the RF
 
assign oCommitData       = `COMMIT_PACKET_SIZE'd0;    //This is always zero since we are writting anything into the RF
//assign oOMEMWriteData    = wRS1_OperandA;             //Write 96 bits to external memory OMEM
assign oOMEMWriteData    = wRS1_OperandA;             //Write 96 bits to external memory OMEM
//assign oOMEMWriteAddress = wRS1_OperandB;             //Each 32 bit words has the write address
assign oOMEMWriteAddress = wRS1_OperandB;             //Each 32 bit words has the write address
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD0
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD0
(       Clock, Reset, 1'b1 , wRS_OMWRITE_Trigger | wExeDone_pre1 | wExeDone_pre2, oOMEMWriteEnable );
(       Clock, Reset, 1'b1 , wIOTrigger_Pre | wExeDone_pre1 | wExeDone_pre2, wIOTrigger );
 
 
//It takes 3 clock cycles to write the 96 bits into OMEM
//It takes 3 clock cycles to write the 96 bits into OMEM
wire wExeDone_pre1,wExeDone_pre2;
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD1
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD1
(       Clock, Reset, 1'b1 , wRS_OMWRITE_Trigger, wExeDone_pre1 );
(       Clock, Reset, 1'b1 , wIOTrigger_Pre, wExeDone_pre1 );
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD2
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD2
(       Clock, Reset, 1'b1 , wExeDone_pre1, wExeDone_pre2 );
(       Clock, Reset, 1'b1 , wExeDone_pre1, wExeDone_pre2 );
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD3
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD3
(       Clock, Reset, 1'b1 , wExeDone_pre2, wExeDone );
(       Clock, Reset, 1'b1 , wExeDone_pre2, wExeDone_pre3 );
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD4
 
(       Clock, Reset, 1'b1 , wExeDone_pre3, wExeDone_pre4 );
 
 
 
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) DONE_FFD5
 
(       Clock, Reset, 1'b1 ,oTMEMDataRequest , ReadInProgress_Delay );
 
 
assign wCommitGranted = wExeDone;
assign wExeDone = (ReadInProgress_Delay) ? iTMEMDataAvailable : wExeDone_pre3;
 
assign wCommitGranted = (ReadInProgress_Delay) ? wExeDone : wExeDone_pre4;
 
//assign wCommitGranted = wExeDone;
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.