1 AHB-RAM UVM TB (Interface, Transaction 确定)

1. AHB-RAM

1.1 ahb-ram 验证中,用到的 ahb_if 协议信号列表

提示:通常,根据信号列表,确定 ahb_if 有哪些数据类型

DUT ahb-ram 不支持 burst 传输。用到的是 比较简单的 部分 AHB 协议。
定义的这些 master_if 与 ahb-ram dut 连接。

有些信号虽然定义了,但是,暂时不会用(为了未来扩展使用)。

信号ahbram 中 apb_if (参考 vip 的 ahb_master_if 定义)对应 AHBRAM 模块的哪个信号说明
hclklogic hclkHCLK
hresetnlogic hresetnHRESETn
master 信号,master -> bus
haddr _m1/2/3[31:0]logic[31:0] haddrHADDRAHB Addr Bus. addr bus for each master in the system.
hburst _m1/2/3 [2:0]logic[2:0] hburst表明 transfer 是否为 burst 传输(的一部分)
hbusreq _m1/2/3logic hbusreqasserted by master to request access to the bus.
hlock _m1/2/3logic hlockasserted by master to carry out a locked trans.
hsize _m1/2/3 [2:0]logic[2:0] hsizeHSIZEindicates siae of transfer. (size : )
htrans _m1/2/3 [1:0]logic[1:0] htransHTRANSindicates the type of transfer beding performed. ( type : )
hwdata _m1/2/3 [31:0]logic[31:0] hwdataHWDATAwrite data
hwrite _m1/2/3 [31:0]logic hwriteHWRITEwrite signal. 1/0 : write/read.
hprot _m1/2/3 [3:0]logic[3:0] hprotprotection control signals. (?)
arbiter 信号
hgrant _m1/2/3logic hgrantasserted by arbiter, indicate the requensting master has own the ownership of the bus.
slave 信号, slave -> bus
hreadylogic hreadyHREADYOUTslave => bus ready response from selected slave. This signal is passed to all masters and slaves.
hresp[1:0]logic [1:0] hrespHRESPslave => bus, response signal, be passed to all AHB masters.
hrdata[31:0]logic[31:0] hrdataHRDATAread data
AHBRAM 模块中,不知道如何连接的接口 (TO-DO)
HSELBRAMAHB periphreal select
HREADYAHB ready input

1.2 AHB-RAM DUT 模块端口信号列表

AHB-RAM 模块端口信号 (as slave)in/outTransaction 中变量说明
HCLKinputsystem bus clk
HRESETninputsystem bus reset
master -> slave
HSELBRAMinput不需要 (default = 1)AHB peripheral select
HREADYinput无?AHB ready input
HTRANS[1:0]inputtrans_type_enum trans_typeAHB transfer type
HSIZE[1:0]input无?AHB hsize
HWRITEinputxact_typeAHB hwrite
HADDR[ADDR_WIDTH-1:0]inputaddrAHB addr bus
HWDATA[31:0]inputdata[ ]write data bus
slave -> master
HREADYOUToutputAHB ready output to S->M mux
HRESPoutputresponse_type_enum response_typeAHB response
HRDATAoutputdata[ ]AHB read data bus

1.3 Transaction

提示:参考 AMB_SPEC 中 ahb 协议信号、时序波形
说明:定义的很多数据类型,在本次测试不一定会使用;为了未来便于拓展

枚举类型定义:
提示:与 AMBA_SPEC 中信号对应

typedef enumAHB SPEC signaltype name值定义note
respose TypeHRESP[1:0] (transfer response, AHB2)response_type_enumOKAY:00, ERROR:01, RETRY:10, SPLIT:11
trans TypeHTRANS[2:0]trans_type_enum00, 01, 10, 11
burst_sizeHSIZE[2:0]burst_size_enum8/16/32/64/128/256/512/1024-bit ()(AHB RAM 不会用,因为不支持 burst)
burst_type???
xact_typeHWRITEREAD:00 WRITE:01 IDLE_XACT:10
status_enum???INITIAL , PARTIAL_ACCEPT , ACCEPT , ABORTED

Transaction 定义:

类的成员对应的 DUT 接口信号修饰note
wdata or rdata from bus
bit[DATA_WIDTH -1:0] data[ ]HWDATA , HRDATArand
bit[ADDR_WIDTH-1:0] addrHADDRrand
the burst size of a transaction
burst_size_enum burst_size无(AHBRAM 不支持 Burst )rand
the burst type of a transaction
burst_type_enum burst_type无(AHBRAM 不支持 Burst )rand
response from the slave
response_type_enum response_typeHRESPrand
response_type_enum all_beat_response[]??
int current_data_beat_num??the beat number of current transfer
status_enum status??status = INITIAL;
the type of current transfer (可能不会使用)
trans_type_enum trans_typeHTRANS[1:0]rand
hwrite signal value when idle
bit idle_xact_hwrite = 1HWRITE??rand?

Constraint: 暂时没加

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值