mwilkinsonjr
07/27/2024, 5:16 AMLeo Moser
07/30/2024, 8:41 AMprocess_bit_stream
.
#include <common.h>
#include <and_2.h>
void main()
{
int i = 0;
// FPGA IOs
configure_gpio(1, GPIO_MODE_USER_STD_INPUT_NOPULL);
configure_gpio(9, GPIO_MODE_USER_STD_INPUT_NOPULL);
configure_gpio(23, GPIO_MODE_USER_STD_OUTPUT);
configure_gpio(29, GPIO_MODE_USER_STD_INPUT_NOPULL);
configure_gpio(34, GPIO_MODE_USER_STD_INPUT_NOPULL);
configure_gpio(35, GPIO_MODE_USER_STD_INPUT_NOPULL);
configure_gpio(37, GPIO_MODE_USER_STD_INPUT_NOPULL);
// ==
configure_gpio(24, GPIO_MODE_MGMT_STD_OUTPUT); // connected to prog_clk
configure_gpio(19, GPIO_MODE_MGMT_STD_OUTPUT); // connected to prog_rst
configure_gpio(18, GPIO_MODE_MGMT_STD_OUTPUT); // connected to op_rst
configure_gpio(17, GPIO_MODE_MGMT_STD_OUTPUT); // connected to isol_n
configure_gpio(20, GPIO_MODE_MGMT_STD_OUTPUT); // connected to ccff_head
configure_gpio(21, GPIO_MODE_MGMT_STD_OUTPUT); // connected to clk_sel
// and gate
configure_gpio(31, GPIO_MODE_USER_STD_INPUT_PULLDOWN); // in[121] -> GPIO[31]
configure_gpio(32, GPIO_MODE_USER_STD_INPUT_PULLDOWN); // in[120] -> GPIO[32]
configure_gpio(33, GPIO_MODE_USER_STD_OUTPUT); // out[122] -> GPIO[30]
gpio_config_load();
process_bit_stream(and_2_size, and_2);
configure_mgmt_gpio();
mgmt_gpio_wr(1); // turn on the LED
while (1){
mgmt_gpio_wr(i);
i ^= 1;
}
}
This code worked for Michael Welling, but not for me. (Note that the third comment on GPIO 33 is wrong.)
You can take a look at what we tried so far in this channel: https://discord.gg/AdAXWbvBQQ
Btw. the 6 FPGA/GPIO pins are shorted by default on the board.mwilkinsonjr
07/30/2024, 10:45 PMmwilkinsonjr
07/31/2024, 12:28 AMLeo Moser
07/31/2024, 6:20 AM