hdl: moved gpif buf size constants to fx3 gpif package
As we add changes to the FX3, it will be much easier to have a single source of truth for the GPIF DMA sizes. This commit should not introduce any changes to simulation or synthesis results.
This commit is contained in:
parent
0dd41a3fa5
commit
3c8bf68067
14 changed files with 46 additions and 8 deletions
|
|
@ -4,6 +4,7 @@ proc compile_fx3_gpif { root } {
|
|||
vlib work
|
||||
|
||||
vcom -2008 -work work [file join $root ./synthesis/set_clear_ff.vhd]
|
||||
vcom -2008 -work work [file join $root ../../platforms/common/bladerf/vhdl/fx3_gpif_p.vhd]
|
||||
vcom -2008 -work work [file join $root ../../platforms/common/bladerf/vhdl/fx3_gpif.vhd]
|
||||
vcom -2008 -work work [file join $root ./simulation/util.vhd]
|
||||
vcom -2008 -work work [file join $root ./simulation/fx3_model.vhd]
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ proc compile_nuand { root platform } {
|
|||
|
||||
vcom -work nuand -2008 [file join $root ./synthesis/tb/atsc_tx_tb.vhd]
|
||||
|
||||
vcom -work nuand -2008 [file join $root ../../platforms/common/bladerf/vhdl/fx3_gpif_p.vhd]
|
||||
vcom -work nuand -2008 [file join $root ./simulation/fx3_model.vhd]
|
||||
vcom -work nuand -2008 [file join $root ./simulation/lms6002d_model.vhd]
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ library ieee;
|
|||
|
||||
library work;
|
||||
use work.fifo_readwrite_p.all;
|
||||
use work.fx3_gpif_p.all;
|
||||
|
||||
entity fifo_reader is
|
||||
generic (
|
||||
|
|
@ -71,8 +72,8 @@ end entity;
|
|||
|
||||
architecture simple of fifo_reader is
|
||||
|
||||
constant DMA_BUF_SIZE_SS : natural := 512;
|
||||
constant DMA_BUF_SIZE_HS : natural := 256;
|
||||
constant DMA_BUF_SIZE_SS : natural := GPIF_BUF_SIZE_SS;
|
||||
constant DMA_BUF_SIZE_HS : natural := GPIF_BUF_SIZE_HS;
|
||||
|
||||
signal dma_buf_size : natural range DMA_BUF_SIZE_HS to DMA_BUF_SIZE_SS := DMA_BUF_SIZE_SS;
|
||||
signal underflow_detected : std_logic := '0';
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ library ieee;
|
|||
|
||||
library work;
|
||||
use work.fifo_readwrite_p.all;
|
||||
use work.fx3_gpif_p.all;
|
||||
|
||||
entity fifo_writer is
|
||||
generic (
|
||||
|
|
@ -70,8 +71,8 @@ end entity;
|
|||
|
||||
architecture simple of fifo_writer is
|
||||
|
||||
constant DMA_BUF_SIZE_SS : natural := 512;
|
||||
constant DMA_BUF_SIZE_HS : natural := 256;
|
||||
constant DMA_BUF_SIZE_SS : natural := GPIF_BUF_SIZE_SS;
|
||||
constant DMA_BUF_SIZE_HS : natural := GPIF_BUF_SIZE_HS;
|
||||
|
||||
signal dma_buf_size : natural range DMA_BUF_SIZE_HS to DMA_BUF_SIZE_SS := DMA_BUF_SIZE_SS;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ set_global_assignment -name QIP_FILE [file normalize [file join $nuand_ip pll_r
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip ps_sync/vhdl/ps_sync.vhd]]
|
||||
|
||||
# Implementation Details
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/tx.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/rx-adsb.vhd]]
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip ps_sy
|
|||
set_global_assignment -name QIP_FILE [file normalize [file join $nuand_ip tone_generator/tone_generator.qip]]
|
||||
|
||||
# Implementation Details
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/tx.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/rx.vhd]]
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ set_global_assignment -name QIP_FILE [file normalize [file join $nuand_ip pll_r
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip ps_sync/vhdl/ps_sync.vhd]]
|
||||
|
||||
# Implementation Details
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/tx.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/rx.vhd]]
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synth
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip rfic_spi_controller/vhdl/rfic_spi_controller.vhd]]
|
||||
|
||||
# Implementation Details
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/tx.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/rx.vhd]]
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ compile_nuand ../../../ip/nuand bladerf-micro
|
|||
|
||||
vcom -work nuand -2008 ../vhdl/tb/nios_system.vhd
|
||||
|
||||
vcom -work nuand -2008 ../../../platforms/common/bladerf/vhdl/fx3_gpif_p.vhd
|
||||
vcom -work nuand -2008 ../../../platforms/common/bladerf/vhdl/fx3_gpif.vhd
|
||||
|
||||
vcom -work nuand -2008 ../vhdl/bladerf_p.vhd
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip syn
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/fifo_writer.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/lms6002d/vhdl/lms6002d.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/set_clear_ff.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/bladerf-adsb.vhd]]
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip syn
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/fifo_writer.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/lms6002d/vhdl/lms6002d.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/set_clear_ff.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/bladerf-atsc_tx.vhd]]
|
||||
set_global_assignment -name QIP_FILE [file normalize nios_system/synthesis/nios_system.qip]
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip syn
|
|||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/lms6002d/vhdl/bladerf_agc.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip trigger/trigger.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/set_clear_ff.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif_p.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $common_dir vhdl/fx3_gpif.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $nuand_ip synthesis/rx_packet_generator.vhd]]
|
||||
set_global_assignment -name VHDL_FILE [file normalize [file join $here vhdl/bladerf-hosted.vhd]]
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ library ieee;
|
|||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
library nuand;
|
||||
use nuand.fx3_gpif_p.all;
|
||||
|
||||
entity fx3_gpif is
|
||||
port (
|
||||
-- FX3 control signals
|
||||
|
|
@ -117,10 +120,6 @@ architecture sample_shuffler of fx3_gpif is
|
|||
constant META_DOWNCOUNT_RESET : natural := 4;
|
||||
constant FINI_DOWNCOUNT_RESET : natural := 10;
|
||||
|
||||
-- GPIF buf sizes for USB high-speed and super-speed
|
||||
constant GPIF_BUF_SIZE_HS : natural := 256;
|
||||
constant GPIF_BUF_SIZE_SS : natural := 512;
|
||||
|
||||
type dma_handshake_t is record
|
||||
rx0 : std_logic;
|
||||
rx1 : std_logic;
|
||||
|
|
|
|||
27
hdl/fpga/platforms/common/bladerf/vhdl/fx3_gpif_p.vhd
Normal file
27
hdl/fpga/platforms/common/bladerf/vhdl/fx3_gpif_p.vhd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-- 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;
|
||||
|
||||
package fx3_gpif_p is
|
||||
-- GPIF buf sizes for USB high-speed and super-speed
|
||||
constant GPIF_BUF_SIZE_HS : natural := 256;
|
||||
constant GPIF_BUF_SIZE_SS : natural := 512;
|
||||
end package fx3_gpif_p;
|
||||
Loading…
Add table
Add a link
Reference in a new issue