hdl: test: added variable length gpif support to fx3_model
This commit is contained in:
parent
27fe2f48ea
commit
89caa01c12
3 changed files with 13 additions and 9 deletions
|
|
@ -26,6 +26,8 @@ library ieee;
|
|||
|
||||
library work;
|
||||
use work.util.all;
|
||||
use work.fx3_gpif_p.all;
|
||||
|
||||
|
||||
entity fx3_model is
|
||||
port (
|
||||
|
|
@ -102,7 +104,7 @@ begin
|
|||
done <= rx_done and tx_done;
|
||||
|
||||
rx_sample_stream : process
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable req_time : time;
|
||||
begin
|
||||
|
|
@ -155,7 +157,7 @@ begin
|
|||
end process;
|
||||
|
||||
tx_sample_stream : process
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable timestamp_cntr : natural := 80;
|
||||
variable header_len : natural := 0;
|
||||
|
|
@ -201,7 +203,7 @@ begin
|
|||
data_out := x"12341234";
|
||||
when 2 =>
|
||||
data_out(31 downto 0) := std_logic_vector(to_signed(timestamp_cntr, 32));
|
||||
timestamp_cntr := timestamp_cntr + 508 * 2;
|
||||
timestamp_cntr := timestamp_cntr + (GPIF_BUF_SIZE_SS-4) * 2;
|
||||
when 3 =>
|
||||
data_out := (others => '0');
|
||||
when 4 =>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ library ieee;
|
|||
|
||||
library work;
|
||||
use work.util.all;
|
||||
use work.fx3_gpif_p.all;
|
||||
|
||||
architecture micro_dma of fx3_model is
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ begin
|
|||
done <= rx_done and tx_done;
|
||||
|
||||
rx_sample_stream : process
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable req_time : time;
|
||||
begin
|
||||
|
|
@ -151,8 +152,8 @@ begin
|
|||
end process;
|
||||
|
||||
tx_sample_stream : process
|
||||
constant TIME_BETWEEN_ITERATIONS : natural := 4593;
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant TIME_BETWEEN_ITERATIONS : natural := 7000;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable timestamp_cntr : natural := 400;
|
||||
variable header_len : natural := 0;
|
||||
|
|
@ -242,7 +243,7 @@ begin
|
|||
nop(fx3_pclk, 10);
|
||||
end loop;
|
||||
|
||||
wait for 1 ms;
|
||||
wait for 1.5 ms;
|
||||
dma_tx_enable <= '0';
|
||||
wait for 10 us;
|
||||
end loop;
|
||||
|
|
@ -333,7 +334,7 @@ begin
|
|||
done <= rx_done and tx_done;
|
||||
|
||||
rx_sample_stream : process
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable req_time : time;
|
||||
begin
|
||||
|
|
@ -387,7 +388,7 @@ begin
|
|||
|
||||
tx_sample_stream : process
|
||||
constant TIME_BETWEEN_ITERATIONS : natural := 4556;
|
||||
constant BLOCK_SIZE : natural := 512;
|
||||
constant BLOCK_SIZE : natural := GPIF_BUF_SIZE_SS;
|
||||
variable count : natural := START_COUNT;
|
||||
variable timestamp_cntr : natural := 250;
|
||||
variable header_len : natural := 0;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ vcom -work nuand -2008 ../../../ip/altera/rx_meta_fifo/rx_meta_fifo.vhd
|
|||
|
||||
vcom -work nuand -2008 ../vhdl/tb/nios_system.vhd
|
||||
|
||||
vcom -work nuand -2008 ../vhdl/fx3_gpif_p.vhd
|
||||
vcom -work nuand -2008 ../vhdl/fx3_gpif.vhd
|
||||
|
||||
vcom -work nuand -2008 ../vhdl/bladerf.vhd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue