Line 49... |
Line 49... |
output wire oInstructionWriteEnable,
|
output wire oInstructionWriteEnable,
|
output wire [`ROM_ADDRESS_WIDTH-1:0] oInstructionWriteAddress,
|
output wire [`ROM_ADDRESS_WIDTH-1:0] oInstructionWriteAddress,
|
inout wire [`WIDTH-1:0] oData,
|
inout wire [`WIDTH-1:0] oData,
|
output wire oBusy,
|
output wire oBusy,
|
output wire oDone,
|
output wire oDone,
|
|
|
|
|
|
input wire [`DATA_ROW_WIDTH-1:0] iOMEM_WriteAddress,
|
|
input wire [`DATA_ROW_WIDTH-1:0] iOMEM_WriteData,
|
|
input wire iOMEM_WriteEnable,
|
|
output wire [`WB_WIDTH-1:0] OMEM_DAT_O,
|
|
output wire [`WB_WIDTH-1:0] OMEM_ADR_O,
|
|
output wire OMEM_WE_O,
|
|
|
//Theia specific interfaces
|
//Theia specific interfaces
|
input wire MST_I,
|
input wire MST_I,
|
//Wish Bone Interfaces
|
//Wish Bone Interfaces
|
output wire [31:0] DAT_O,
|
output wire [31:0] DAT_O,
|
input wire [31:0] DAT_I,
|
input wire [31:0] DAT_I,
|
Line 66... |
Line 75... |
input wire STB_I,
|
input wire STB_I,
|
output wire CYC_O,
|
output wire CYC_O,
|
input wire CYC_I,
|
input wire CYC_I,
|
input wire [1:0] TGA_I,
|
input wire [1:0] TGA_I,
|
output wire [1:0] TGC_O,
|
output wire [1:0] TGC_O,
|
input wire GNT_I
|
input wire GNT_I,
|
|
|
|
|
|
output wire [`DATA_ROW_WIDTH-1:0] oTMEMReadData,
|
|
input wire iTMEMDataRequest,
|
|
input wire [`DATA_ROW_WIDTH-1:0] iTMEMReadAddress,
|
|
output wire oTMEMDataAvailable,
|
|
|
|
input wire TMEM_ACK_I,
|
|
input wire [`WB_WIDTH-1:0] TMEM_DAT_I ,
|
|
output wire [`WB_WIDTH-1:0] TMEM_ADR_O ,
|
|
output wire TMEM_WE_O,
|
|
output wire TMEM_STB_O,
|
|
output wire TMEM_CYC_O,
|
|
input wire TMEM_GNT_I
|
);
|
);
|
|
|
|
|
wire [`WIDTH-1:0] wMEMToWBM2__ReadDataElement;
|
wire [`WIDTH-1:0] wMEMToWBM2__ReadDataElement;
|
wire [`WIDTH-1:0] wMEMToWBM2__ReadDataElement2;
|
wire [`WIDTH-1:0] wMEMToWBM2__ReadDataElement2;
|
Line 95... |
Line 118... |
wire wWBSToMEM2__oDataWriteEnable;
|
wire wWBSToMEM2__oDataWriteEnable;
|
wire[`DATA_ADDRESS_WIDTH-1:0] wWBSToMEM2__oDataWriteAddress;
|
wire[`DATA_ADDRESS_WIDTH-1:0] wWBSToMEM2__oDataWriteAddress;
|
wire[`DATA_ADDRESS_WIDTH-1:0] wWBMToMEM2__oDataWriteAddress;
|
wire[`DATA_ADDRESS_WIDTH-1:0] wWBMToMEM2__oDataWriteAddress;
|
|
|
|
|
|
|
|
//***********new*****************/
|
|
|
|
|
|
Module_OMemInterface OMI
|
|
(
|
|
.Clock( Clock ),
|
|
.Reset( Reset ),
|
|
.iWriteEnable( iOMEM_WriteEnable ),
|
|
.iData( iOMEM_WriteData ),
|
|
.iAddress( iOMEM_WriteAddress ),
|
|
.ADR_O( OMEM_ADR_O ),
|
|
.DAT_O( OMEM_DAT_O ),
|
|
.WE_O( OMEM_WE_O )
|
|
|
|
);
|
|
|
|
Module_TMemInterface TMI
|
|
(
|
|
.Clock( Clock ),
|
|
.Reset( Reset ),
|
|
.iEnable( iTMEMDataRequest ),
|
|
.iAddress( iTMEMReadAddress ),
|
|
.oData( oTMEMReadData ),
|
|
.oDone( oTMEMDataAvailable ),
|
|
|
|
.ACK_I( TMEM_ACK_I ),
|
|
.GNT_I( TMEM_GNT_I ),
|
|
.DAT_I( TMEM_DAT_I ),
|
|
.ADR_O( TMEM_ADR_O ),
|
|
.WE_O( TMEM_WE_O ),
|
|
.STB_O( TMEM_STB_O ),
|
|
.CYC_O( TMEM_CYC_O )
|
|
|
|
|
|
);
|
|
//***********new*****************/
|
|
|
assign oBusy = CYC_O;
|
assign oBusy = CYC_O;
|
wire wReadOperation;
|
wire wReadOperation;
|
assign wReadOperation = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? 0 : 1;
|
assign wReadOperation = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? 0 : 1;
|
|
|
|
|
Line 127... |
Line 188... |
assign w2MEMToWBM_BusOperationComplete = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? ACK_I : wWBMToMEM2__Done;
|
assign w2MEMToWBM_BusOperationComplete = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? ACK_I : wWBMToMEM2__Done;
|
|
|
|
|
wire [`DATA_ADDRESS_WIDTH-1:0] w2MEMToWBM_DataPointer;
|
wire [`DATA_ADDRESS_WIDTH-1:0] w2MEMToWBM_DataPointer;
|
assign w2MEMToWBM_DataPointer = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? iDat_O_Pointer : iAdr_O_Pointer;
|
assign w2MEMToWBM_DataPointer = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? iDat_O_Pointer : iAdr_O_Pointer;
|
|
|
|
|
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
MEM2WBMUnitB MEMToWBM
|
MEM2WBMUnitB MEMToWBM
|
(
|
(
|
.Clock( Clock ),
|
.Clock( Clock ),
|
.Reset( Reset ),
|
.Reset( Reset ),
|
Line 149... |
Line 212... |
.iDataInitialStorageAddress( iAdr_DataWriteBack ), ////########
|
.iDataInitialStorageAddress( iAdr_DataWriteBack ), ////########
|
.oDataWriteAddress( wMEMToWBM2_WBMToMEM_RAMWriteAddr ), ////########
|
.oDataWriteAddress( wMEMToWBM2_WBMToMEM_RAMWriteAddr ), ////########
|
.oDone( wMEMToWBM_2__Done )
|
.oDone( wMEMToWBM_2__Done )
|
);
|
);
|
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
wire [`DATA_ADDRESS_WIDTH-1:0] wTemp1;
|
wire [`DATA_ADDRESS_WIDTH-1:0] wTemp1;
|
assign wWBMToMEM2__oDataWriteAddress = (iAdr_O_Type == `ADR_IMM) ? iAdr_DataWriteBack : wTemp1;
|
assign wWBMToMEM2__oDataWriteAddress = (iAdr_O_Type == `ADR_IMM) ? iAdr_DataWriteBack : wTemp1;
|
WBM2MEMUnit WBMToMEM
|
|
(
|
|
.Clock( Clock ),
|
|
.Reset( Reset ),
|
|
.iEnable( w2WBMToMEM__Enable & (wReadOperation | MST_I) ), //Don't write stuff to MEM unless is Read bus cycle
|
|
|
|
.iStore( iStore | ~iAdr_O_Type ),
|
|
.iWriteBack_Set( iWriteBack_Set ),
|
|
.iAdr_DataWriteBack(w2WBMToMEM_MEMWriteAddress ),
|
|
//.iAdr_DataWriteBack( iAdr_DataWriteBack ),
|
|
.iWBMDataAvailable( wWBM_2_WBMToMEM_DataAvailable ),
|
|
.iWBMData( wWBM_2_WBMToMEM_Data ),
|
|
|
|
.oDataBus( wWBMToMEM2__oDataBus ),
|
|
.oData( oData ),
|
|
.oEnableWBM( wWBMToMEM_2_WBM_Enable ),
|
|
.oDataWriteAddress( wTemp1 ),///*******************!!!!!!!!!!!!!!
|
|
.oDataWriteEnable( wWBMToMEM2__oDataWriteEnable ),
|
|
.oDone( wWBMToMEM2__Done )
|
|
);
|
|
|
|
|
|
|
|
wire [`WIDTH-1:0] wADR_O_InitialAddress;
|
wire [`WIDTH-1:0] wADR_O_InitialAddress;
|
assign wADR_O_InitialAddress = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? wMEMToWBM2__ReadDataElement2 : wMEMToWBM_2__Address;
|
assign wADR_O_InitialAddress = (iBusCyc_Type == `WB_SIMPLE_WRITE_CYCLE) ? wMEMToWBM2__ReadDataElement2 : wMEMToWBM_2__Address;
|
Line 236... |
Line 284... |
.iAddress( wADR_O_InitialAddress ),
|
.iAddress( wADR_O_InitialAddress ),
|
.oDataReady( wWBM_2_WBMToMEM_DataAvailable ),
|
.oDataReady( wWBM_2_WBMToMEM_DataAvailable ),
|
.iData( wMEMToWBM2__ReadDataElement ),
|
.iData( wMEMToWBM2__ReadDataElement ),
|
.oData( wWBM_2_WBMToMEM_Data )
|
.oData( wWBM_2_WBMToMEM_Data )
|
);
|
);
|
|
|
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
WishBoneSlaveUnit WBS
|
WishBoneSlaveUnit WBS
|
(
|
(
|
|
|
.CLK_I( Clock ),
|
.CLK_I( Clock ),
|