has anyone tried simulating an input from the pad?
n
Nikola Petrovic
11/26/2020, 1:56 PM
Hello Matt,
I have simulated inputs from the "caravel.mprj_io" to the user project (i.e. user_project_wrapper.io_in).
For example, if you want to get input from mprj_io[20], you should set io_oeb[20] to 1 somehow inside your project. And then in your C code you should set register:
reg_mprj_io_20 = GPIO_MODE_USER_STD_INPUT_PULLDOWN;
where both "reg_mprj_io_20" and "GPIO_MODE_USER_STD_INPUT_PULLDOWN" are defined inside caravel/verilog/dv/caravel/defs.h
Value for "reg_mprj_io_20" doesn't have to be pulldown of course.
This enabled me to send signals to my project from my caravel testbench.
Hope this helps.
m
Matt Venn
11/26/2020, 2:01 PM
Hi Nikola, yes thanks I have that working already. But this is setting mprj_io, and I want to apply a signal to the pad. The reason I want to do this is to get more confidence an external signal will actually make it through to the user project
Matt Venn
11/26/2020, 2:02 PM
for example if I set io_oeb[20] to 1, then put a signal on uut.gpio_control_in[20].pad_gpio_in , nothing comes through to the project
n
Nikola Petrovic
11/26/2020, 2:05 PM
Oh, I misunderstood. I didnt't try that. Sorry I couldn't help
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.