has anyone tried simulating an input from the pad?
# caravel
m
has anyone tried simulating an input from the pad?
n
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
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
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
Oh, I misunderstood. I didnt't try that. Sorry I couldn't help