Hi Tim,

Thanks for the quick response!

But I couldn't find any code about `set_bscan_tunnel_ir` (I think `irscv
set_bscan_tunner_ir <value>` you mentioned is probably wrong, should be
`riscv set_bscan_tunnel_ir`, right?)
I checked the master branch of openocd GitHub and SourceForge repo.
Is it in another repository? please elaborate a bit. Thanks!

BR,
Peng


Tim Newsome <t...@sifive.com> 于2022年10月12日周三 18:01写道:

> You can set the value you need for your hardware using `irscv
> set_bscan_tunner_ir <value>`. The code you pointed at is the default value.
>
> Tim
>
> On Wed, Oct 12, 2022 at 3:15 AM peng cheng <thomas.pch...@gmail.com>
> wrote:
>
>> Registered in the mail list and repost this bug report again.
>>
>> peng cheng <thomas.pch...@gmail.com> 于2022年10月12日周三 12:08写道:
>>
>>> Hi all,
>>>
>>> Hope everyone had a nice day!
>>>
>>> Don't know whether this is the correct place, but please forward it if I
>>> am wrong.
>>>
>>> Found this tricky issue when using the RISC-V user4 JTAG tunnel on the
>>> VCU128 FPGA Xilinx board.
>>>
>>> The user4 IR is totally wrongly set in this bit of codes
>>>
>>>
>>> https://github.com/openocd-org/openocd/blob/master/src/target/riscv/riscv.c#L455
>>>
>>>         uint32_t ir_user4_raw = 0x23 << (target->tap->ir_length - 6);
>>>
>>> The correct one is 0x23924 for VCU128, and below is my temporary change
>>> to fix this.
>>>
>>> -               uint32_t ir_user4_raw = 0x23 << (target->tap->ir_length
>>> - 6);
>>> +           //uint32_t ir_user4_raw = 0x23 << (target->tap->ir_length -
>>> 6);
>>> +               uint32_t ir_user4_raw = 0x23924;
>>> +               printf("ir user4 change to 0x23924\n");
>>>
>>> IMO, the correct user4 IR should be set on the command line, something
>>> like ``--set-user4-ir`.
>>> Please let me know if I am correct and maybe discuss how to fix it.
>>>
>>> Thanks!
>>>
>>> BR,
>>> Peng
>>>
>>


Reply via email to