Writing /share/Web/wiki/data/cache/4/4faf7333f7798b9c45b3b94226dd71a2.metadata failed
协议学习:arm_dap
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
| 协议学习:arm_dap [2024/12/12 10:27] – [3. DP register summary] user01 | 协议学习:arm_dap [2024/12/12 17:41] (当前版本) – [5. verilog example code] user01 | ||
|---|---|---|---|
| 行 120: | 行 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' | ||
| 行 143: | 行 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' | ||
| 行 159: | 行 159: | ||
| input [7:0] ap_addr; | input [7:0] ap_addr; | ||
| input | input | ||
| + | |||
| + | reg [7:0] ap_sel; | ||
| begin | begin | ||
| 行 166: | 行 168: | ||
| #1000; | #1000; | ||
| // | // | ||
| - | shift_dr(35, | + | |
| + | | ||
| #1000; | #1000; | ||
| 行 190: | 行 193: | ||
| input | input | ||
| - | reg [31:0] xpacc_data; | + | reg |
| - | reg [2:0] ack; | + | |
| - | | + | |
| begin | begin | ||
| 行 199: | 行 201: | ||
| #1000; | #1000; | ||
| // | // | ||
| - | shift_dr(35, | + | |
| + | | ||
| #1000; | #1000; | ||
| 行 217: | 行 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 | ||
| 行 280: | 行 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.1733970474.txt.gz · 最后更改: 2024/12/12 10:27 由 user01