From 36f693c58e2bdd509b557772ad02a029f568c94a Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 16 Apr 2024 02:29:29 -0700 Subject: [PATCH 1/6] hdl: fixup more timing issues --- hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd | 23 +++++++++++++------ hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd | 20 ++++++++++++---- .../bladerf-micro/constraints/bladerf.sdc | 2 +- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd b/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd index a525ab2b..d1d156c5 100644 --- a/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd +++ b/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd @@ -92,7 +92,10 @@ architecture simple of fifo_reader is meta_read : std_logic; meta_cache : std_logic_vector(META_FIFO_DATA_WIDTH-1 downto 0); meta_p_time : unsigned(63 downto 0); + meta_p_time_r : unsigned(63 downto 0); meta_time_go : std_logic; + meta_fifo_empty : std_logic; + meta_fifo_data : std_logic_vector(META_FIFO_DATA_WIDTH-1 downto 0); end record; constant META_FSM_RESET_VALUE : meta_fsm_t := ( @@ -104,7 +107,10 @@ architecture simple of fifo_reader is meta_read => '0', meta_cache => (others => '0'), meta_p_time => (others => '-'), - meta_time_go => '0' + meta_p_time_r => (others => '-'), + meta_time_go => '0', + meta_fifo_empty => '0', + meta_fifo_data => (others => '0') ); signal meta_current : meta_fsm_t := META_FSM_RESET_VALUE; @@ -193,7 +199,7 @@ begin end if; end process; - packet_empty <= '1' when ( meta_fifo_empty = '1' and meta_current.state /= META_WAIT ) else '0' ; + packet_empty <= '1' when ( meta_current.meta_fifo_empty = '1' and meta_current.state /= META_WAIT ) else '0' ; -- Meta FIFO combinatorial process meta_fsm_comb : process( all ) @@ -205,26 +211,29 @@ begin meta_future.meta_read <= '0'; meta_future.meta_pkt_sop <= '0'; meta_future.meta_pkt_eop <= '0'; + meta_future.meta_fifo_empty <= meta_fifo_empty; + meta_future.meta_fifo_data <= meta_fifo_data; + meta_time := unsigned(meta_current.meta_fifo_data(95 downto 32)) - 1; + meta_future.meta_p_time_r <= meta_time; case meta_current.state is when META_LOAD => meta_future.skip_padding <= '0'; - meta_time := unsigned(meta_fifo_data(95 downto 32)) - 1; - meta_future.meta_p_time <= meta_time; - meta_future.meta_cache <= meta_fifo_data; + meta_future.meta_p_time <= meta_current.meta_p_time_r; + meta_future.meta_cache <= meta_current.meta_fifo_data; if( meta_current.dma_downcount = NUM_STREAMS ) then meta_future.dma_downcount <= 0; end if; if( fifo_current.ch_shift = 0 ) then - if( meta_fifo_empty = '0' and (packet_en = '0' or + if( meta_current.meta_fifo_empty = '0' and (packet_en = '0' or (packet_en = '1' and packet_ready = '1') ) ) then meta_future.meta_read <= '1'; meta_future.state <= META_WAIT; - if( packet_en = '1' or meta_time /= timestamp ) then + if( packet_en = '1' or meta_current.meta_p_time_r /= timestamp ) then meta_future.meta_time_go <= '0'; else meta_future.meta_time_go <= '1'; diff --git a/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd b/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd index a6cdfed9..491994e4 100644 --- a/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd +++ b/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd @@ -136,6 +136,9 @@ architecture simple of fifo_writer is signal sync_mini_exp: std_logic_vector(1 downto 0); + signal meta_fifo_used_v_r : unsigned(meta_fifo_usedw'length downto 0) := (others => '0'); + signal fifo_used_v_r : unsigned(fifo_usedw'length downto 0) := (others => '0'); + begin -- Throw an error if port widths don't make sense @@ -167,11 +170,21 @@ begin if( reset = '1' ) then fifo_enough <= false; fifo_used_v := (others => '0'); + meta_fifo_used_v_r <= (others => '0'); + fifo_used_v_r <= (others => '0'); elsif( rising_edge(clock) ) then + -- the outputs of the dcfifo are not registered so give the long combinatorial + -- data path, let's register the values. one extra clock cycle will not change + -- the fidelity of the result. the meta_fifo represents at minimum 204 timestamps. + -- there is no way for an off by 1 clock cycle timing to overflow the meta fifo + -- when the buffer leaves 4 full meta buffers empty fifo_used_v := unsigned(fifo_full & fifo_usedw); + fifo_used_v_r <= fifo_used_v; meta_fifo_used_v := unsigned(meta_fifo_full & meta_fifo_usedw); - if( fifo_full = '0' and ((FIFO_MAX - fifo_used_v) > ( dma_buf_size * 4 )) and - ( ( meta_en = '1' and meta_fifo_full = '0' and ( META_MAX - 4 ) > meta_fifo_used_v ) + meta_fifo_used_v_r <= meta_fifo_used_v; + + if( fifo_full = '0' and ((FIFO_MAX - fifo_used_v_r) > ( dma_buf_size * 4 )) and + ( ( meta_en = '1' and meta_fifo_full = '0' and ( META_MAX - 4 ) > meta_fifo_used_v_r ) or (meta_en = '0') ) ) then fifo_enough <= true; else @@ -263,11 +276,10 @@ begin when META_WRITE => for i in in_samples'range loop - if (meta_fifo_full = '0') and (in_samples(i).data_v = '1') then + if (meta_fifo_full = '0' and in_samples(i).data_v = '1') then meta_future.meta_write <= '1'; meta_future.meta_written <= '1'; meta_future.state <= META_DOWNCOUNT; - exit; -- Exit loop after first match end if; end loop; diff --git a/hdl/fpga/platforms/bladerf-micro/constraints/bladerf.sdc b/hdl/fpga/platforms/bladerf-micro/constraints/bladerf.sdc index d01c8a29..41b5ca59 100644 --- a/hdl/fpga/platforms/bladerf-micro/constraints/bladerf.sdc +++ b/hdl/fpga/platforms/bladerf-micro/constraints/bladerf.sdc @@ -71,7 +71,7 @@ set_false_path -from exp_present -to * set_false_path -from pwr_status -to * # JTAG settings -create_clock -name {altera_reserved_tck} -period 10 [get_ports {altera_reserved_tck}] +create_clock -name {altera_reserved_tck} -period 100 [get_ports {altera_reserved_tck}] set_clock_groups -asynchronous -group {altera_reserved_tck} set_false_path -from [get_ports {altera_reserved_tms}] set_false_path -from [get_ports {altera_reserved_tdi}] From 14917b9f2d9720553d3c256e232f46e3be920551 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Tue, 16 Apr 2024 17:12:02 -0500 Subject: [PATCH 2/6] hdl: init meta_fifo_empty to 1 [==========] 32 tests from 1 test suite ran. (1785986 ms total) [ PASSED ] 20 tests. [ FAILED ] 12 tests, listed below: [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/16b01, where GetParam() = (false, false, true) [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/16b10, where GetParam() = (false, true, false) [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/16b11, where GetParam() = (false, true, true) [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/8b01, where GetParam() = (true, false, true) [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/8b10, where GetParam() = (true, true, false) [ FAILED ] hdl/verify.fx3_gpif_iq_8bit_tb/8b11, where GetParam() = (true, true, true) [ FAILED ] hdl/verify.rx_counter_8bit_tb/16b01, where GetParam() = (false, false, true) [ FAILED ] hdl/verify.rx_counter_8bit_tb/16b10, where GetParam() = (false, true, false) [ FAILED ] hdl/verify.rx_counter_8bit_tb/16b11, where GetParam() = (false, true, true) [ FAILED ] hdl/verify.rx_counter_8bit_tb/8b01, where GetParam() = (true, false, true) [ FAILED ] hdl/verify.rx_counter_8bit_tb/8b10, where GetParam() = (true, true, false) [ FAILED ] hdl/verify.rx_counter_8bit_tb/8b11, where GetParam() = (true, true, true) 12 FAILED TESTS --- hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd b/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd index d1d156c5..d4cfb406 100644 --- a/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd +++ b/hdl/fpga/ip/nuand/synthesis/fifo_reader.vhd @@ -109,7 +109,7 @@ architecture simple of fifo_reader is meta_p_time => (others => '-'), meta_p_time_r => (others => '-'), meta_time_go => '0', - meta_fifo_empty => '0', + meta_fifo_empty => '1', meta_fifo_data => (others => '0') ); From 3ae2a838a9477c32ba9d47c75275c23120ba58b9 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Wed, 17 Apr 2024 11:31:00 -0500 Subject: [PATCH 3/6] hdl: fix first sample drop in fifo_writer This fixes the first sample being dropped in both meta and non-meta modes. fifo_write is now asserted through procedure and executes on HOLDOFF exit. Regression test results: $ make test_libbladeRF [ OK ] libbladeRF.scheduled_retune (19450 ms) [----------] 29 tests from libbladeRF (297804 ms total) [==========] 29 tests from 1 test suite ran. (297804 ms total) [ PASSED ] 29 tests. $ make test_hdl [----------] 31 tests from hdl (1354828 ms total) [----------] 32 tests from hdl/verify (2319711 ms total) [==========] 63 tests from 2 test suites ran. (3674539 ms total) [ PASSED ] 63 tests. --- hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd | 103 ++++++++++++++------ 1 file changed, 73 insertions(+), 30 deletions(-) diff --git a/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd b/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd index 491994e4..9ae1d24e 100644 --- a/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd +++ b/hdl/fpga/ip/nuand/synthesis/fifo_writer.vhd @@ -119,6 +119,8 @@ architecture simple of fifo_writer is fifo_write : std_logic; fifo_data : unsigned(fifo_data'range); samples_left : natural range 0 to in_sample_controls'length; + in_sample_controls_r: sample_controls_t(0 to NUM_STREAMS-1); + in_samples_r : sample_streams_t(0 to NUM_STREAMS-1); eight_bit_delay : std_logic; end record; @@ -128,6 +130,8 @@ architecture simple of fifo_writer is fifo_write => '0', fifo_data => (others => '-'), samples_left => 0, + in_sample_controls_r=> (others => SAMPLE_CONTROL_DISABLE), + in_samples_r => (others => ZERO_SAMPLE), eight_bit_delay => '0' ); @@ -426,6 +430,48 @@ begin return rv; end function; + procedure handle_fifo_write( + signal fifo_current : in fifo_fsm_t; + signal meta_current : in meta_fsm_t; + signal meta_en : in std_logic; + signal eight_bit_mode_en : in std_logic; + variable write_req : out std_logic; + signal fifo_future : out fifo_fsm_t + ) is + variable in_sample_controls : sample_controls_t(0 to NUM_STREAMS-1); + variable in_samples : sample_streams_t(0 to NUM_STREAMS-1); + begin + in_sample_controls := fifo_current.in_sample_controls_r; + in_samples := fifo_current.in_samples_r; + + if( ((meta_current.meta_written = '1') or (meta_en = '0')) ) then + -- Check for valid data + write_req := '0'; + for i in in_sample_controls'range loop + if( in_sample_controls(i).enable = '1' ) then + write_req := write_req or in_samples(i).data_v; + end if; + end loop; + + -- Received valid data + if( write_req = '1' ) then + if( fifo_current.samples_left = 0 ) then + fifo_future.samples_left <= NUM_STREAMS - count_enabled_channels(in_sample_controls); + if( eight_bit_mode_en = '1' ) then + fifo_future.fifo_write <= write_req and fifo_current.eight_bit_delay; + fifo_future.eight_bit_delay <= not fifo_current.eight_bit_delay; + else + fifo_future.fifo_write <= write_req; + end if; + else + -- MIMO PACKER: STEP 3 of 3 + fifo_future.samples_left <= fifo_current.samples_left - 1; + end if; + end if; + else + fifo_future.fifo_write <= '0'; + end if; + end; variable write_req : std_logic := '0'; @@ -436,12 +482,19 @@ begin fifo_future.fifo_clear <= '0'; fifo_future.fifo_write <= '0'; + fifo_future.in_samples_r <= in_samples; + fifo_future.in_sample_controls_r <= in_sample_controls; + -- MIMO PACKER: STEP 1 of 3 if( packet_en = '0' ) then if( eight_bit_mode_en = '1' ) then - fifo_future.fifo_data <= pack_eight_bit_mode(in_sample_controls, in_samples, fifo_current.fifo_data); + fifo_future.fifo_data <= pack_eight_bit_mode(fifo_current.in_sample_controls_r, + fifo_current.in_samples_r, + fifo_current.fifo_data); else - fifo_future.fifo_data <= pack(in_sample_controls, in_samples, fifo_current.fifo_data); + fifo_future.fifo_data <= pack(fifo_current.in_sample_controls_r, + fifo_current.in_samples_r, + fifo_current.fifo_data); end if; end if; @@ -511,34 +564,14 @@ begin when WRITE_SAMPLES => - if( ((meta_current.meta_written = '1') or (meta_en = '0')) ) then - - -- Check for valid data - write_req := '0'; - for i in in_sample_controls'range loop - if( in_sample_controls(i).enable = '1' ) then - write_req := write_req or in_samples(i).data_v; - end if; - end loop; - - -- Received valid data - if( write_req = '1' ) then - if( fifo_current.samples_left = 0 ) then - fifo_future.samples_left <= NUM_STREAMS - count_enabled_channels(in_sample_controls); - if( eight_bit_mode_en = '1' ) then - fifo_future.fifo_write <= write_req and fifo_current.eight_bit_delay; - fifo_future.eight_bit_delay <= not fifo_current.eight_bit_delay; - else - fifo_future.fifo_write <= write_req; - end if; - else - -- MIMO PACKER: STEP 3 of 3 - fifo_future.samples_left <= fifo_current.samples_left - 1; - end if; - end if; - else - fifo_future.fifo_write <= '0'; - end if; + handle_fifo_write( + fifo_current => fifo_current, + meta_current => meta_current, + meta_en => meta_en, + eight_bit_mode_en => eight_bit_mode_en, + write_req => write_req, + fifo_future => fifo_future + ); if( fifo_full = '1' or ( meta_current.meta_written = '0' and meta_en = '1') ) then fifo_future.fifo_write <= '0'; @@ -549,6 +582,16 @@ begin if( fifo_enough ) then fifo_future.state <= WRITE_SAMPLES; + + handle_fifo_write( + fifo_current => fifo_current, + meta_current => meta_current, + meta_en => meta_en, + eight_bit_mode_en => eight_bit_mode_en, + write_req => write_req, + fifo_future => fifo_future + ); + end if; when others => From 006f32ad520f5649c2458e5f206f48039bd4e164 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Thu, 2 May 2024 19:21:51 -0500 Subject: [PATCH 4/6] hdl: nios: add response delay if new clock is selected --- .../software/bladeRF_nios/src/devices_inline.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hdl/fpga/platforms/common/bladerf/software/bladeRF_nios/src/devices_inline.h b/hdl/fpga/platforms/common/bladerf/software/bladeRF_nios/src/devices_inline.h index 7339b94d..430fbefc 100644 --- a/hdl/fpga/platforms/common/bladerf/software/bladeRF_nios/src/devices_inline.h +++ b/hdl/fpga/platforms/common/bladerf/software/bladeRF_nios/src/devices_inline.h @@ -27,6 +27,7 @@ #include #include +#include #include "system.h" #include "altera_avalon_spi.h" @@ -41,7 +42,23 @@ static inline uint32_t control_reg_read(void) static inline void control_reg_write(uint32_t value) { + const size_t CFG_GPIO_CLOCK_SELECT = 18; // Refer to bladerf2_common.h + const uint32_t CLK_SEL_MASK = (1 << CFG_GPIO_CLOCK_SELECT); + uint32_t current_clock_select, requested_clock_select; + bool delay_nios_response = false; + + current_clock_select = control_reg_read() & CLK_SEL_MASK; + requested_clock_select = value & CLK_SEL_MASK; + delay_nios_response = current_clock_select != requested_clock_select; + IOWR_ALTERA_AVALON_PIO_DATA(CONTROL_BASE, value); + + // Adding a delay to allow the Nios and FX3 Plls + // to stabilize before we send back the Nios response. + if (delay_nios_response) { + DBG("__resp_delay__"); + usleep(5); + } } static inline uint32_t rffe_csr_read(void) From 26beca1c72742b25d3aee62aabf6fc1c6d90828f Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Thu, 16 May 2024 13:28:16 -0500 Subject: [PATCH 5/6] hdl: add clock control blocks for system and fx3 plls Resolves Nios and FX3 lockup when SI53304 clock select assignments are made. The FX3 pclk and Nios system PLLs lose lock when the SI53304 transitions between clock sources and this prevents invalid cycles from making it through. --- hdl/fpga/ip/altera/clk_ctrl/clk_ctrl.vhd | 61 +++++++++++++++++++ .../bladerf-micro/bladerf-hosted.qip | 1 + .../bladerf-micro/vhdl/bladerf-hosted.vhd | 20 +++++- .../bladerf-micro/vhdl/bladerf_p.vhd | 8 +++ 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 hdl/fpga/ip/altera/clk_ctrl/clk_ctrl.vhd diff --git a/hdl/fpga/ip/altera/clk_ctrl/clk_ctrl.vhd b/hdl/fpga/ip/altera/clk_ctrl/clk_ctrl.vhd new file mode 100644 index 00000000..08747087 --- /dev/null +++ b/hdl/fpga/ip/altera/clk_ctrl/clk_ctrl.vhd @@ -0,0 +1,61 @@ +-- Copyright (c) 2024 Nuand LLC +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the "Software"), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +-- copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +-- THE SOFTWARE. + +library ieee; + use ieee.std_logic_1164.all; + use ieee.math_real.all; + +entity clk_ctrl is + port ( + inclk :in std_logic; + ena :in std_logic; + outclk :out std_logic + ); +end entity clk_ctrl; + +architecture rtl of clk_ctrl is + + component altclkctrl + generic ( + clock_type : string := "Auto"; + ena_register_mode : string := "none"; + number_of_clocks : integer := 1 + ); + port ( + inclk : in std_logic_vector(0 downto 0); + ena : in std_logic; + outclk : out std_logic + ); + end component; + + signal clk_ctrl_out : std_logic; + +begin + + clkctrl : altclkctrl + port map ( + inclk => (0 => inclk), + ena => ena, + outclk => clk_ctrl_out + ); + + outclk <= clk_ctrl_out; + +end architecture rtl; diff --git a/hdl/fpga/platforms/bladerf-micro/bladerf-hosted.qip b/hdl/fpga/platforms/bladerf-micro/bladerf-hosted.qip index 0fc25dad..42f5e944 100644 --- a/hdl/fpga/platforms/bladerf-micro/bladerf-hosted.qip +++ b/hdl/fpga/platforms/bladerf-micro/bladerf-hosted.qip @@ -8,6 +8,7 @@ set opencores_ip [file normalize [file join $here ../../ip/opencores]] # Altera IP set_global_assignment -name VHDL_FILE [file normalize [file join $altera_ip common_dcfifo/common_dcfifo.vhd]] +set_global_assignment -name VHDL_FILE [file normalize [file join $altera_ip clk_ctrl/clk_ctrl.vhd]] set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/wrappers/tx_fifo.vhd]] set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/wrappers/tx_meta_fifo.vhd]] set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/wrappers/rx_fifo.vhd]] diff --git a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd index 009b2a23..5d634e5d 100644 --- a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd +++ b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd @@ -39,10 +39,12 @@ architecture hosted_bladerf of bladerf is signal sys_reset : std_logic; signal sys_clock : std_logic; + signal sys_clock_out : std_logic; signal sys_pll_locked : std_logic; signal sys_pll_reset : std_logic; signal fx3_pclk_pll : std_logic; + signal fx3_pclk_pll_out : std_logic; signal fx3_pclk_pll_locked : std_logic; signal fx3_pclk_pll_reset : std_logic; @@ -202,10 +204,17 @@ begin port map ( refclk => c5_clock2, rst => sys_pll_reset, - outclk_0 => sys_clock, + outclk_0 => sys_clock_out, locked => sys_pll_locked ); + U_system_pll_ctrl : component clk_ctrl + port map ( + inclk => sys_clock_out, + ena => sys_pll_locked, + outclk => sys_clock + ); + U_pll_reset_pll : entity work.pll_reset generic map ( SYS_CLOCK_FREQ_HZ => 38_400_000, @@ -223,10 +232,17 @@ begin port map ( refclk => fx3_pclk, rst => fx3_pclk_pll_reset, - outclk_0 => fx3_pclk_pll, + outclk_0 => fx3_pclk_pll_out, locked => fx3_pclk_pll_locked ); + U_fx3_pll_ctrl : component clk_ctrl + port map ( + inclk => fx3_pclk_pll_out, + ena => fx3_pclk_pll_locked, + outclk => fx3_pclk_pll + ); + U_pll_reset_fx3_pll : entity work.pll_reset generic map ( SYS_CLOCK_FREQ_HZ => 100_000_000, diff --git a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf_p.vhd b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf_p.vhd index 8555b527..519d57db 100644 --- a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf_p.vhd +++ b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf_p.vhd @@ -50,6 +50,14 @@ package bladerf_p is ); end component; + component clk_ctrl + port ( + inclk :in std_logic; + ena :in std_logic; + outclk :out std_logic + ); + end component; + component nios_system is port ( clk_clk : in std_logic := 'X'; From 1de1453b1030c225348258d32d9f4c234a1451cd Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Fri, 24 May 2024 16:36:05 -0500 Subject: [PATCH 6/6] DEV hdl: hard set si53304 to external --- hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd index 5d634e5d..aea6a7d2 100644 --- a/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd +++ b/hdl/fpga/platforms/bladerf-micro/vhdl/bladerf-hosted.vhd @@ -527,7 +527,7 @@ begin nios_gpio.i.pwr_status <= pwr_status; -- SI53304 controls / clock output enables - si_clock_sel <= nios_gpio.o.si_clock_sel; + si_clock_sel <= '1'; -- si_clock_sel <= nios_gpio.o.si_clock_sel; c5_clock2_oe <= '1'; exp_clock_oe <= exp_present and exp_clock_req; ufl_clock_oe <= nios_gpio.o.ufl_clock_oe;