协议学习:arm_dap
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
协议学习:arm_dap [2024/12/12 09:11] – [2. DPACC & APACC TDR] user01 | 协议学习:arm_dap [2024/12/12 17:41] (当前版本) – [5. verilog example code] user01 | ||
---|---|---|---|
行 54: | 行 54: | ||
{{: | {{: | ||
+ | |||
+ | SELECT:\\ | ||
+ | {{: | ||
行 117: | 行 120: | ||
repeat(len-1) begin | repeat(len-1) begin | ||
tck_cycle(1' | tck_cycle(1' | ||
- | shift_ret[i] = sample_tdo; | + | shift_ret[i] = sample_tdo; i = i+1; |
- | | + | |
end | end | ||
tck_cycle(1' | tck_cycle(1' | ||
+ | shift_ret[i] = sample_tdo; i = i+1; | ||
tck_cycle(1' | tck_cycle(1' | ||
tck_cycle(1' | tck_cycle(1' | ||
行 140: | 行 143: | ||
repeat(len-1) begin | repeat(len-1) begin | ||
tck_cycle(1' | tck_cycle(1' | ||
- | shift_ret[i] = sample_tdo; | + | shift_ret[i] = sample_tdo; i = i+1; |
- | | + | |
end | end | ||
tck_cycle(1' | tck_cycle(1' | ||
+ | shift_ret[i] = sample_tdo; i = i+1; | ||
tck_cycle(1' | tck_cycle(1' | ||
tck_cycle(1' | tck_cycle(1' | ||
行 156: | 行 159: | ||
input [7:0] ap_addr; | input [7:0] ap_addr; | ||
input | input | ||
+ | |||
+ | reg [7:0] ap_sel; | ||
begin | begin | ||
行 163: | 行 168: | ||
#1000; | #1000; | ||
// | // | ||
- | shift_dr(35, | + | |
+ | | ||
#1000; | #1000; | ||
行 187: | 行 193: | ||
input | input | ||
- | reg [31:0] xpacc_data; | + | reg |
- | reg [2:0] ack; | + | |
- | | + | |
begin | begin | ||
行 196: | 行 201: | ||
#1000; | #1000; | ||
// | // | ||
- | shift_dr(35, | + | |
+ | | ||
#1000; | #1000; | ||
行 214: | 行 220: | ||
#1000; | #1000; | ||
- | + | ||
// dpacc.reserved | // dpacc.reserved | ||
shift_ir(4, 4'ha); | shift_ir(4, 4'ha); | ||
#1000; | #1000; | ||
- | | + | shift_dr(35, |
- | | + | #1000; |
- | xpacc_data = shift_ret[34: | + | |
- | ack = shift_ret[2: | + | |
- | $display(" | + | |
- | if (ack == 3'h2) break; | + | |
- | end | + | |
- | # | + | |
- | + | ||
- | + | ||
- | | + | |
end | end | ||
endtask | endtask | ||
行 277: | 行 274: | ||
end | end | ||
- | task ahb_read; | ||
- | input [31:0] ahb_addr; | ||
- | reg [31:0] ahb_data; | ||
- | begin | ||
- | // // idcode | ||
- | // shift_ir(4, 4'he); | ||
- | // #1000; | ||
- | // shift_dr(32, | ||
- | // #1000; | ||
- | ahbap_write(8' | ||
- | ahbap_read(8' | ||
- | ahb_data = shift_ret[34: | ||
- | $display(" | ||
- | end | ||
- | endtask | ||
endmodule | endmodule |
协议学习/arm_dap.1733965898.txt.gz · 最后更改: 2024/12/12 09:11 由 user01