Files
-
hardware / bubblegum / bubblegum.brd
-
hardware / bubblegum / bubblegum.sch
-
hardware / hackrf-one / baseband.kicad_sch
-
hardware / hackrf-one / clock.kicad_sch
-
hardware / hackrf-one / frontend.kicad_sch
-
hardware / hackrf-one / hackrf-one.kicad_pcb
-
hardware / hackrf-one / hackrf-one.kicad_sch
-
hardware / hackrf-one / mcu.kicad_sch
-
hardware / jawbreaker / baseband.sch
-
hardware / jawbreaker / frontend.sch
-
hardware / jawbreaker / jawbreaker.brd
-
hardware / jawbreaker / jawbreaker.sch
-
hardware / jawbreaker / mcu.sch
-
hardware / jellybean / jellybean.brd
-
hardware / jellybean / jellybean.sch
-
hardware / lemondrop / lemondrop.brd
-
hardware / lemondrop / lemondrop.sch
-
hardware / licorice / licorice.brd
-
hardware / licorice / licorice.sch
-
hardware / LNA915 / LNA915.kicad_pcb
-
hardware / LNA915 / LNA915.sch
-
hardware / lollipop / lollipop.brd
-
hardware / lollipop / lollipop.sch
-
hardware / marzipan / baseband.sch
-
hardware / marzipan / frontend.sch
-
hardware / marzipan / marzipan.kicad_pcb
-
hardware / marzipan / marzipan.sch
-
hardware / marzipan / mcu.sch
-
hardware / neapolitan / baseband.sch
-
hardware / neapolitan / frontend.sch
-
hardware / neapolitan / mcu.sch
-
hardware / neapolitan / neapolitan.kicad_pcb
-
hardware / neapolitan / neapolitan.sch
-
hardware / operacake / operacake.kicad_pcb
-
hardware / operacake / operacake.sch
Last update 2 years 1 month
by
Gianpaolo Macario
Filesfirmwarecpldsgpio_debug | |
---|---|
.. | |
Makefile | |
README.md | |
batch_svf | |
batch_xsvf | |
default.xsvf | |
sgpio_debug.xise | |
top.jed | |
top.ucf | |
top.vhd | |
top_tb.vhd |
top_tb.vhd-- -- Copyright 2012 Jared Boone -- -- This file is part of HackRF. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2, or (at your option) -- any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; see the file COPYING. If not, write to -- the Free Software Foundation, Inc., 51 Franklin Street, -- Boston, MA 02110-1301, USA. LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY top_tb IS END top_tb; ARCHITECTURE behavior OF top_tb IS COMPONENT top PORT( HOST_DATA : INOUT std_logic_vector(7 downto 0); HOST_CAPTURE : OUT std_logic; HOST_DISABLE : IN std_logic; HOST_DIRECTION : IN std_logic; HOST_DECIM_SEL : IN std_logic_vector(2 downto 0); DA : IN std_logic_vector(7 downto 0); DD : OUT std_logic_vector(9 downto 0); CODEC_CLK : IN std_logic; CODEC_X2_CLK : IN std_logic ); END COMPONENT; --Inputs signal DA : std_logic_vector(7 downto 0) := (others => '0'); signal CODEC_CLK : std_logic := '0'; signal CODEC_X2_CLK : std_logic := '0'; signal HOST_DISABLE : std_logic := '1'; signal HOST_DIRECTION : std_logic := '0'; signal HOST_DECIM_SEL : std_logic_vector(2 downto 0) := "010"; --BiDirs signal HOST_DATA : std_logic_vector(7 downto 0); --Outputs signal DD : std_logic_vector(9 downto 0); signal HOST_CAPTURE : std_logic; begin uut: top PORT MAP ( HOST_DATA => HOST_DATA, HOST_CAPTURE => HOST_CAPTURE, HOST_DISABLE => HOST_DISABLE, HOST_DIRECTION => HOST_DIRECTION, HOST_DECIM_SEL => HOST_DECIM_SEL, DA => DA, DD => DD, CODEC_CLK => CODEC_CLK, CODEC_X2_CLK => CODEC_X2_CLK ); clk_process :process begin CODEC_CLK <= '1'; CODEC_X2_CLK <= '1'; wait for 12.5 ns; CODEC_X2_CLK <= '0'; wait for 12.5 ns; CODEC_CLK <= '0'; CODEC_X2_CLK <= '1'; wait for 12.5 ns; CODEC_X2_CLK <= '0'; wait for 12.5 ns; end process; adc_proc: process begin wait until rising_edge(CODEC_CLK); wait for 9 ns; DA <= "00000000"; wait until falling_edge(CODEC_CLK); wait for 9 ns; DA <= "00000001"; end process; sgpio_proc: process begin HOST_DATA <= (others => 'Z'); HOST_DIRECTION <= '0'; HOST_DISABLE <= '1'; wait for 135 ns; HOST_DISABLE <= '0'; wait for 1000 ns; HOST_DISABLE <= '1'; wait for 100 ns; HOST_DIRECTION <= '1'; wait for 100 ns; HOST_DISABLE <= '0'; for i in 0 to 10 loop HOST_DATA <= (others => '0'); wait until rising_edge(CODEC_CLK) and HOST_CAPTURE = '1'; HOST_DATA <= (others => '1'); wait until rising_edge(CODEC_CLK) and HOST_CAPTURE = '1'; end loop; wait; end process; end;