So far, I have successfully compiled the blink_leds tutorial [https://github.com/Nuand/bladeRF/wiki/F ... -some-leds].
Next, I would like to modify the following tutorial code to count the number of RX samples instead of clock cycles:
Code: Select all
blink_leds : process (c4_clock)
variable counter : natural range 0 to 57_600_000 := 57_600_000;
begin
if (rising_edge(c4_clock)) then
counter := counter - 1;
if (counter = 0) then
counter := 57_600_000;
elsif (counter < 19_200_000) then
led(2) <= '0';
led(1) <= '1';
led(3) <= '1';
elsif (counter < 38_400_000) then
led(2) <= '1';
led(1) <= '0';
led(3) <= '1';
else
led(2) <= '1';
led(1) <= '1';
led(3) <= '0';
end if;
end if;
end process;
I think I would need to change rising_edge() to something else.
If I get that working, my final goal is to toggle an output pin on the XB-100 GPIO expansion board depending on the RX sample count.
Can I accomplish my goal only modifying the code in the bladerf-hosted.vhd source file?
Thanks!