How to identify rail0 or ral1 in RAL transaction
2010-05-17 15:41
501 查看
Following is the solution that can identify whether current RAL access is from rail0 or rail1 automatically.
1) In svidRegFile, use 12 bits for block based address, among them lower 8 bits are “actual ” register base address, while higher 4 bits are used for SVID VR address, for example , if it is rail0, the higher 4 bits would be “4’b0000”, if rail1: 4’b0001, if rail2: 4’b0010,…..
system svidRegSys {
bytes 64;
block svidRail0=svidReg0 @'h000;
block svidRail1=svidReg1 @'h100;
}
2) In svidXactor, divide the 12 bits address into SVID VR address + register actual address as following:
task svidXactor::prepare_ralrd_trans(input svidRALTrans ral_trans);
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h07;//GETREG;
svid_trans.payload=ral_trans.addr[7:0];//register address
…
endtask
task svidXactor::prepare_ralwr_trans(input svidRALTrans ral_trans);
//phase0: send SETREGADR command
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h05;//SETREGADR;
svid_trans.payload=ral_trans.addr[7:0];//register address
…
///phase1:send SETREGDAT command
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h06;//SETREGDAT;
svid_trans.payload=ral_trans.data;//register data
endtask
1) In svidRegFile, use 12 bits for block based address, among them lower 8 bits are “actual ” register base address, while higher 4 bits are used for SVID VR address, for example , if it is rail0, the higher 4 bits would be “4’b0000”, if rail1: 4’b0001, if rail2: 4’b0010,…..
system svidRegSys {
bytes 64;
block svidRail0=svidReg0 @'h000;
block svidRail1=svidReg1 @'h100;
}
2) In svidXactor, divide the 12 bits address into SVID VR address + register actual address as following:
task svidXactor::prepare_ralrd_trans(input svidRALTrans ral_trans);
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h07;//GETREG;
svid_trans.payload=ral_trans.addr[7:0];//register address
…
endtask
task svidXactor::prepare_ralwr_trans(input svidRALTrans ral_trans);
//phase0: send SETREGADR command
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h05;//SETREGADR;
svid_trans.payload=ral_trans.addr[7:0];//register address
…
///phase1:send SETREGDAT command
svid_trans.address=ral_trans.addr[11:8];//VR address
svid_trans.cmd=5'h06;//SETREGDAT;
svid_trans.payload=ral_trans.data;//register data
endtask
相关文章推荐
- 如何获得rac环境中的主节点(how to identify master node in rac)
- How to identify all the Corrupted Objects in the Database reported by RMAN
- How to identify all the Corrupted Objects in the Database reported with RMAN
- ABAP:How to Find Bapi for Particular Transaction in SAP
- 如何获得rac环境中的主节点(how to identify master node in rac)
- How to identify a session started by a remote distributed transaction? (文档 ID 332326.1)
- How to Find Bapi for Particular Transaction in SAP
- How to use BTM as the transaction manager in Tomcat 6.x
- How to Find Bapi for Particular Transaction in SAP
- How to Find Bapi for Particular Transaction in SAP
- How to use CyclicBarrier in Java - Concurrency Tutorail(转)
- How to Identify MDS user in intranet web application ?
- How to Identify User&Password of DataBase safely in SQL statement?
- How to rollback a transaction in TSQL
- how to reference the parent form from the WPF control(Control in ElementHost)
- How to call c++ exported method and classes in c#
- How to Get Neighbors of a Mobile Node in Wireless Simulation
- How to define a custom separator in TLex
- csharp:Learn how to post JSON string to generic Handler using jQuery in ASP.Net C#.