Adding generic memory components and updating IP to use them. Added inline merge wrappers for pixel buffer and preslicer and also new print_streamer component for inline merge support
This commit is contained in:
parent
9c207a96c3
commit
5f04757efa
51 changed files with 2163 additions and 226 deletions
231
generic_ip/common/0/src/altera/alt_rw_dp_ram.vhd
Normal file
231
generic_ip/common/0/src/altera/alt_rw_dp_ram.vhd
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
-- megafunction wizard: %RAM: 2-PORT%
|
||||
-- GENERATION: STANDARD
|
||||
-- VERSION: WM1.0
|
||||
-- MODULE: altsyncram
|
||||
|
||||
-- ============================================================
|
||||
-- File Name: generic_seq_ram.vhd
|
||||
-- Megafunction Name(s):
|
||||
-- altsyncram
|
||||
--
|
||||
-- Simulation Library Files(s):
|
||||
-- altera_mf
|
||||
-- ============================================================
|
||||
-- ************************************************************
|
||||
-- THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
|
||||
--
|
||||
-- 14.1.1 Build 190 01/19/2015 SJ Web Edition
|
||||
-- ************************************************************
|
||||
|
||||
|
||||
--Copyright (C) 1991-2015 Altera Corporation. All rights reserved.
|
||||
--Your use of Altera Corporation's design tools, logic functions
|
||||
--and other software and tools, and its AMPP partner logic
|
||||
--functions, and any output files from any of the foregoing
|
||||
--(including device programming or simulation files), and any
|
||||
--associated documentation or information are expressly subject
|
||||
--to the terms and conditions of the Altera Program License
|
||||
--Subscription Agreement, the Altera Quartus II License Agreement,
|
||||
--the Altera MegaCore Function License Agreement, or other
|
||||
--applicable license agreement, including, without limitation,
|
||||
--that your use is for the sole purpose of programming logic
|
||||
--devices manufactured by Altera and sold by Altera or its
|
||||
--authorized distributors. Please refer to the applicable
|
||||
--agreement for further details.
|
||||
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
library altera_mf;
|
||||
use altera_mf.altera_mf_components.all;
|
||||
use work.common_pkg.all;
|
||||
|
||||
entity alt_rw_dp_ram is
|
||||
generic (
|
||||
DATA_WIDTH : natural range 1 to 256 := 32;
|
||||
DEPTH : natural range 2 to 131072 := 128;
|
||||
REGISTER_OUTPUT : string := "CLOCK0"; -- "UNREGISTERED"
|
||||
READ_WRITE_MODE : string := "OLD_DATA"; -- "DONT_CARE"
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
addr_a : in std_logic_vector (log2(DEPTH)-1 downto 0);
|
||||
addr_b : in std_logic_vector (log2(DEPTH)-1 downto 0);
|
||||
clk : in std_logic := '1';
|
||||
wrdata_a : in std_logic_vector (DATA_WIDTH-1 downto 0);
|
||||
wrdata_b : in std_logic_vector (DATA_WIDTH-1 downto 0);
|
||||
wren_a : in std_logic := '0';
|
||||
wren_b : in std_logic := '0';
|
||||
rddata_a : out std_logic_vector (DATA_WIDTH-1 downto 0);
|
||||
rddata_b : out std_logic_vector (DATA_WIDTH-1 downto 0)
|
||||
);
|
||||
end alt_rw_dp_ram;
|
||||
|
||||
|
||||
architecture syn of alt_rw_dp_ram is
|
||||
|
||||
signal sub_wire0 : std_logic_vector (DATA_WIDTH-1 downto 0);
|
||||
signal sub_wire1 : std_logic_vector (DATA_WIDTH-1 downto 0);
|
||||
|
||||
begin
|
||||
rddata_a <= sub_wire0(DATA_WIDTH-1 downto 0);
|
||||
rddata_b <= sub_wire1(DATA_WIDTH-1 downto 0);
|
||||
|
||||
altsyncram_component : altsyncram
|
||||
generic map (
|
||||
address_reg_b => "CLOCK0",
|
||||
clock_enable_input_a => "BYPASS",
|
||||
clock_enable_input_b => "BYPASS",
|
||||
clock_enable_output_a => "BYPASS",
|
||||
clock_enable_output_b => "BYPASS",
|
||||
indata_reg_b => "CLOCK0",
|
||||
intended_device_family => DEVICE_FAMILY,
|
||||
lpm_type => "altsyncram",
|
||||
numwords_a => DEPTH,
|
||||
numwords_b => DEPTH,
|
||||
operation_mode => "BIDIR_DUAL_PORT",
|
||||
outdata_aclr_a => "NONE",
|
||||
outdata_aclr_b => "NONE",
|
||||
outdata_reg_a => REGISTER_OUTPUT,
|
||||
outdata_reg_b => REGISTER_OUTPUT,
|
||||
power_up_uninitialized => "FALSE",
|
||||
read_during_write_mode_mixed_ports => READ_WRITE_MODE,
|
||||
read_during_write_mode_port_a => "NEW_DATA_NO_NBE_READ",
|
||||
read_during_write_mode_port_b => "NEW_DATA_NO_NBE_READ",
|
||||
widthad_a => log2(DEPTH),
|
||||
widthad_b => log2(DEPTH),
|
||||
width_a => DATA_WIDTH,
|
||||
width_b => DATA_WIDTH,
|
||||
width_byteena_a => 1,
|
||||
width_byteena_b => 1,
|
||||
wrcontrol_wraddress_reg_b => "CLOCK0"
|
||||
)
|
||||
port map (
|
||||
address_a => addr_a,
|
||||
address_b => addr_b,
|
||||
clock0 => clk,
|
||||
data_a => wrdata_a,
|
||||
data_b => wrdata_b,
|
||||
wren_a => wren_a,
|
||||
wren_b => wren_b,
|
||||
q_a => sub_wire0,
|
||||
q_b => sub_wire1
|
||||
);
|
||||
|
||||
end syn;
|
||||
|
||||
-- ============================================================
|
||||
-- CNX file retrieval info
|
||||
-- ============================================================
|
||||
-- Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: ADDRESSSTALL_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTEENA_ACLR_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTEENA_ACLR_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_ENABLE_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_ENABLE_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8"
|
||||
-- Retrieval info: PRIVATE: BlankMemory NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRdata NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRq NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRrdaddress NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRrren NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRwraddress NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: CLRwren NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clock NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clock_A NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: Clock_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INDATA_ACLR_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INDATA_REG_B NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A"
|
||||
-- Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone V"
|
||||
-- Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
|
||||
-- Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MEMSIZE NUMERIC "8192"
|
||||
-- Retrieval info: PRIVATE: MEM_IN_BITS NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: MIFfilename STRING ""
|
||||
-- Retrieval info: PRIVATE: OPERATION_MODE NUMERIC "3"
|
||||
-- Retrieval info: PRIVATE: OUTDATA_ACLR_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: OUTDATA_REG_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_MIXED_PORTS NUMERIC "2"
|
||||
-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_A NUMERIC "3"
|
||||
-- Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_B NUMERIC "3"
|
||||
-- Retrieval info: PRIVATE: REGdata NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: REGq NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: REGrdaddress NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: REGrren NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: REGwraddress NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: REGwren NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
|
||||
-- Retrieval info: PRIVATE: USE_DIFF_CLKEN NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: UseDPRAM NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: VarWidth NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: WIDTH_READ_A NUMERIC "32"
|
||||
-- Retrieval info: PRIVATE: WIDTH_READ_B NUMERIC "32"
|
||||
-- Retrieval info: PRIVATE: WIDTH_WRITE_A NUMERIC "32"
|
||||
-- Retrieval info: PRIVATE: WIDTH_WRITE_B NUMERIC "32"
|
||||
-- Retrieval info: PRIVATE: WRADDR_ACLR_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: WRADDR_REG_B NUMERIC "1"
|
||||
-- Retrieval info: PRIVATE: WRCTRL_ACLR_B NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: enable NUMERIC "0"
|
||||
-- Retrieval info: PRIVATE: rden NUMERIC "0"
|
||||
-- Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
|
||||
-- Retrieval info: CONSTANT: ADDRESS_REG_B STRING "CLOCK0"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_B STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_B STRING "BYPASS"
|
||||
-- Retrieval info: CONSTANT: INDATA_REG_B STRING "CLOCK0"
|
||||
-- Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone V"
|
||||
-- Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
|
||||
-- Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: NUMWORDS_B NUMERIC "256"
|
||||
-- Retrieval info: CONSTANT: OPERATION_MODE STRING "BIDIR_DUAL_PORT"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_ACLR_B STRING "NONE"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_REG_A STRING "UNREGISTERED"
|
||||
-- Retrieval info: CONSTANT: OUTDATA_REG_B STRING "UNREGISTERED"
|
||||
-- Retrieval info: CONSTANT: POWER_UP_UNINITIALIZED STRING "FALSE"
|
||||
-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_MIXED_PORTS STRING "DONT_CARE"
|
||||
-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_PORT_A STRING "NEW_DATA_NO_NBE_READ"
|
||||
-- Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_PORT_B STRING "NEW_DATA_NO_NBE_READ"
|
||||
-- Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: WIDTHAD_B NUMERIC "8"
|
||||
-- Retrieval info: CONSTANT: WIDTH_A NUMERIC "32"
|
||||
-- Retrieval info: CONSTANT: WIDTH_B NUMERIC "32"
|
||||
-- Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: WIDTH_BYTEENA_B NUMERIC "1"
|
||||
-- Retrieval info: CONSTANT: WRCONTROL_WRADDRESS_REG_B STRING "CLOCK0"
|
||||
-- Retrieval info: USED_PORT: address_a 0 0 8 0 INPUT NODEFVAL "address_a[7..0]"
|
||||
-- Retrieval info: USED_PORT: address_b 0 0 8 0 INPUT NODEFVAL "address_b[7..0]"
|
||||
-- Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
|
||||
-- Retrieval info: USED_PORT: data_a 0 0 32 0 INPUT NODEFVAL "data_a[31..0]"
|
||||
-- Retrieval info: USED_PORT: data_b 0 0 32 0 INPUT NODEFVAL "data_b[31..0]"
|
||||
-- Retrieval info: USED_PORT: q_a 0 0 32 0 OUTPUT NODEFVAL "q_a[31..0]"
|
||||
-- Retrieval info: USED_PORT: q_b 0 0 32 0 OUTPUT NODEFVAL "q_b[31..0]"
|
||||
-- Retrieval info: USED_PORT: wren_a 0 0 0 0 INPUT GND "wren_a"
|
||||
-- Retrieval info: USED_PORT: wren_b 0 0 0 0 INPUT GND "wren_b"
|
||||
-- Retrieval info: CONNECT: @address_a 0 0 8 0 address_a 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @address_b 0 0 8 0 address_b 0 0 8 0
|
||||
-- Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @data_a 0 0 32 0 data_a 0 0 32 0
|
||||
-- Retrieval info: CONNECT: @data_b 0 0 32 0 data_b 0 0 32 0
|
||||
-- Retrieval info: CONNECT: @wren_a 0 0 0 0 wren_a 0 0 0 0
|
||||
-- Retrieval info: CONNECT: @wren_b 0 0 0 0 wren_b 0 0 0 0
|
||||
-- Retrieval info: CONNECT: q_a 0 0 32 0 @q_a 0 0 32 0
|
||||
-- Retrieval info: CONNECT: q_b 0 0 32 0 @q_b 0 0 32 0
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.vhd TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.inc FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.cmp TRUE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram.bsf FALSE
|
||||
-- Retrieval info: GEN_FILE: TYPE_NORMAL generic_seq_ram_inst.vhd FALSE
|
||||
-- Retrieval info: LIB_FILE: altera_mf
|
||||
|
|
@ -43,7 +43,8 @@ use work.pkg_functions.all;
|
|||
entity data_streamer_6 is
|
||||
generic (
|
||||
NUM_EXT_DSTS : natural range 1 to 16 := 5;
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
|
||||
|
|
@ -189,48 +190,68 @@ begin
|
|||
-- ---------------------------------------
|
||||
-- COMMAND QUEUE
|
||||
-- ---------------------------------------
|
||||
cmd_queue_inst : entity work.cmd_queue_6
|
||||
cmd_queue_rst <= control_clear_cmd or cmd_queue_rst_sreg(cmd_queue_rst_sreg'LENGTH-1);
|
||||
|
||||
-- Instantiate the command queue
|
||||
cmd_queue_inst : entity work.alt_sync_fifo
|
||||
generic map(
|
||||
QUEUE_DEPTH => CMD_QUEUE_DEPTH
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => CMD_QUEUE_DEPTH,
|
||||
REGISTER_OUTPUT => "OFF",
|
||||
NEARLY_FULL => 31,
|
||||
NEARLY_EMPTY => 2,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "OFF"
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
sclr => control_clear_cmd,
|
||||
clk => clk,
|
||||
sclr => cmd_queue_rst,
|
||||
|
||||
wrreq => cmd_q_write,
|
||||
data => cmd_q_write_data,
|
||||
wrreq => cmd_q_write,
|
||||
wrdata => cmd_q_write_data,
|
||||
|
||||
rdreq => cmd_read,
|
||||
q => cmd_data_q,
|
||||
rdreq => cmd_read,
|
||||
rddata => cmd_data_q,
|
||||
|
||||
empty => cmd_empty,
|
||||
full => cmd_full,
|
||||
usedw => usedw
|
||||
empty => cmd_empty,
|
||||
full => cmd_full,
|
||||
usedw => usedw
|
||||
);
|
||||
|
||||
|
||||
-- ---------------------------------------
|
||||
-- Address translation queue
|
||||
-- ---------------------------------------
|
||||
tlb_queue_inst : entity work.tlb_queue_6
|
||||
|
||||
GEN_TLB: if not EXCLUDE_VIRTUAL_MAPPING_LOGIC generate
|
||||
tlb_queue_inst : entity work.alt_sync_fifo
|
||||
generic map(
|
||||
QUEUE_DEPTH => CMD_QUEUE_DEPTH
|
||||
DATA_WIDTH => 40,
|
||||
DEPTH => CMD_QUEUE_DEPTH,
|
||||
REGISTER_OUTPUT => "OFF",
|
||||
NEARLY_FULL => 39,
|
||||
NEARLY_EMPTY => 2,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "OFF"
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
sclr => control_clear_cmd,
|
||||
clk => clk,
|
||||
sclr => cmd_queue_rst,
|
||||
|
||||
wrreq => tlb_write,
|
||||
data => tlb_wr_data,
|
||||
wrreq => tlb_write,
|
||||
wrdata => tlb_wr_data,
|
||||
|
||||
rdreq => tlb_read,
|
||||
q => tlb_rd_data,
|
||||
rdreq => tlb_read,
|
||||
rddata => tlb_rd_data,
|
||||
|
||||
empty => tlb_empty
|
||||
empty => tlb_empty
|
||||
);
|
||||
|
||||
end generate;
|
||||
|
||||
-- ---------------------------------------
|
||||
-- COMBINATORIAL SIGNALS
|
||||
-- ---------------------------------------
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ entity data_streamer_7 is
|
|||
generic (
|
||||
NUM_EXT_DSTS : natural range 1 to 16 := 5;
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32;
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC : boolean := false
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
|
||||
|
|
@ -94,7 +95,7 @@ entity data_streamer_7 is
|
|||
ip_id_mfr_number : out std_logic_vector( 7 downto 0);
|
||||
ip_ver_minor_number : out std_logic_vector( 7 downto 0);
|
||||
ip_ver_major_number : out std_logic_vector( 7 downto 0);
|
||||
|
||||
|
||||
diag_step_mode : in std_logic := '0';
|
||||
diag_step : in std_logic := '0';
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ entity data_streamer_7 is
|
|||
debug_out : out std_logic_vector(19 downto 0);
|
||||
diag_1 : out std_logic_vector(31 downto 0);
|
||||
diag_2 : out std_logic_vector(31 downto 0);
|
||||
|
||||
|
||||
diag_cmd_q_write : out std_logic;
|
||||
diag_cmd_q_write_data : out std_logic_vector(31 downto 0)
|
||||
|
||||
|
|
@ -114,7 +115,7 @@ architecture rtl of data_streamer_7 is
|
|||
|
||||
constant CONST_IP_ID_NUMBER : std_logic_vector(7 downto 0) := 8x"0d";
|
||||
constant CONST_IP_ID_MFR_NUMBER: std_logic_vector(7 downto 0) := 8x"04";
|
||||
constant CONST_IP_VER_MINOR : std_logic_vector(7 downto 0) := 8x"06";
|
||||
constant CONST_IP_VER_MINOR : std_logic_vector(7 downto 0) := 8x"07";
|
||||
constant CONST_IP_VER_MAJOR : std_logic_vector(7 downto 0) := 8x"07";
|
||||
|
||||
subtype CMD_BITS is natural range 3 downto 0;
|
||||
|
|
@ -185,7 +186,7 @@ architecture rtl of data_streamer_7 is
|
|||
signal vaddr_match : std_logic;
|
||||
signal pop_parameter : std_logic;
|
||||
signal dst_port_rdy : std_logic;
|
||||
|
||||
|
||||
signal count_to_page_bdry : unsigned(9 downto 0);
|
||||
signal use_latched_addr : std_logic;
|
||||
signal page_num : std_logic_vector(19 downto 0);
|
||||
|
|
@ -211,12 +212,12 @@ architecture rtl of data_streamer_7 is
|
|||
|
||||
signal use_redirect_addr : std_logic;
|
||||
signal last_rd_block : std_logic;
|
||||
|
||||
|
||||
signal cmd_port_wr_int : std_logic;
|
||||
signal cmd_port_int : std_logic_vector(31 downto 0);
|
||||
|
||||
|
||||
signal is_slim : std_logic;
|
||||
|
||||
|
||||
signal cmd_available_step : std_logic;
|
||||
|
||||
signal cmd_queue_rst_sreg : std_logic_vector( 2 downto 0);
|
||||
|
|
@ -254,75 +255,88 @@ begin
|
|||
cmd_queue_rst <= control_clear_cmd or cmd_queue_rst_sreg(cmd_queue_rst_sreg'LENGTH-1);
|
||||
|
||||
-- Instantiate the command queue
|
||||
cmd_queue_inst : entity work.cmd_queue_7
|
||||
cmd_queue_inst : entity work.alt_sync_fifo
|
||||
generic map(
|
||||
QUEUE_DEPTH => CMD_QUEUE_DEPTH
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => CMD_QUEUE_DEPTH,
|
||||
REGISTER_OUTPUT => "OFF",
|
||||
NEARLY_FULL => 31,
|
||||
NEARLY_EMPTY => 2,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "OFF"
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
sclr => cmd_queue_rst,
|
||||
clk => clk,
|
||||
sclr => cmd_queue_rst,
|
||||
|
||||
wrreq => cmd_q_write,
|
||||
data => cmd_q_write_data,
|
||||
wrreq => cmd_q_write,
|
||||
wrdata => cmd_q_write_data,
|
||||
|
||||
rdreq => cmd_read,
|
||||
q => cmd_data_q,
|
||||
rdreq => cmd_read,
|
||||
rddata => cmd_data_q,
|
||||
|
||||
empty => cmd_empty,
|
||||
full => cmd_full,
|
||||
usedw => usedw
|
||||
empty => cmd_empty,
|
||||
full => cmd_full,
|
||||
usedw => usedw
|
||||
);
|
||||
|
||||
|
||||
-- ---------------------------------------
|
||||
-- Address translation queue
|
||||
-- ---------------------------------------
|
||||
|
||||
|
||||
GEN_TLB: if not EXCLUDE_VIRTUAL_MAPPING_LOGIC generate
|
||||
tlb_queue_inst : entity work.tlb_queue_7
|
||||
tlb_queue_inst : entity work.alt_sync_fifo
|
||||
generic map(
|
||||
QUEUE_DEPTH => CMD_QUEUE_DEPTH
|
||||
DATA_WIDTH => 40,
|
||||
DEPTH => CMD_QUEUE_DEPTH,
|
||||
REGISTER_OUTPUT => "OFF",
|
||||
NEARLY_FULL => 39,
|
||||
NEARLY_EMPTY => 2,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "OFF"
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
sclr => control_clear_cmd,
|
||||
|
||||
wrreq => tlb_write,
|
||||
data => tlb_wr_data,
|
||||
|
||||
rdreq => tlb_read,
|
||||
q => tlb_rd_data,
|
||||
|
||||
empty => tlb_empty
|
||||
clk => clk,
|
||||
sclr => cmd_queue_rst,
|
||||
|
||||
wrreq => tlb_write,
|
||||
wrdata => tlb_wr_data,
|
||||
|
||||
rdreq => tlb_read,
|
||||
rddata => tlb_rd_data,
|
||||
|
||||
empty => tlb_empty
|
||||
);
|
||||
|
||||
|
||||
end generate;
|
||||
|
||||
|
||||
|
||||
-- ---------------------------------------
|
||||
-- COMBINATORIAL SIGNALS
|
||||
-- ---------------------------------------
|
||||
|
||||
|
||||
GEN_SLIM : if EXCLUDE_VIRTUAL_MAPPING_LOGIC generate
|
||||
is_slim <= '1';
|
||||
end generate;
|
||||
|
||||
|
||||
GEN_NOT_SLIM : if not EXCLUDE_VIRTUAL_MAPPING_LOGIC generate
|
||||
is_slim <= '0';
|
||||
|
||||
|
||||
-- Flag when the address low bits (page offset) are 0
|
||||
addr_offset_is_zero <= '1' when curr_vaddr(11 downto 2) = 10x"0" else '0';
|
||||
|
||||
|
||||
-- Flag when remaining_burst count is 0
|
||||
remaining_burst_is_zero <= '1' when remaining_burst = 12x"0" else '0';
|
||||
|
||||
|
||||
-- Calculate the number of words from the address page offset to the end of the page
|
||||
count_to_page_bdry <= PAGE_WORD_LEN - unsigned(curr_vaddr(11 downto 2));
|
||||
|
||||
|
||||
page_num <= curr_vaddr(31 downto 12) when use_latched_addr = '1' else cmd_data_q(31 downto 12);
|
||||
|
||||
|
||||
-- Flag when the command queue output (paramter 0 bits) match the TLB virtual address
|
||||
vaddr_match <= '1' when page_num = tlb_rd_data(19 downto 0) else '0';
|
||||
end generate;
|
||||
|
|
@ -414,7 +428,7 @@ begin
|
|||
cmd_port_wr_int <= '0';
|
||||
|
||||
elsif (clk'event and clk = '1') then
|
||||
|
||||
|
||||
diag_cmd_q_write_data <= cmd_q_write_data;
|
||||
diag_cmd_q_write <= cmd_q_write;
|
||||
|
||||
|
|
@ -428,7 +442,7 @@ begin
|
|||
tlb_write_last <= tlb_write;
|
||||
dest_port_last_word <= '0';
|
||||
var_remaining_burst := remaining_burst;
|
||||
|
||||
|
||||
cmd_port_wr_int <= cmd_port_wr;
|
||||
cmd_port_int <= cmd_port;
|
||||
|
||||
|
|
@ -539,13 +553,13 @@ begin
|
|||
if cmd_pending = '0' then
|
||||
-- Latch the word length into the remaining burst counter
|
||||
remaining_burst <= cmd_data(CMD_PARAM0_WORDLEN);
|
||||
|
||||
|
||||
loop_is_first <= '1';
|
||||
|
||||
|
||||
if cmd_data(CMD_BITS) = CMD_LD_CMD_Q then
|
||||
-- Destination index for command queue is one above the defined number of external desitinations.
|
||||
dst_sel <= std_logic_vector(to_unsigned(NUM_EXT_DSTS, 4));
|
||||
|
||||
|
||||
-- Flag that auto-loading commands are now active whenever a LD_CMD_Q is written.
|
||||
-- This will not be cleared until the command queue is empty and no outstanding
|
||||
-- data transfers
|
||||
|
|
@ -554,44 +568,44 @@ begin
|
|||
-- Latch the destination index
|
||||
dst_sel <= cmd_data(CMD_DEST_BITS);
|
||||
end if;
|
||||
|
||||
|
||||
-- Command is now pending until parameters (if any processed) and command completed.
|
||||
cmd_pending <= '1';
|
||||
|
||||
|
||||
-- For virtual commands, flag to pop the virtual address parameter
|
||||
fetch_vaddr <= '1';
|
||||
|
||||
|
||||
-- Won't commit to the read until cmd_pending phase and destination is ready
|
||||
read_committed <= '0';
|
||||
|
||||
|
||||
-- Clear the state that inidicates that the correct TLB map is found.
|
||||
checked_tlb <= '0';
|
||||
|
||||
|
||||
elsif dst_port_rdy = '1' or read_committed = '1' then
|
||||
|
||||
|
||||
-- As the destination has been seen as ready, commit to the reads, including the multi-burst page crossing accesses
|
||||
read_committed <= '1';
|
||||
|
||||
|
||||
-- If a new TLB entry was extracted, check it matches otherwise it's an error
|
||||
if tlb_read_last = '1' and vaddr_match = '0' then
|
||||
tlb_mismatch_err <= '1';
|
||||
end if;
|
||||
|
||||
|
||||
-- If the virtual address does not match that at the o/p of the TLB queue,
|
||||
-- pop the value from the queue to get the next one. Only check this if not validated
|
||||
-- before, since the parameter may have been popped from the queue.
|
||||
if checked_tlb = '0' then
|
||||
-- Pop the entry
|
||||
tlb_read <= not vaddr_match and not tlb_read and not tlb_empty;
|
||||
|
||||
|
||||
-- It is an error if the queue is empty
|
||||
tlb_empty_err <= tlb_empty;
|
||||
|
||||
|
||||
-- Flag that we checked the TLB output already
|
||||
checked_tlb <= '1';
|
||||
|
||||
|
||||
else
|
||||
|
||||
|
||||
-- If first cycle with virtual address parameter from queue, latch the
|
||||
-- low bits this cycle to relieve timing on processing in the following cycles.
|
||||
if fetch_vaddr = '1' then
|
||||
|
|
@ -600,17 +614,17 @@ begin
|
|||
diag_2 <= cmd_data_q;
|
||||
end if;
|
||||
fetch_vaddr <= '0';
|
||||
|
||||
|
||||
elsif data_cmd_active = '0' then
|
||||
-- If address low bits are not page aligned...
|
||||
if not addr_offset_is_zero then
|
||||
|
||||
|
||||
-- If burst does not cross a page boundary then set burst length to remaining
|
||||
-- words, set remaining count to 0 and clear multi-burst flag as this is the last
|
||||
-- transfer.
|
||||
if count_to_page_bdry >= unsigned(remaining_burst) then
|
||||
var_multi_burst := '0';
|
||||
|
||||
|
||||
avm_rx_burstcount <= remaining_burst;
|
||||
var_remaining_burst := (others => '0');
|
||||
-- If burst crosses a page boundary, set the burst count to take us up to
|
||||
|
|
@ -620,7 +634,7 @@ begin
|
|||
avm_rx_burstcount <= "00" & std_logic_vector(count_to_page_bdry);
|
||||
var_remaining_burst := std_logic_vector(unsigned(remaining_burst) - count_to_page_bdry);
|
||||
end if;
|
||||
|
||||
|
||||
-- Address low bits are page aligned...
|
||||
else
|
||||
-- If remaining burst is equal or less than a page, set burst to be remaining
|
||||
|
|
@ -628,10 +642,10 @@ begin
|
|||
-- transfer.
|
||||
if unsigned(remaining_burst) <= PAGE_WORD_LEN then
|
||||
var_multi_burst := '0';
|
||||
|
||||
|
||||
avm_rx_burstcount <= remaining_burst;
|
||||
var_remaining_burst := (others => '0');
|
||||
|
||||
|
||||
-- If the remaining count is greater than a page, set the burst length to a page
|
||||
-- and subtract the length from the remaining count.
|
||||
else
|
||||
|
|
@ -639,26 +653,26 @@ begin
|
|||
var_remaining_burst := std_logic_vector(unsigned(remaining_burst) - PAGE_WORD_LEN);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
|
||||
-- When transfer initiated, update the remaining burst count to take in to account
|
||||
-- the words requested.
|
||||
if avm_active_read = '1' then
|
||||
remaining_burst <= var_remaining_burst;
|
||||
end if;
|
||||
|
||||
|
||||
-- The address to use is the TLB physical address bits, and the addr lower bits.
|
||||
avm_rx_address <= tlb_rd_data(39 downto 20) & curr_vaddr(11 downto 0);
|
||||
|
||||
|
||||
-- Issue the read command. Hold until active (no wait request).
|
||||
avm_rx_read <= not avm_active_read;
|
||||
|
||||
|
||||
-- Flag as data transfer active only if source and destination are ready
|
||||
data_cmd_active <= avm_active_read;
|
||||
|
||||
|
||||
-- Complete command (clear pending) when source and destination ready
|
||||
-- and not a multi-burst command
|
||||
cmd_pending <= not avm_active_read or var_multi_burst;
|
||||
|
||||
|
||||
-- Flag when a LD_CMD_Q command popped from the queue and has started running (i.e. when cmd_pending cleared)
|
||||
if cmd_data(CMD_BITS) = CMD_LD_CMD_Q then
|
||||
-- It is an error to have insufficient space left when executing LD_CMD_Q, as
|
||||
|
|
@ -671,7 +685,7 @@ begin
|
|||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
|
||||
-- When a TLB load command, grab the parameters, and push to the queue
|
||||
when CMD_LD_ADDR_MAP =>
|
||||
if is_slim = '0' then
|
||||
|
|
@ -732,7 +746,7 @@ begin
|
|||
|
||||
-- Last transfer of burst
|
||||
if avm_rx_burstcount = 12x"1" then
|
||||
|
||||
|
||||
-- Flag the last word of this block if block flagged as the last and also the last transfer of a looped command
|
||||
dest_port_last_word <= last_rd_block and loop_count_is_zero;
|
||||
|
||||
|
|
@ -740,13 +754,13 @@ begin
|
|||
data_cmd_active <= '0';
|
||||
|
||||
if is_slim = '0' then
|
||||
|
||||
|
||||
-- Increment the latched virtual address's page number, and set the offset
|
||||
-- bits to zero, as next burst starts from thebegiinng of the next virtual
|
||||
-- page.
|
||||
curr_vaddr <= std_logic_vector(unsigned(curr_vaddr(31 downto 12)) + 1) & 12x"0";
|
||||
|
||||
|
||||
|
||||
|
||||
-- If more bursts to come, flag to use the latched virtual address, and clear
|
||||
-- set the fetch_vaddr flag to indicate re-checking of TLB mapping required
|
||||
if remaining_burst_is_zero = '0' then
|
||||
|
|
@ -757,7 +771,7 @@ begin
|
|||
use_latched_addr <= '0';
|
||||
fetch_vaddr <= '0';
|
||||
end if;
|
||||
|
||||
|
||||
checked_tlb <= '0';
|
||||
end if;
|
||||
end if;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ vmap work ./work
|
|||
# Compile the UUT
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $GEN_SEQ/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $GEN_SEQ/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $GEN_SEQ/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $GEN_SEQ/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $DW_SRC/drop_watch_gen_0_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ vmap work ./work
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/digital_lpf.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
#vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $ENC_MULT/lut_divider_0.vhd
|
||||
vcom -2008 -work $WORKLIB $ENC_MULT/encoder_speed_detect_0.vhd
|
||||
vcom -2008 -work $WORKLIB $ENC_MULT/encoder_multiply_0.vhd
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ vmap work ./work
|
|||
|
||||
# Compile the UUT
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB ./../src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file uart_rx.vhd VHDL PATH ../../../common/0/src/uart_rx.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
@ -80,7 +81,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file uart_rx.vhd VHDL PATH ../../../common/0/src/uart_rx.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/sync_wire.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/sync_wire_rEdge.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,13 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/sync_reset.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/common_test_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/log_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Compile the VHDL packages that support bus protocols, memory mapped registers and functional procedures
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/avalon_verify_pkg.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
@ -84,7 +85,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -28,9 +28,10 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/sync_wire.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/sync_wire_rEdge.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,13 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/cs_bus_itf.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/common_test_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/log_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Compile the VHDL packages that support bus protocols, memory mapped registers and functional procedures
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/test/avalon_verify_pkg.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $GENERIC_PATH/generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_P
|
|||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/altera/sync_fifo.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/queue_and_delay.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/dpram_sclk.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/alt_rw_dp_ram.vhd"]
|
||||
|
||||
# Generic Sequencer
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/altera/generic_seq_ram_15.vhd"]
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/sync_wire_rEdge.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_P
|
|||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/altera/sync_fifo.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/queue_and_delay.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/dpram_sclk.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/alt_rw_dp_ram.vhd"]
|
||||
|
||||
# Generic Sequencer
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/altera/generic_seq_ram_15.vhd"]
|
||||
#set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/altera/generic_seq_ram_15.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_15_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_15.vhd"]
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
@ -87,7 +88,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_15.vhd VHDL PATH ../../../generic_sequencer/15/src/altera/generic_seq_ram_15.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -49,9 +49,10 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/digital_lpf.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Generic Sequencer
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_P
|
|||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/altera/sync_fifo.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/queue_and_delay.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/dpram_sclk.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/alt_rw_dp_ram.vhd"]
|
||||
|
||||
# Generic Sequencer
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/altera/generic_seq_ram_16.vhd"]
|
||||
#set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/altera/generic_seq_ram_16.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_16_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_16.vhd"]
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_16.vhd VHDL PATH ../../../generic_sequencer/16/src/altera/generic_seq_ram_16.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_16.vhd VHDL PATH ../../../generic_sequencer/16/src/altera/generic_seq_ram_16.vhd
|
||||
add_fileset_file generic_sequencer_16_pkg.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16_pkg.vhd
|
||||
add_fileset_file generic_sequencer_16.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
@ -86,7 +87,8 @@ add_fileset_file fifo_256x32.vhd VHDL PATH ../../../common/0/src/altera/fifo_256
|
|||
add_fileset_file sync_fifo.vhd VHDL PATH ../../../common/0/src/altera/sync_fifo.vhd
|
||||
add_fileset_file cs_bus_itf.vhd VHDL PATH ../../../common/0/src/cs_bus_itf.vhd
|
||||
add_fileset_file dpram_sclk.vhd VHDL PATH ../../../common/0/src/dpram_sclk.vhd
|
||||
add_fileset_file generic_seq_ram_16.vhd VHDL PATH ../../../generic_sequencer/16/src/altera/generic_seq_ram_16.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
#add_fileset_file generic_seq_ram_16.vhd VHDL PATH ../../../generic_sequencer/16/src/altera/generic_seq_ram_16.vhd
|
||||
add_fileset_file generic_sequencer_16_pkg.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16_pkg.vhd
|
||||
add_fileset_file generic_sequencer_16.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16.vhd
|
||||
add_fileset_file enc_pd_emul_1_pkg.vhd VHDL PATH ../../../enc_pd_emul/1/src/enc_pd_emul_1_pkg.vhd
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/digital_lpf.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
|
||||
# Generic Sequencer (both 15 and 16)
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/15/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/15/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/15/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/15/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/16/src/altera/generic_seq_ram_16.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/16/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/16/src/generic_sequencer_16_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/16/src/generic_sequencer_16.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "generic_sequencer_15"
|
||||
set_global_assignment -name IP_TOOL_VERSION "18.0"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone V}"
|
||||
|
||||
set COMMON_PATH ../../../common/0/src
|
||||
set SEQUENCER_PATH ../../../generic_sequencer/15/src
|
||||
|
||||
|
||||
# common
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/common_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/alt_rw_dp_ram.vhd"]
|
||||
|
||||
# Generic Sequencer
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_15_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_15.vhd"]
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
# TCL File Generated by Component Editor 16.0
|
||||
# Wed Oct 25 15:26:07 BST 2017
|
||||
# DO NOT MODIFY
|
||||
|
||||
|
||||
#
|
||||
# generic_sequencer_15 "generic_sequencer_15" v1.0
|
||||
# GMG 2017.10.25.15:26:07
|
||||
# Generic Sequencer
|
||||
#
|
||||
|
||||
#
|
||||
# request TCL package from ACDS 16.0
|
||||
#
|
||||
package require -exact qsys 18.1
|
||||
|
||||
|
||||
#
|
||||
# module generic_sequencer_16
|
||||
#
|
||||
set_module_property DESCRIPTION "Generic Sequencer"
|
||||
set_module_property NAME generic_sequencer_15
|
||||
set_module_property VERSION 1.0
|
||||
set_module_property INTERNAL false
|
||||
set_module_property OPAQUE_ADDRESS_MAP true
|
||||
set_module_property GROUP "GIS Components"
|
||||
set_module_property AUTHOR GMG
|
||||
set_module_property DISPLAY_NAME generic_sequencer_15
|
||||
set_module_property INSTANTIATE_IN_SYSTEM_MODULE true
|
||||
set_module_property EDITABLE true
|
||||
set_module_property REPORT_TO_TALKBACK false
|
||||
set_module_property ALLOW_GREYBOX_GENERATION false
|
||||
set_module_property REPORT_HIERARCHY false
|
||||
|
||||
|
||||
#
|
||||
# file sets
|
||||
#
|
||||
add_fileset QUARTUS_SYNTH QUARTUS_SYNTH "" ""
|
||||
set_fileset_property QUARTUS_SYNTH TOP_LEVEL generic_sequencer_15
|
||||
set_fileset_property QUARTUS_SYNTH ENABLE_RELATIVE_INCLUDE_PATHS false
|
||||
set_fileset_property QUARTUS_SYNTH ENABLE_FILE_OVERWRITE_MODE false
|
||||
add_fileset_file common_pkg.vhd VHDL PATH ../../../common/0/src/common_pkg.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
add_fileset_file generic_sequencer_15_pkg.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15_pkg.vhd
|
||||
add_fileset_file generic_sequencer_15.vhd VHDL PATH ../../../generic_sequencer/15/src/generic_sequencer_15.vhd
|
||||
|
||||
#
|
||||
# parameters
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# display items
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# connection point clock
|
||||
#
|
||||
add_interface clock clock end
|
||||
set_interface_property clock clockRate 0
|
||||
set_interface_property clock ENABLED true
|
||||
set_interface_property clock EXPORT_OF ""
|
||||
set_interface_property clock PORT_NAME_MAP ""
|
||||
set_interface_property clock CMSIS_SVD_VARIABLES ""
|
||||
set_interface_property clock SVD_ADDRESS_GROUP ""
|
||||
|
||||
add_interface_port clock clk clk Input 1
|
||||
|
|
@ -19,8 +19,9 @@ vmap work ./work
|
|||
|
||||
# Compile the UUT
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/src/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/src/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB ../src/dpram_sclk_15.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB ../src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/generic_sequencer_15.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
-- Company : Global Inkjet Systems
|
||||
-- Created : 2016-05-12
|
||||
-- Last update: 2020-02-20
|
||||
-- SVN ID : Git
|
||||
-- SVN ID : Git
|
||||
-- Standard : VHDL'2008
|
||||
-------------------------------------------------------------------------------
|
||||
-- Description:
|
||||
|
|
@ -35,34 +35,36 @@ entity generic_sequencer_15 is
|
|||
BUS_BURST_EN : boolean := false;
|
||||
POS_BUS_EN : boolean := false;
|
||||
ALU_EN : boolean := false;
|
||||
QUEUE_EN : boolean := false);
|
||||
QUEUE_EN : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
--
|
||||
--
|
||||
clk : in std_logic;
|
||||
reset_n : in std_logic;
|
||||
--
|
||||
--
|
||||
avs_csr_address : in std_logic_vector(3 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
--
|
||||
--
|
||||
avs_seq_address : in std_logic_vector(log2(SEQ_DEPTH) - 1 downto 0);
|
||||
avs_seq_write : in std_logic;
|
||||
avs_seq_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_seq_read : in std_logic;
|
||||
avs_seq_readdata : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
--
|
||||
--
|
||||
start_req : in std_logic;
|
||||
start_addr : in std_logic_vector(log2(SEQ_DEPTH) - 1 downto 0);
|
||||
--
|
||||
--
|
||||
trigger_in : in std_logic_vector(TRIGGER_WIDTH - 1 downto 0);
|
||||
pos_in : in std_logic_vector(POS_WIDTH - 1 downto 0);
|
||||
--
|
||||
--
|
||||
busy : out std_logic;
|
||||
--
|
||||
--
|
||||
vector_out : out std_logic_vector(VECTOR_WIDTH - 1 downto 0);
|
||||
--
|
||||
--
|
||||
bus_data : out std_logic_vector(BUS_WIDTH - 1 downto 0);
|
||||
bus_valid : out std_logic;
|
||||
bus_ack : in std_logic);
|
||||
|
|
@ -169,8 +171,8 @@ architecture rtl of generic_sequencer_15 is
|
|||
signal queue_add_i : std_logic_vector(7 downto 0);
|
||||
signal queue_left : std_logic_vector(7 downto 0);
|
||||
signal queue_exec : std_logic_vector(15 downto 0);
|
||||
|
||||
|
||||
|
||||
|
||||
begin
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
|
@ -292,29 +294,36 @@ begin
|
|||
|
||||
--pragma translate_off
|
||||
assert (to_integer(unsigned(trig_sel)) < TRIGGER_WIDTH) report "ERROR: trig_sel out of selectable trigger mask" severity failure;
|
||||
--pragma translate_on
|
||||
--pragma translate_on
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Dual-Port Memory buffer
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
iRAM : entity work.generic_seq_ram_15
|
||||
iRAM : entity work.alt_rw_dp_ram
|
||||
generic map(
|
||||
SEQ_DEPTH => SEQ_DEPTH)
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => SEQ_DEPTH,
|
||||
REGISTER_OUTPUT => "UNREGISTERED",
|
||||
READ_WRITE_MODE => "OLD_DATA",
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
|
||||
)
|
||||
port map(
|
||||
clock => clk,
|
||||
address_a => avs_seq_address,
|
||||
clk => clk,
|
||||
addr_a => avs_seq_address,
|
||||
wren_a => avs_seq_write,
|
||||
data_a => avs_seq_writedata,
|
||||
q_a => avs_seq_readdata,
|
||||
address_b => ram_rd_addr,
|
||||
wrdata_a => avs_seq_writedata,
|
||||
rddata_a => avs_seq_readdata,
|
||||
addr_b => ram_rd_addr,
|
||||
wren_b => '0',
|
||||
data_b => (others => '0'),
|
||||
q_b => ram_rd_data);
|
||||
wrdata_b => (others => '0'),
|
||||
rddata_b => ram_rd_data
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Sequencer Logic
|
||||
-----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
start_req_i <= start_req and not start_req_d;
|
||||
|
||||
|
|
@ -399,7 +408,7 @@ begin
|
|||
case opcode is
|
||||
--
|
||||
when CMD_NOP => fsm_nxt <= s_fetch;
|
||||
--
|
||||
--
|
||||
when CMD_TRIG_MASK => fsm_nxt <= s_trig_mask;
|
||||
when CMD_TRIG_WAIT => fsm_nxt <= s_trig_wait;
|
||||
when CMD_VEC_SET => fsm_nxt <= s_vec_set;
|
||||
|
|
@ -505,7 +514,7 @@ begin
|
|||
|
||||
ld_trig_sel <= '1' when decode = '1' and (opcode = CMD_TRIG_WAIT or opcode = CMD_VEC_RAMP_UP or opcode = CMD_VEC_RAMP_DN) else '0';
|
||||
|
||||
--
|
||||
--
|
||||
pSEQ_REGs : process(reset_n, clk)
|
||||
begin
|
||||
if (reset_n = '0') then
|
||||
|
|
@ -557,7 +566,7 @@ begin
|
|||
if(vector_val_cpu = '1') then
|
||||
vector_out_i <= vector_cpu;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
if (save_ret_addr = '1') then
|
||||
return_addr <= ram_rd_addr;
|
||||
end if;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
set_global_assignment -name IP_TOOL_NAME "generic_sequencer_16"
|
||||
set_global_assignment -name IP_TOOL_VERSION "18.0"
|
||||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone V}"
|
||||
|
||||
set COMMON_PATH ../../../common/0/src
|
||||
set SEQUENCER_PATH ../../../generic_sequencer/16/src
|
||||
|
||||
# common
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/common_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$COMMON_PATH/alt_rw_dp_ram.vhd"]
|
||||
|
||||
# Generic Sequencer
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_16_pkg.vhd"]
|
||||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "$SEQUENCER_PATH/generic_sequencer_16.vhd"]
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
# TCL File Generated by Component Editor 16.0
|
||||
# Wed Oct 25 15:26:07 BST 2017
|
||||
# DO NOT MODIFY
|
||||
|
||||
|
||||
#
|
||||
# generic_sequencer_16 "generic_sequencer_16" v1.0
|
||||
# GMG 2017.10.25.15:26:07
|
||||
# Generic Sequencer
|
||||
#
|
||||
|
||||
#
|
||||
# request TCL package from ACDS 16.0
|
||||
#
|
||||
package require -exact qsys 18.1
|
||||
|
||||
|
||||
#
|
||||
# module generic_sequencer_16
|
||||
#
|
||||
set_module_property DESCRIPTION "Generic Sequencer"
|
||||
set_module_property NAME generic_sequencer_16
|
||||
set_module_property VERSION 1.0
|
||||
set_module_property INTERNAL false
|
||||
set_module_property OPAQUE_ADDRESS_MAP true
|
||||
set_module_property GROUP "GIS Components"
|
||||
set_module_property AUTHOR GMG
|
||||
set_module_property DISPLAY_NAME generic_sequencer_16
|
||||
set_module_property INSTANTIATE_IN_SYSTEM_MODULE true
|
||||
set_module_property EDITABLE true
|
||||
set_module_property REPORT_TO_TALKBACK false
|
||||
set_module_property ALLOW_GREYBOX_GENERATION false
|
||||
set_module_property REPORT_HIERARCHY false
|
||||
|
||||
|
||||
#
|
||||
# file sets
|
||||
#
|
||||
add_fileset QUARTUS_SYNTH QUARTUS_SYNTH "" ""
|
||||
set_fileset_property QUARTUS_SYNTH TOP_LEVEL generic_sequencer_16
|
||||
set_fileset_property QUARTUS_SYNTH ENABLE_RELATIVE_INCLUDE_PATHS false
|
||||
set_fileset_property QUARTUS_SYNTH ENABLE_FILE_OVERWRITE_MODE false
|
||||
add_fileset_file common_pkg.vhd VHDL PATH ../../../common/0/src/common_pkg.vhd
|
||||
add_fileset_file alt_rw_dp_ram.vhd VHDL PATH ../../../common/0/src/altera/alt_rw_dp_ram.vhd
|
||||
add_fileset_file generic_sequencer_16_pkg.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16_pkg.vhd
|
||||
add_fileset_file generic_sequencer_16.vhd VHDL PATH ../../../generic_sequencer/16/src/generic_sequencer_16.vhd
|
||||
|
||||
#
|
||||
# parameters
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# display items
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# connection point clock
|
||||
#
|
||||
add_interface clock clock end
|
||||
set_interface_property clock clockRate 0
|
||||
set_interface_property clock ENABLED true
|
||||
set_interface_property clock EXPORT_OF ""
|
||||
set_interface_property clock PORT_NAME_MAP ""
|
||||
set_interface_property clock CMSIS_SVD_VARIABLES ""
|
||||
set_interface_property clock SVD_ADDRESS_GROUP ""
|
||||
|
||||
add_interface_port clock clk clk Input 1
|
||||
|
|
@ -19,8 +19,9 @@ vmap work ./work
|
|||
|
||||
# Compile the UUT
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/src/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/src/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB ../src/dpram_sclk_16.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/altera/generic_seq_ram_16.vhd
|
||||
#vcom -2008 -work $WORKLIB ../src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/generic_sequencer_16_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB ../src/generic_sequencer_16.vhd
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ entity generic_sequencer_16 is
|
|||
BUS_BURST_EN : boolean := false;
|
||||
POS_BUS_EN : boolean := false;
|
||||
ALU_EN : boolean := false;
|
||||
QUEUE_EN : boolean := false);
|
||||
QUEUE_EN : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
--
|
||||
clk : in std_logic;
|
||||
|
|
@ -304,19 +306,26 @@ begin
|
|||
-- Dual-Port Memory buffer
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
iRAM : entity work.generic_seq_ram_16
|
||||
iRAM : entity work.alt_rw_dp_ram
|
||||
generic map(
|
||||
SEQ_DEPTH => SEQ_DEPTH)
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => SEQ_DEPTH,
|
||||
REGISTER_OUTPUT => "UNREGISTERED",
|
||||
READ_WRITE_MODE => "OLD_DATA",
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
|
||||
)
|
||||
port map(
|
||||
clock => clk,
|
||||
address_a => avs_seq_address,
|
||||
clk => clk,
|
||||
addr_a => avs_seq_address,
|
||||
wren_a => avs_seq_write,
|
||||
data_a => avs_seq_writedata,
|
||||
q_a => avs_seq_readdata,
|
||||
address_b => ram_rd_addr,
|
||||
wrdata_a => avs_seq_writedata,
|
||||
rddata_a => avs_seq_readdata,
|
||||
addr_b => ram_rd_addr,
|
||||
wren_b => '0',
|
||||
data_b => (others => '0'),
|
||||
q_b => ram_rd_data);
|
||||
wrdata_b => (others => '0'),
|
||||
rddata_b => ram_rd_data
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Sequencer Logic
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@
|
|||
"minor_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x05",
|
||||
"reset" : "0x01",
|
||||
"description" : "Minor number"
|
||||
},
|
||||
"major_number" : {
|
||||
"type" : "c",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x00",
|
||||
"reset" : "0x05",
|
||||
"description" : "Major number"
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ use ieee.std_logic_1164.all;
|
|||
use ieee.numeric_std.all;
|
||||
|
||||
entity hmb_fpga_cfg_5 is
|
||||
generic (
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
|
|
@ -177,14 +180,21 @@ begin
|
|||
avs_readdata => avs_csr_readdata
|
||||
);
|
||||
|
||||
dp_mem_inst : entity work.dp_mem_5
|
||||
dp_mem_inst : entity work.alt_dp_ram
|
||||
generic map (
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => 64,
|
||||
REGISTER_OUTPUT => "UNREGISTERED",
|
||||
READ_WRITE_MODE => "DONT_CARE",
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
)
|
||||
port map(
|
||||
clock => clk,
|
||||
data => mem_wr_data,
|
||||
rdaddress => mem_rd_addr,
|
||||
wraddress => mem_wr_addr,
|
||||
clk => clk,
|
||||
wrdata => mem_wr_data,
|
||||
rdaddr => mem_rd_addr,
|
||||
wraddr => mem_wr_addr,
|
||||
wren => mem_wren,
|
||||
q => mem_rd_data
|
||||
rddata => mem_rd_data
|
||||
);
|
||||
|
||||
mem_wren <= (dma_mode and avm_rx_readdatavalid) or (control_ps_mode and ps_wr) or (control_cpu_mode and tx_word_pulse and status_ok_to_write);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ entity pixel_buffer_0 IS
|
|||
RSVD_DEPTH : integer range 0 to 1024 := 0;
|
||||
FULL_MARGIN : integer range 2 to 1024 := 8;
|
||||
EN_PEEK : boolean := false;
|
||||
VECTORED_RDREQ : boolean := false
|
||||
VECTORED_RDREQ : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
|
|
@ -129,7 +130,7 @@ entity pixel_buffer_0 IS
|
|||
|
||||
ip_id_ip_number : out std_logic_vector( 7 downto 0) := 8x"1c"; -- @suppress "Unused port: ip_id_ip_number is not used in work.pixel_buffer_0(rtl)"
|
||||
ip_id_mfr_number : out std_logic_vector( 7 downto 0) := 8x"00"; -- @suppress "Unused port: ip_id_mfr_number is not used in work.pixel_buffer_0(rtl)"
|
||||
ip_ver_minor_number : out std_logic_vector( 7 downto 0) := 8x"06"; -- @suppress "Unused port: ip_ver_minor_number is not used in work.pixel_buffer_0(rtl)"
|
||||
ip_ver_minor_number : out std_logic_vector( 7 downto 0) := 8x"07"; -- @suppress "Unused port: ip_ver_minor_number is not used in work.pixel_buffer_0(rtl)"
|
||||
ip_ver_major_number : out std_logic_vector( 7 downto 0) := 8x"00"; -- @suppress "Unused port: ip_ver_major_number is not used in work.pixel_buffer_0(rtl)"
|
||||
|
||||
diag_word_count : out std_logic_vector(6 downto 0)
|
||||
|
|
@ -229,20 +230,24 @@ begin
|
|||
wren(i) <= pixel_buf_wr_shft(i) when wr_req_int = '1' else '0';
|
||||
wren_int(i) <= wren(i) or diag_peek_wren(i);
|
||||
|
||||
pixel_ram_inst : entity work.pixel_ram_0
|
||||
pixel_ram_inst : entity work.alt_dp_ram
|
||||
generic map (
|
||||
DEPTH => PX_DEPTH + RSVD_DEPTH,
|
||||
WIDTH => PX_WIDTH
|
||||
DATA_WIDTH => PX_WIDTH,
|
||||
REGISTER_OUTPUT => "UNREGISTERED",
|
||||
READ_WRITE_MODE => "DONT_CARE",
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
data => data_int,
|
||||
rdaddress => rd_ptr_int(i)(TOTAL_DEPTH_LOG2-1 downto 0),
|
||||
wraddress => wr_ptr_int(TOTAL_DEPTH_LOG2-1 downto 0),
|
||||
clk => clk,
|
||||
wrdata => data_int,
|
||||
rdaddr => rd_ptr_int(i)(TOTAL_DEPTH_LOG2-1 downto 0),
|
||||
wraddr => wr_ptr_int(TOTAL_DEPTH_LOG2-1 downto 0),
|
||||
wren => wren_int(i),
|
||||
q => q((i+1)*PX_WIDTH-1 downto i*PX_WIDTH)
|
||||
rddata => q((i+1)*PX_WIDTH-1 downto i*PX_WIDTH)
|
||||
);
|
||||
|
||||
end generate GEN_PIXEL_BUFFERS;
|
||||
|
||||
-- -----------------------------------------------
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ entity pixel_buffer_zero_gap_0 IS
|
|||
RSVD_DEPTH : integer range 0 to 1024 := 0;
|
||||
NUM_CHANS : integer range 1 to 4 := 2;
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
EN_PEEK : boolean := false
|
||||
EN_PEEK : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
|
|
@ -240,7 +241,8 @@ begin
|
|||
SHIFT_DEPTH => SHIFT_DEPTH,
|
||||
PX_DEPTH => PX_DEPTH,
|
||||
RSVD_DEPTH => RSVD_DEPTH,
|
||||
EN_PEEK => EN_PEEK
|
||||
EN_PEEK => EN_PEEK,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
)
|
||||
port map
|
||||
(
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ entity preslicer_0 is
|
|||
NUM_STRIPES_DEPTH : integer range 2 to 32 := 8; -- whole 1bpp equivalent stripes must it be possible to buffer in preslicer
|
||||
NUM_STRIPES_FULL_MARGIN : integer range 1 to 31 := 2; -- at least this many 1bpp equivalent stripes space must be available
|
||||
SHIFT_DEPTH : integer range 1 to 2048 := 128; -- head shift buffer depth
|
||||
MAX_OP_WIDTH : natural range 1 to 128 := 8
|
||||
MAX_OP_WIDTH : natural range 1 to 128 := 8;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
|
|
@ -77,7 +78,7 @@ entity preslicer_0 is
|
|||
|
||||
ip_id_ip_number : out std_logic_vector(7 downto 0) := 8x"1d";
|
||||
ip_id_mfr_number : out std_logic_vector(7 downto 0) := 8x"00";
|
||||
ip_ver_minor_number : out std_logic_vector(7 downto 0) := 8x"01";
|
||||
ip_ver_minor_number : out std_logic_vector(7 downto 0) := 8x"02";
|
||||
ip_ver_major_number : out std_logic_vector(7 downto 0) := 8x"00"
|
||||
|
||||
);
|
||||
|
|
@ -197,32 +198,37 @@ begin
|
|||
pixel_buf_last_word <= pixel_buf_wr_data_int(32);
|
||||
|
||||
-- Instantiate The FIFO.
|
||||
preslicer_fifo_inst : entity work.preslicer_fifo_0
|
||||
generic map
|
||||
(
|
||||
WIDTH => 33,
|
||||
DEPTH => DEPTH,
|
||||
ALMOST_FULL_THRESH => ALMOST_FULL_THRESH
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
|
||||
sclr => clear_buffer,
|
||||
|
||||
data => ps_buf_wr_data_int,
|
||||
wrreq => ps_buf_wr_int,
|
||||
|
||||
almost_full => almost_full,
|
||||
almost_empty => open,
|
||||
empty => empty,
|
||||
full => full,
|
||||
|
||||
usedw => usedw,
|
||||
|
||||
rdreq => rdreq,
|
||||
q => q
|
||||
);
|
||||
preslicer_fifo_inst : entity work.alt_sync_fifo
|
||||
generic map
|
||||
(
|
||||
DATA_WIDTH => 33,
|
||||
DEPTH => DEPTH,
|
||||
REGISTER_OUTPUT => "ON",
|
||||
NEARLY_FULL => ALMOST_FULL_THRESH,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "ON"
|
||||
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
|
||||
sclr => clear_buffer,
|
||||
|
||||
wrdata => ps_buf_wr_data_int,
|
||||
wrreq => ps_buf_wr_int,
|
||||
|
||||
almost_full => almost_full,
|
||||
empty => empty,
|
||||
full => full,
|
||||
|
||||
usedw => usedw,
|
||||
|
||||
rdreq => rdreq,
|
||||
rddata => q
|
||||
);
|
||||
|
||||
|
||||
-- Flag to print streamer we're ready for data until almost full
|
||||
ps_buf_rdy <= not almost_full;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ entity preslicer_dual_0 is
|
|||
NUM_STRIPES_FULL_MARGIN : integer range 1 to 31 := 2; -- at least this many 1bpp equivalent stripes space must be available
|
||||
SHIFT_DEPTH : integer range 1 to 2048 := 128; -- head shift buffer depth
|
||||
MAX_OP_WIDTH : natural range 1 to 128 := 8;
|
||||
NO_ZERO_GAP : boolean := false
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port
|
||||
(
|
||||
|
|
@ -140,8 +141,8 @@ begin
|
|||
NUM_STRIPES_DEPTH => NUM_STRIPES_DEPTH,
|
||||
NUM_STRIPES_FULL_MARGIN => NUM_STRIPES_FULL_MARGIN,
|
||||
SHIFT_DEPTH => SHIFT_DEPTH,
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH
|
||||
|
||||
MAX_OP_WIDTH => MAX_OP_WIDTH,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
)
|
||||
port map
|
||||
(
|
||||
|
|
|
|||
374
generic_ip/print_streamer/7/doc/data_streamer_7.json
Normal file
374
generic_ip/print_streamer/7/doc/data_streamer_7.json
Normal file
|
|
@ -0,0 +1,374 @@
|
|||
[{
|
||||
"ip_name" : "data_streamer_7",
|
||||
"bus" : "csr",
|
||||
"addr_width" : "4",
|
||||
"description" : "This block is the print streamer for the GMA SOM board soft IP",
|
||||
"notes" : "The print streamer is a block that allows read access to the main memory. It is either used to access physical locations in memory, or to access virtual locations mapped to physical page blocks (4096 bytes, or 1024 words). The main CPU control is via the CMD_PORT register. This accepts a variety of commands (see https://confluence.gisapps.co.uk/display/EL/Embedded+Logic+Print+Streamer+New+Architecture) to send stripe data to external ports, to put virtual to physical mappings into the TLB queue or to load new commands directly into the command queue from memory. The CPU must only send commands (two words) when there is sufficient space, as indicated by the QUEUE_SPACE field of the STATUS register. When using the RD_STRIPE_PADDR command, the TLB queue can be empty (with no LOAD_ADDR_MAP commands needed). When using one of the virtual address commands (e.g. RD_STRIPE_VADDR or LOAD_CMD_Q), the TLB queue must be pre-filled with mappings that cover the data transfer commands, using the LD_ADDR_MAP command. If the transfer is less than a page length, and does not cross a page boundary, then a LD_ADDR_MAP command is sent to map the physical location to the virtual address of the data, before sending the RD_STRIPE_VADDR command. If the data spans a page boundary, then two LD_ADDR_MAP commands are sent prior to the RD_STRIPE_VADDR, to map the two separate physical pages to the two (contiguous) pages in the virtual address space. Similarly, if a transfer spans multiple pages, the appropriate number of LD_ADDR_MAP commands are sent first before the RD_STRIPE_VADDR command to cover the pages for that data. Note that if the transfer is a continuation of data in a page that the last transfer completed in, then the map for this first page should not be sent, as it will still be the active mapping in the streamer. The CLR_CMD bit in the CONTROL register clears all commands and TLB mappings, so for a completely new transfer the TLB can be reset with this. The print streamer is capable of loading itself with new commands directly from memory, also using virtual addressing. The LOAD_CMD_Q command is identical in its usage to the RD_STRIPE_VADDR command, but with the destination being the command queue. Therefore commands can be pre-compiled in memory and then a LD_CMD_Q command sent to place them in the queue and start executing. If the last command in the batch is also a LD_CMD_Q, then the commands can be linked in memory indefinitely. The print streamer monitors when LD_CMD_Q commands are in the print streamer---either in the command queue itself, or active on the bus. This status is flagged as the AUTO_CMD_ACTIVE bit of the STATUS register, and the CPU must not attempt to write to the command queue when set, as this is a race hazard and could corrupt the command queue data. If a CPU write does occur, an error is flagged. In addition, if a LD_CMD_Q has a word length that is greater than the command queue length, this is an error and flagged. Various errors are monitored for, and the STATUS register returns various error statuses. If any error is active, then the print streamer is halted until the error consitions are cleared via the CLEAR_ERRORS and CLEAR_CMD bits of the CONTROL register. The errors detected include a failure to get a TLB virtual/physical mapping, an empty TLB queue when processing a virtual address command, an LD_CMD_Q with a too large word length parameter, an unrecognised command and a CPU access when LD_CMD_Q active (see the error bits of the STATUS register). The print streamer can generate an interrupt to the CPU. All error types will assert the IRQ output. In addition, if the number of commands in the command queue falls below a certain value, as configured in the WATERMARK field of the CONTROL register, IRQ is also asserted. This is effectively disabled if the watermark value is 0 (the reset value).",
|
||||
"registers" : {
|
||||
"ip_id" : {
|
||||
"address" : "0",
|
||||
"width" : "32",
|
||||
"description" : "Unique ID for this IP block",
|
||||
"fields": {
|
||||
"ip_number" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x0d",
|
||||
"description" : "IP identifier number"
|
||||
},
|
||||
"mfr_number" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x04",
|
||||
"description" : "Manufacturer number"
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
"bit_len" : "16",
|
||||
"description" : "Reserved bits"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ip_ver" : {
|
||||
"address" : "1",
|
||||
"width" : "32",
|
||||
"description" : "Bits[7:0] = Minor version number, Bits[15:8] = Major version number, etc.",
|
||||
"fields": {
|
||||
"minor_number" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x00",
|
||||
"description" : "Minor number"
|
||||
},
|
||||
"major_number" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0x07",
|
||||
"description" : "Major number"
|
||||
|
||||
},
|
||||
"reserved" : {
|
||||
"type" : "rsv",
|
||||
"bit_len" : "16",
|
||||
"description" : "Reserved bits"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cmd_port" : {
|
||||
"address" : "2",
|
||||
"width" : "32",
|
||||
"type" : "wp",
|
||||
"reset" : "0",
|
||||
"description" : "Command port. A write adds a word to the command queue. Command is command code followed by parameter word. Only safe to write a command if QUEUE_SPACE in STATUS register is not 0."
|
||||
},
|
||||
"control" : {
|
||||
"address" : "3",
|
||||
"width" : "14",
|
||||
"description" : "Control",
|
||||
"fields" : {
|
||||
"clear_cmd" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear the command queue of all commands (and the TLB queue of mappings)."
|
||||
},
|
||||
"clear_errors" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear outstanding errors."
|
||||
},
|
||||
"msb" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Memory read data byte order is MSB"
|
||||
},
|
||||
"watermark" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Watermark level to assert interrupt if command queue space falls below this value"
|
||||
},
|
||||
"en_acp_window" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "1",
|
||||
"description" : "Enable AXI access via the ACP window"
|
||||
},
|
||||
"disable" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Disable print streamer"
|
||||
},
|
||||
"clr_dst0_count" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear dst0 counter"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status" : {
|
||||
"address" : "4",
|
||||
"width" : "28",
|
||||
"description" : "Command port",
|
||||
"fields" : {
|
||||
"queue_space" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "5",
|
||||
"reset" : "16",
|
||||
"description" : "Amount of command space left in queue, in units of commands (2 words). I.e. when 1, can write a single command of two words."
|
||||
},
|
||||
"tlb_mismatch_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "TLB mapping mis-match error."
|
||||
},
|
||||
"tlb_empty_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "TLB empty error."
|
||||
},
|
||||
"auto_load_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Auto-load command request too big for queue."
|
||||
},
|
||||
"bad_cmd_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Unrecognised command error."
|
||||
},
|
||||
"cpu_race_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "CPU write to command queue with active auto-load commands error."
|
||||
},
|
||||
"overrun_err" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "CPU write to command queue when full error."
|
||||
},
|
||||
"auto_cmd_active" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "One or more auto-loading commands are active, and CPU writes to the command port are hazardous."
|
||||
},
|
||||
"cmd_depth_log2" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "4",
|
||||
"reset" : "5",
|
||||
"description" : "The Log2 value of the maximum command queue depth"
|
||||
},
|
||||
"handle" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "12",
|
||||
"reset" : "0",
|
||||
"description" : "Last handle set by a NOP command to streamer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"diags" : {
|
||||
"address" : "5",
|
||||
"width" : "28",
|
||||
"description" : "Command port",
|
||||
"fields" : {
|
||||
"remain" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "12",
|
||||
"reset" : "0",
|
||||
"description" : "Remaining burst count"
|
||||
},
|
||||
"cmd_pending" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Command pending"
|
||||
},
|
||||
"data_active" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Data transfer active"
|
||||
},
|
||||
"cmd_avail" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Command available"
|
||||
},
|
||||
"dst_sel" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "4",
|
||||
"reset" : "0",
|
||||
"description" : "Destination select"
|
||||
},
|
||||
"dst_rdy" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Destination ready"
|
||||
},
|
||||
"logger_wr_ptr" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Data streamer command logger write pointer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"curr_cmd" : {
|
||||
"address" : "6",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Current active command"
|
||||
},
|
||||
"curr_param1" : {
|
||||
"address" : "7",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Current active parameter 1"
|
||||
},
|
||||
"dst0_word_count" : {
|
||||
"address" : "8",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Word count for destination 0"
|
||||
},
|
||||
"fifo_wr_port" : {
|
||||
"address" : "9",
|
||||
"width" : "32",
|
||||
"type" : "wp",
|
||||
"reset" : "0",
|
||||
"description" : "Fifo queue write port"
|
||||
},
|
||||
"fifo_rd_port" : {
|
||||
"address" : "10",
|
||||
"width" : "32",
|
||||
"type" : "rp",
|
||||
"reset" : "0",
|
||||
"description" : "Fifo queue read port"
|
||||
},
|
||||
"fifo_status" : {
|
||||
"address" : "11",
|
||||
"width" : "14",
|
||||
"description" : "FIFO queue status",
|
||||
"fields" : {
|
||||
"empty" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Fifo empty"
|
||||
},
|
||||
"full" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "FIFO full"
|
||||
},
|
||||
"underrun" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "FIFO underrun"
|
||||
},
|
||||
"overrun" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "FIFO overrun"
|
||||
},
|
||||
"loop_count" : {
|
||||
"type" : "r",
|
||||
"bit_len" : "10",
|
||||
"reset" : "0",
|
||||
"description" : "FIFO loop count"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fifo_controls" : {
|
||||
"address" : "12",
|
||||
"width" : "3",
|
||||
"description" : "FIFO queue control",
|
||||
"fields" : {
|
||||
"clr_errors" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear FIFO errors"
|
||||
},
|
||||
"clr_fifo" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Disable read cause pop from FIFO"
|
||||
},
|
||||
"pop_rd_port" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"fifo_rd_addr" : {
|
||||
"address" : "13",
|
||||
"width" : "32",
|
||||
"type" : "w",
|
||||
"reset" : "0",
|
||||
"description" : "Redirection read address"
|
||||
},
|
||||
"diag_step" : {
|
||||
"address" : "14",
|
||||
"width" : "11",
|
||||
"description" : "Diagnostic streamer test",
|
||||
"fields" : {
|
||||
"mode_en" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Enable diagnostic streamer step mode"
|
||||
},
|
||||
"go" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Step next queed streamer command"
|
||||
},
|
||||
"clr_logger" : {
|
||||
"type" : "w0",
|
||||
"bit_len" : "1",
|
||||
"reset" : "0",
|
||||
"description" : "Clear data streamer command queue logger"
|
||||
},
|
||||
"logger_raddr" : {
|
||||
"type" : "w",
|
||||
"bit_len" : "8",
|
||||
"reset" : "0",
|
||||
"description" : "Data streamer command queue logger read address"
|
||||
}
|
||||
}
|
||||
},
|
||||
"diag_logger_rdata" : {
|
||||
"address" : "15",
|
||||
"width" : "32",
|
||||
"type" : "r",
|
||||
"reset" : "0",
|
||||
"description" : "Data streamer command queue logger read data"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
49
generic_ip/print_streamer/7/doc/print_streamer_7.json
Normal file
49
generic_ip/print_streamer/7/doc/print_streamer_7.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
[{
|
||||
"ip_name" : "print_streamer_7",
|
||||
"bus" : "csr",
|
||||
"addr_hi_bit" : "6",
|
||||
"addr_lo_bit" : "4",
|
||||
"description" : "This block is the top level for the GMA SOM board soft IP",
|
||||
"sub_blocks" : {
|
||||
"data_streamer_7:a" : {
|
||||
"instance" : "0",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x00"
|
||||
},
|
||||
"data_streamer_7:b" : {
|
||||
"instance" : "1",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x10"
|
||||
},
|
||||
"data_streamer_7:c" : {
|
||||
"instance" : "2",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x20"
|
||||
},
|
||||
"data_streamer_7:d" : {
|
||||
"instance" : "3",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x30"
|
||||
},
|
||||
"data_streamer_7:e" : {
|
||||
"instance" : "0_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x40"
|
||||
},
|
||||
"data_streamer_7:f" : {
|
||||
"instance" : "1_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x50"
|
||||
},
|
||||
"data_streamer_7:g" : {
|
||||
"instance" : "2_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x60"
|
||||
},
|
||||
"data_streamer_7:h" : {
|
||||
"instance" : "3_aux",
|
||||
"process" : "enabled",
|
||||
"offset" : "0x70"
|
||||
}
|
||||
}
|
||||
}]
|
||||
120
generic_ip/print_streamer/7/src/avm_to_axi_master_7.vhd
Normal file
120
generic_ip/print_streamer/7/src/avm_to_axi_master_7.vhd
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief SOM FPGA Avalon MM master to AXI4 master conversion
|
||||
--!
|
||||
--! @details
|
||||
--!
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! @li Avalon MM master avm_rx_*0 : Avalon bus interface master port 0 from internal logic
|
||||
--! @li Avalon MM master avm_rx_*1 : Avalon bus interface master port 1 from internal logic
|
||||
--! @li AXI4 master i/f axm_* : AXI master interface to memory sub-system. Configurable for cached accesses
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Module is combinatorial
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-7-23
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
entity avm_to_axi_master_7 is
|
||||
generic (
|
||||
ARUSER : std_logic := '1'; -- If Cacheable accesses required, this must be 1
|
||||
ARCACHE : std_logic_vector(3 downto 0) := "1110" -- For cacheable accesses, bit 3 must be 1, and the rest a valid value as per A4.4 of AXI4 spec.
|
||||
);
|
||||
port (
|
||||
en_acp_window : in std_logic;
|
||||
|
||||
--AXI write address bus
|
||||
axm_awaddr : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
axm_awprot : out std_logic_vector( 2 downto 0) := (others => '0');
|
||||
axm_awvalid : out std_logic; --master addr valid
|
||||
axm_awready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write data bus
|
||||
axm_wdata : out std_logic_vector(31 downto 0) := (others => '0');
|
||||
axm_wlast : out std_logic := '0'; --last transfer in burst
|
||||
axm_wvalid : out std_logic; --master data valid
|
||||
axm_wready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write response bus
|
||||
axm_bvalid : in std_logic;
|
||||
axm_bready : out std_logic;
|
||||
|
||||
--AXI read address bus
|
||||
axm_araddr : out std_logic_vector(31 downto 0);
|
||||
axm_arlen : out std_logic_vector( 7 downto 0); --burst length - 1 to 16
|
||||
axm_arsize : out std_logic_vector( 2 downto 0); --size of each transfer in burst
|
||||
axm_arburst : out std_logic_vector( 1 downto 0); --for bursts>1, accept only incr burst=01
|
||||
axm_arcache : out std_logic_vector( 3 downto 0);
|
||||
axm_aruser : out std_logic;
|
||||
axm_arprot : out std_logic_vector( 2 downto 0);
|
||||
axm_arvalid : out std_logic; --master addr valid
|
||||
axm_arready : in std_logic; --slave ready to accept
|
||||
|
||||
-- AXI read data bus
|
||||
axm_rdata : in std_logic_vector(31 downto 0); --last transfer in burst
|
||||
axm_rvalid : in std_logic; --slave data valid
|
||||
axm_rready : out std_logic; --master ready to accept
|
||||
|
||||
-- AVM input port 0
|
||||
avm_rx_read0 : in std_logic;
|
||||
avm_rx_burstcount0 : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address0 : in std_logic_vector(31 downto 0);
|
||||
|
||||
-- AVM input port 1
|
||||
avm_rx_read1 : in std_logic;
|
||||
avm_rx_burstcount1 : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address1 : in std_logic_vector(31 downto 0);
|
||||
|
||||
-- AVM common signals
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic
|
||||
|
||||
);
|
||||
end entity;
|
||||
|
||||
architecture rtl of avm_to_axi_master_7 is
|
||||
|
||||
signal avm_rx_read : std_logic;
|
||||
signal avm_rx_address : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_burstcount : std_logic_vector(11 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
-- Mux the Avalon master bus between port 0 and port 1. Port 0 has priority.
|
||||
avm_rx_read <= avm_rx_read0 or avm_rx_read1;
|
||||
avm_rx_address <= avm_rx_address0 when avm_rx_read0 = '1' else avm_rx_address1;
|
||||
avm_rx_burstcount <= avm_rx_burstcount0 when avm_rx_read0 = '1' else avm_rx_burstcount1;
|
||||
|
||||
axm_awvalid <= '0';
|
||||
axm_wvalid <= '0';
|
||||
axm_bready <= '0';
|
||||
|
||||
axm_arvalid <= avm_rx_read;
|
||||
axm_araddr <= en_acp_window & avm_rx_address(30 downto 0); -- Access via ACP window (bit 31 set)
|
||||
axm_arlen <= std_logic_vector(unsigned(avm_rx_burstcount(7 downto 0)) - 1);
|
||||
axm_arsize <= 3X"2"; -- 4 bytes transfers (2^ARSIZE bytes)
|
||||
axm_arburst <= "01"; -- Increment
|
||||
axm_arprot <= "000"; -- Unpriviledged, non-secure, data access
|
||||
axm_arcache <= ARCACHE;
|
||||
axm_aruser <= ARUSER;
|
||||
axm_rready <= '1';
|
||||
|
||||
avm_rx_waitrequest <= not axm_arready;
|
||||
avm_rx_readdatavalid <= axm_rvalid;
|
||||
avm_rx_readdata <= axm_rdata;
|
||||
|
||||
end architecture;
|
||||
181
generic_ip/print_streamer/7/src/mem_arbiter_7.vhd
Normal file
181
generic_ip/print_streamer/7/src/mem_arbiter_7.vhd
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief SOM FPGA memory access arbiter
|
||||
--!
|
||||
--! @details
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk : nominally 100MHz
|
||||
--! @li rst_n : active low reset for clk (asynchronous assert)
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! @li Avalon MM master avm_rx_* : External Avalon master bus interface input
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Module is a single clock domain synchronous block
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-1-10
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
package mem_arbiter_7_pkg is
|
||||
type bus_array_t is array(natural range <>) of std_logic_vector;
|
||||
end package;
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.pkg_functions.all;
|
||||
use work.mem_arbiter_7_pkg.all;
|
||||
|
||||
entity mem_arbiter_7 is
|
||||
generic (
|
||||
NUM_PORTS : natural range 1 to 16 := 8
|
||||
);
|
||||
port (
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
transfer_active : in std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_waitrequest_in : out std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_burstcount_in : in bus_array_t (0 to NUM_PORTS-1)(11 downto 0);
|
||||
avm_rx_address_in : in bus_array_t (0 to NUM_PORTS-1)(31 downto 0);
|
||||
avm_rx_read_in : in std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
avm_rx_readdata_in : out bus_array_t (0 to NUM_PORTS-1)(31 downto 0);
|
||||
avm_rx_readdatavalid_in : out std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
|
||||
avm_rx_waitrequest : in std_logic;
|
||||
avm_rx_burstcount : out std_logic_vector(11 downto 0);
|
||||
avm_rx_address : out std_logic_vector(31 downto 0);
|
||||
avm_rx_read : out std_logic;
|
||||
avm_rx_readdata : in std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : in std_logic
|
||||
|
||||
);
|
||||
|
||||
end entity mem_arbiter_7;
|
||||
|
||||
architecture rtl of mem_arbiter_7 is
|
||||
|
||||
signal enable : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal mask : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal reqs : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal prior_choice : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal any_choice : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal transfer_active_dly : std_logic_vector(NUM_PORTS-1 downto 0);
|
||||
signal sel_trans_end : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
GEN_ARB_LOOP : for i in 0 to NUM_PORTS-1 generate
|
||||
|
||||
avm_rx_waitrequest_in(i) <= avm_rx_waitrequest or not enable(i);
|
||||
avm_rx_readdata_in(i) <= avm_rx_readdata;
|
||||
avm_rx_readdatavalid_in(i) <= avm_rx_readdatavalid and enable(i);
|
||||
|
||||
end generate GEN_ARB_LOOP;
|
||||
|
||||
-- Mux burst count on selected source
|
||||
avm_rx_burstcount <= avm_rx_burstcount_in(7) when enable(7) = '1' else
|
||||
avm_rx_burstcount_in(6) when enable(6) = '1' else
|
||||
avm_rx_burstcount_in(5) when enable(5) = '1' else
|
||||
avm_rx_burstcount_in(4) when enable(4) = '1' else
|
||||
avm_rx_burstcount_in(3) when enable(3) = '1' else
|
||||
avm_rx_burstcount_in(2) when enable(2) = '1' else
|
||||
avm_rx_burstcount_in(1) when enable(1) = '1' else
|
||||
avm_rx_burstcount_in(0);
|
||||
|
||||
-- Mux address on selected source
|
||||
avm_rx_address <= avm_rx_address_in(7) when enable(7) = '1' else
|
||||
avm_rx_address_in(6) when enable(6) = '1' else
|
||||
avm_rx_address_in(5) when enable(5) = '1' else
|
||||
avm_rx_address_in(4) when enable(4) = '1' else
|
||||
avm_rx_address_in(3) when enable(3) = '1' else
|
||||
avm_rx_address_in(2) when enable(2) = '1' else
|
||||
avm_rx_address_in(1) when enable(1) = '1' else
|
||||
avm_rx_address_in(0);
|
||||
|
||||
-- Issue a read whenever an enabled channel is requesting
|
||||
avm_rx_read <= '1' when (enable and avm_rx_read_in) /= 8x"0" else '0';
|
||||
|
||||
-- Request vector for prioritised channels
|
||||
reqs <= avm_rx_read_in and not mask;
|
||||
|
||||
-- Priority encoder to choose from one or more reqs
|
||||
prior_choice <= "10000000" when reqs(7) else
|
||||
"01000000" when reqs(6) else
|
||||
"00100000" when reqs(5) else
|
||||
"00010000" when reqs(4) else
|
||||
"00001000" when reqs(3) else
|
||||
"00000100" when reqs(2) else
|
||||
"00000010" when reqs(1) else
|
||||
"00000001";
|
||||
|
||||
-- Priority encoder to choose from any requesting channel
|
||||
any_choice <= "00000001" when avm_rx_read_in(0) else
|
||||
"00000010" when avm_rx_read_in(1) else
|
||||
"00000100" when avm_rx_read_in(2) else
|
||||
"00001000" when avm_rx_read_in(3) else
|
||||
"00010000" when avm_rx_read_in(4) else
|
||||
"00100000" when avm_rx_read_in(5) else
|
||||
"01000000" when avm_rx_read_in(6) else
|
||||
"10000000";
|
||||
|
||||
-- Flag when selected channel end a transfer
|
||||
sel_trans_end <= (transfer_active_dly(0) and not transfer_active(0) and enable(0)) or
|
||||
(transfer_active_dly(1) and not transfer_active(1) and enable(1)) or
|
||||
(transfer_active_dly(2) and not transfer_active(2) and enable(2)) or
|
||||
(transfer_active_dly(3) and not transfer_active(3) and enable(3)) or
|
||||
(transfer_active_dly(4) and not transfer_active(4) and enable(4)) or
|
||||
(transfer_active_dly(5) and not transfer_active(5) and enable(5)) or
|
||||
(transfer_active_dly(6) and not transfer_active(6) and enable(6)) or
|
||||
(transfer_active_dly(7) and not transfer_active(7) and enable(7));
|
||||
|
||||
-- Arbitration state process
|
||||
process (clk, rst_n)
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
|
||||
enable <= (others => '0');
|
||||
mask <= (others => '0');
|
||||
transfer_active_dly <= (others => '0');
|
||||
|
||||
elsif clk'event and clk = '1' then
|
||||
|
||||
-- Generate a delayed version of transfer active signal
|
||||
transfer_active_dly <= transfer_active;
|
||||
|
||||
-- If no active channel or just ending a transfer, arbitrate for any new requests
|
||||
if unsigned(enable) = 0 or sel_trans_end = '1' then
|
||||
|
||||
-- By default clear any outstanding enable.
|
||||
enable <= (others => '0');
|
||||
|
||||
-- If a priority request is active, enable chosen channel, and mask it to drop its priority
|
||||
if unsigned(reqs) /= 0 then
|
||||
enable <= prior_choice;
|
||||
mask <= mask or prior_choice;
|
||||
-- If no priority reqs, choose any low priority reqs. Clear all masks except chosen
|
||||
elsif unsigned(avm_rx_read_in) /= 0 then
|
||||
enable <= any_choice;
|
||||
mask <= any_choice;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end architecture;
|
||||
596
generic_ip/print_streamer/7/src/print_streamer_7.vhd
Normal file
596
generic_ip/print_streamer/7/src/print_streamer_7.vhd
Normal file
|
|
@ -0,0 +1,596 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief SOM FPGA print streamer
|
||||
--!
|
||||
--! @details
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk : nominally 100MHz
|
||||
--! @li rst_n : active low reset for clk (asynchronous assert)
|
||||
--!
|
||||
--! @b Interfaces:
|
||||
--! @li Avalon MM slave avs_csr_* : Control and status register memory mapped bus
|
||||
--! @li Avalon MM master avm_rx_* : External Avalon master bus interface input
|
||||
--! @li AXI4 master i/f axm_* : AXI master interface to memory sub-system
|
||||
--! @li dest_port_* : Interface to pixel buffers of each head
|
||||
--! @li irq : Interrupt output
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Module is a single clock domain synchronous block
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2018 Global Inkjet Systems
|
||||
--! @date 2018-1-10
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.common_pkg.all;
|
||||
use work.mem_arbiter_7_pkg.all;
|
||||
|
||||
entity print_streamer_7 is
|
||||
generic (
|
||||
CMD_QUEUE_DEPTH : natural range 1 to 1024 := 32;
|
||||
MAX_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_HEADS : natural range 1 to 4 := 4;
|
||||
NUM_CHANS : natural range 1 to 4 := 2;
|
||||
MAX_CHANS : natural range 1 to 4 := 2;
|
||||
SLIM : boolean := false;
|
||||
NO_ZERO_GAP : boolean := false;
|
||||
STREAMER_LOGGER : boolean := false;
|
||||
LOGGER_DEPTH : integer range 1 to 1024 := 256
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
avs_csr_address : in std_logic_vector(10 downto 0);
|
||||
avs_csr_write : in std_logic;
|
||||
avs_csr_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_csr_read : in std_logic;
|
||||
avs_csr_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
-- External master port for access to memory system via AXI bus
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address : in std_logic_vector(31 downto 0);
|
||||
avm_rx_read : in std_logic;
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic;
|
||||
|
||||
--AXI write address bus
|
||||
axm_awaddr : out std_logic_vector(31 downto 0);
|
||||
axm_awprot : out std_logic_vector( 2 downto 0);
|
||||
axm_awvalid : out std_logic; --master addr valid
|
||||
axm_awready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write data bus
|
||||
axm_wdata : out std_logic_vector(31 downto 0);
|
||||
axm_wlast : out std_logic; --last transfer in burst
|
||||
axm_wvalid : out std_logic; --master data valid
|
||||
axm_wready : in std_logic; --slave ready to accept
|
||||
|
||||
--AXI write response bus
|
||||
axm_bvalid : in std_logic;
|
||||
axm_bready : out std_logic;
|
||||
|
||||
--AXI read address bus
|
||||
axm_araddr : out std_logic_vector(31 downto 0);
|
||||
axm_arlen : out std_logic_vector( 7 downto 0); --burst length - 1 to 256 (ARLEN = burst len -1)
|
||||
axm_arsize : out std_logic_vector( 2 downto 0); --size, nb bytes, of each transfer in burst
|
||||
axm_arburst : out std_logic_vector( 1 downto 0); --for bursts>1, accept only incr burst=01
|
||||
axm_arcache : out std_logic_vector( 3 downto 0);
|
||||
axm_aruser : out std_logic;
|
||||
axm_arprot : out std_logic_vector( 2 downto 0);
|
||||
axm_arvalid : out std_logic; --master addr valid
|
||||
axm_arready : in std_logic; --slave ready to accept
|
||||
|
||||
-- AXI read data bus
|
||||
axm_rdata : in std_logic_vector(31 downto 0);
|
||||
axm_rvalid : in std_logic; --slave data valid
|
||||
axm_rready : out std_logic; --master ready to access
|
||||
|
||||
dest_port_wr : out std_logic_vector(MAX_HEADS*NUM_CHANS-1 downto 0);
|
||||
dest_port_wr_data : out std_logic_vector(31 downto 0);
|
||||
dest_port_rdy : in std_logic_vector(MAX_HEADS*NUM_CHANS-1 downto 0);
|
||||
dest_port_last_word : out std_logic;
|
||||
|
||||
irq : out std_logic;
|
||||
|
||||
debug_out : out std_logic_vector(19 downto 0)
|
||||
|
||||
);
|
||||
|
||||
end entity print_streamer_7;
|
||||
|
||||
architecture rtl of print_streamer_7 is
|
||||
|
||||
constant CMD_QUEUE_DEPTH_LOG2 : integer := log2(CMD_QUEUE_DEPTH)-1;
|
||||
|
||||
type queue_spc_t is array (0 to NUM_CHANS*MAX_HEADS-1) of std_logic_vector( 5 downto 0);
|
||||
type watermark_t is array (0 to NUM_CHANS*MAX_HEADS-1) of std_logic_vector( 7 downto 0);
|
||||
type handle_t is array (0 to NUM_CHANS*MAX_HEADS-1) of std_logic_vector(11 downto 0);
|
||||
type debug_t is array (0 to NUM_CHANS*MAX_HEADS-1) of std_logic_vector(19 downto 0);
|
||||
|
||||
signal cmd_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal cmd_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal status_queue_space : queue_spc_t;
|
||||
signal control_clear_cmd : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_clear_errors : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_msb : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_watermark : watermark_t;
|
||||
signal control_en_acp_window : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_disable : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal control_clr_dst0_count : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal auto_cmd_active : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal auto_load_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal bad_cmd_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal cpu_race_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal overrun_err : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal handle : handle_t;
|
||||
|
||||
signal avm_rx_burstcount_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(11 downto 0);
|
||||
signal avm_rx_address_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avm_rx_read_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avm_rx_waitrequest_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avm_rx_readdata_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avm_rx_readdatavalid_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal avm_rx_waitrequest_arb : std_logic;
|
||||
signal avm_rx_burstcount_arb : std_logic_vector(11 downto 0);
|
||||
signal avm_rx_address_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_read_arb : std_logic;
|
||||
signal avm_rx_readdata_arb : std_logic_vector(31 downto 0);
|
||||
signal avm_rx_readdatavalid_arb : std_logic;
|
||||
|
||||
signal debug_out_int : debug_t;
|
||||
|
||||
signal diag_1 : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_2 : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal dst0_word_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
|
||||
signal diag_step_mode : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal diag_step : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal avs_csr_readdata_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal avs_csr_write_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal avs_csr_read_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal irq_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal dest_port_wr_data_int : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal dest_port_last_word_int : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal dest_port_wr_0 : std_logic_vector(1 downto 0);
|
||||
signal dest_port_rdy_0 : std_logic_vector(1 downto 0);
|
||||
|
||||
signal fifo_wr_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_wr_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_wr_port_in : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_rd_port : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_rd_port_pulse : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_empty : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_full : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_underrun : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_status_overrun : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_clr_fifo : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_clr_errors : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_controls_pop_rd_port : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal fifo_rd_addr : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal fifo_loop_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 9 downto 0);
|
||||
|
||||
signal ip_id_ip_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_id_mfr_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_ver_minor_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
signal ip_ver_major_number : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)( 7 downto 0);
|
||||
|
||||
signal transfer_active : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
|
||||
signal diag_cmd_q_write : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0);
|
||||
signal diag_cmd_q_write_data : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_cmd_q_read_data : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(31 downto 0);
|
||||
signal diag_cmd_q_rd_addr : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(log2(LOGGER_DEPTH)-1 downto 0) := (others => (others => '0'));
|
||||
signal diag_cmd_q_clr_log : std_logic_vector(NUM_CHANS*MAX_HEADS-1 downto 0) := (others => '0');
|
||||
signal diag_cmd_q_wr_count : bus_array_t(0 to NUM_CHANS*MAX_HEADS-1)(log2(LOGGER_DEPTH)-1 downto 0) := (others => (others => '0'));
|
||||
begin
|
||||
|
||||
debug_out <= debug_out_int(0);
|
||||
|
||||
irq <= '0' when irq_int = std_logic_vector(to_unsigned(0, NUM_CHANS*MAX_HEADS)) else '1';
|
||||
|
||||
dest_port_wr_data <= dest_port_wr_data_int(7) when dest_port_wr(7) = '1' else
|
||||
dest_port_wr_data_int(6) when dest_port_wr(6) = '1' else
|
||||
dest_port_wr_data_int(5) when dest_port_wr(5) = '1' else
|
||||
dest_port_wr_data_int(4) when dest_port_wr(4) = '1' else
|
||||
dest_port_wr_data_int(3) when dest_port_wr(3) = '1' else
|
||||
dest_port_wr_data_int(2) when dest_port_wr(2) = '1' else
|
||||
dest_port_wr_data_int(1) when dest_port_wr(1) = '1' else
|
||||
dest_port_wr_data_int(0);
|
||||
|
||||
dest_port_last_word <= dest_port_last_word_int(0) or dest_port_last_word_int(1) or
|
||||
dest_port_last_word_int(2) or dest_port_last_word_int(3) or
|
||||
dest_port_last_word_int(4) or dest_port_last_word_int(5) or
|
||||
dest_port_last_word_int(6) or dest_port_last_word_int(7);
|
||||
|
||||
|
||||
-- If the number of heads is less than the maximum, tie off the signals from the
|
||||
-- instantitad head logic
|
||||
GEN_TIE_OFF_REQD : if MAX_HEADS > NUM_HEADS generate
|
||||
GEN_TIE_OFF : for i in NUM_HEADS to MAX_HEADS-1 generate
|
||||
avm_rx_read_int(i) <= '0';
|
||||
avm_rx_read_int(i+MAX_HEADS) <= '0';
|
||||
transfer_active(i) <= '0';
|
||||
transfer_active(i+MAX_HEADS) <= '0';
|
||||
avs_csr_readdata_int(i) <= (others => '0');
|
||||
avs_csr_readdata_int(i+MAX_HEADS) <= (others => '0');
|
||||
dest_port_last_word_int(i) <= '0';
|
||||
dest_port_last_word_int(i+MAX_HEADS) <= '0';
|
||||
dest_port_wr(i) <= '0';
|
||||
dest_port_wr(i+MAX_HEADS) <= '0';
|
||||
avm_rx_burstcount_int(i) <= (others => '0');
|
||||
avm_rx_burstcount_int(i+MAX_HEADS) <= (others => '0');
|
||||
avm_rx_address_int(i) <= (others => '0');
|
||||
avm_rx_address_int(i+MAX_HEADS) <= (others => '0');
|
||||
dest_port_wr_data_int(i) <= (others => '0');
|
||||
dest_port_wr_data_int(i+MAX_HEADS) <= (others => '0');
|
||||
diag_1(i) <= (others => '0');
|
||||
diag_1(i+MAX_HEADS) <= (others => '0');
|
||||
diag_2(i) <= (others => '0');
|
||||
diag_2(i+MAX_HEADS) <= (others => '0');
|
||||
irq_int(i) <= '0';
|
||||
irq_int(i+MAX_HEADS) <= '0';
|
||||
end generate GEN_TIE_OFF;
|
||||
end generate GEN_TIE_OFF_REQD;
|
||||
|
||||
-- If zero gap support is not required tie off the signals from the uninstantiated zero gap logic
|
||||
GEN_ZG_TIE_OFF : if NO_ZERO_GAP = true generate
|
||||
GEN_ZG_TIE_OFF_LOOP : for i in MAX_HEADS to MAX_HEADS+NUM_HEADS-1 generate
|
||||
|
||||
avs_csr_readdata_int(i) <= (others => '0');
|
||||
dest_port_last_word_int(i) <= '0';
|
||||
dest_port_wr(i) <= '0';
|
||||
avm_rx_burstcount_int(i) <= (others => '0');
|
||||
dest_port_wr_data_int(i) <= (others => '0');
|
||||
diag_1(i) <= (others => '0');
|
||||
diag_2(i) <= (others => '0');
|
||||
irq_int(i) <= '0';
|
||||
|
||||
end generate;
|
||||
end generate GEN_ZG_TIE_OFF;
|
||||
|
||||
print_streamer_csr_decode_1 : entity work.print_streamer_7_csr_decode
|
||||
port map (
|
||||
|
||||
data_streamer_7_0_write => avs_csr_write_int(0),
|
||||
data_streamer_7_0_read => avs_csr_read_int(0),
|
||||
data_streamer_7_0_readdata => avs_csr_readdata_int(0),
|
||||
data_streamer_7_1_write => avs_csr_write_int(1),
|
||||
data_streamer_7_1_read => avs_csr_read_int(1),
|
||||
data_streamer_7_1_readdata => avs_csr_readdata_int(1),
|
||||
data_streamer_7_2_write => avs_csr_write_int(2),
|
||||
data_streamer_7_2_read => avs_csr_read_int(2),
|
||||
data_streamer_7_2_readdata => avs_csr_readdata_int(2),
|
||||
data_streamer_7_3_write => avs_csr_write_int(3),
|
||||
data_streamer_7_3_read => avs_csr_read_int(3),
|
||||
data_streamer_7_3_readdata => avs_csr_readdata_int(3),
|
||||
|
||||
data_streamer_7_0_aux_write => avs_csr_write_int(4),
|
||||
data_streamer_7_0_aux_read => avs_csr_read_int(4),
|
||||
data_streamer_7_0_aux_readdata => avs_csr_readdata_int(4),
|
||||
data_streamer_7_1_aux_write => avs_csr_write_int(5),
|
||||
data_streamer_7_1_aux_read => avs_csr_read_int(5),
|
||||
data_streamer_7_1_aux_readdata => avs_csr_readdata_int(5),
|
||||
data_streamer_7_2_aux_write => avs_csr_write_int(6),
|
||||
data_streamer_7_2_aux_read => avs_csr_read_int(6),
|
||||
data_streamer_7_2_aux_readdata => avs_csr_readdata_int(6),
|
||||
data_streamer_7_3_aux_write => avs_csr_write_int(7),
|
||||
data_streamer_7_3_aux_read => avs_csr_read_int(7),
|
||||
data_streamer_7_3_aux_readdata => avs_csr_readdata_int(7),
|
||||
|
||||
avs_address => avs_csr_address(6 downto 4),
|
||||
avs_write => avs_csr_write,
|
||||
avs_read => avs_csr_read,
|
||||
avs_readdata => avs_csr_readdata
|
||||
|
||||
);
|
||||
|
||||
GEN_AUX_LOOP : for j in 0 to NUM_CHANS-1 generate
|
||||
|
||||
GEN_PRINT_STREAMER_LOOP : for i in 0 to NUM_HEADS-1 generate
|
||||
|
||||
GEN_ZERO_GAP : if NO_ZERO_GAP = false or j = 0 generate
|
||||
|
||||
GEN_LOGGER : if STREAMER_LOGGER generate
|
||||
|
||||
streamer_log_inst : entity work.streamer_logger_7
|
||||
generic map (
|
||||
LOGGER_DEPTH => LOGGER_DEPTH
|
||||
)
|
||||
port map (
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
wr_req => diag_cmd_q_write(i+j*MAX_HEADS),
|
||||
wr_data => diag_cmd_q_write_data(i+j*MAX_HEADS),
|
||||
wr_ptr => diag_cmd_q_wr_count(i+j*MAX_HEADS),
|
||||
|
||||
rd_addr => diag_cmd_q_rd_addr(i+j*MAX_HEADS),
|
||||
rd_data_out => diag_cmd_q_read_data(i+j*MAX_HEADS),
|
||||
clr_logger => diag_cmd_q_clr_log(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
end generate;
|
||||
|
||||
data_streamer_csr_regs_inst : entity work.data_streamer_7_csr_regs
|
||||
generic map (
|
||||
ADDR_DECODE_WIDTH => 4
|
||||
)
|
||||
port map (
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
control_clear_cmd => control_clear_cmd(i+j*MAX_HEADS),
|
||||
control_clear_errors => control_clear_errors(i+j*MAX_HEADS),
|
||||
control_msb => control_msb(i+j*MAX_HEADS),
|
||||
control_watermark => control_watermark(i+j*MAX_HEADS),
|
||||
control_en_acp_window => control_en_acp_window(i+j*MAX_HEADS),
|
||||
control_disable => control_disable(i+j*MAX_HEADS),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i+j*MAX_HEADS),
|
||||
cmd_port_pulse => cmd_port_pulse(i+j*MAX_HEADS),
|
||||
cmd_port => cmd_port(i+j*MAX_HEADS),
|
||||
cmd_port_in => (others => '0'),
|
||||
status_queue_space => status_queue_space(i+j*MAX_HEADS)(5 downto 1),
|
||||
|
||||
status_tlb_mismatch_err => '0',
|
||||
status_tlb_empty_err => '0',
|
||||
status_auto_load_err => auto_load_err(i+j*MAX_HEADS),
|
||||
status_bad_cmd_err => bad_cmd_err(i+j*MAX_HEADS),
|
||||
status_cpu_race_err => cpu_race_err(i+j*MAX_HEADS),
|
||||
status_overrun_err => overrun_err(i+j*MAX_HEADS),
|
||||
status_auto_cmd_active => auto_cmd_active(i+j*MAX_HEADS),
|
||||
status_cmd_depth_log2 => std_logic_vector(to_unsigned(CMD_QUEUE_DEPTH_LOG2, 4)),
|
||||
status_handle => handle(i+j*MAX_HEADS),
|
||||
|
||||
diags_remain => debug_out_int(i+j*MAX_HEADS)(11 downto 0),
|
||||
diags_cmd_pending => debug_out_int(i+j*MAX_HEADS)(12),
|
||||
diags_data_active => debug_out_int(i+j*MAX_HEADS)(13),
|
||||
diags_cmd_avail => debug_out_int(i+j*MAX_HEADS)(14),
|
||||
diags_dst_sel => debug_out_int(i+j*MAX_HEADS)(18 downto 15),
|
||||
diags_dst_rdy => debug_out_int(i+j*MAX_HEADS)(19),
|
||||
|
||||
diag_step_mode_en => diag_step_mode(i+j*MAX_HEADS),
|
||||
diag_step_go => diag_step(i+j*MAX_HEADS),
|
||||
|
||||
diags_logger_wr_ptr => diag_cmd_q_wr_count(i+j*MAX_HEADS),
|
||||
diag_logger_rdata => diag_cmd_q_read_data(i+j*MAX_HEADS),
|
||||
diag_step_clr_logger => diag_cmd_q_clr_log(i+j*MAX_HEADS),
|
||||
diag_step_logger_raddr => diag_cmd_q_rd_addr(i+j*MAX_HEADS),
|
||||
|
||||
curr_cmd => diag_1(i+j*MAX_HEADS),
|
||||
curr_param1 => diag_2(i+j*MAX_HEADS),
|
||||
|
||||
dst0_word_count => dst0_word_count(i+j*MAX_HEADS),
|
||||
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_wr_port => fifo_wr_port(i+j*MAX_HEADS),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i+j*MAX_HEADS),
|
||||
fifo_rd_port => fifo_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_status_empty => fifo_status_empty(i+j*MAX_HEADS),
|
||||
fifo_status_full => fifo_status_full(i+j*MAX_HEADS),
|
||||
fifo_status_underrun => fifo_status_underrun(i+j*MAX_HEADS),
|
||||
fifo_status_overrun => fifo_status_overrun(i+j*MAX_HEADS),
|
||||
fifo_status_loop_count => fifo_loop_count(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i+j*MAX_HEADS),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_addr => fifo_rd_addr(i+j*MAX_HEADS),
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i+j*MAX_HEADS),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i+j*MAX_HEADS),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i+j*MAX_HEADS),
|
||||
ip_ver_major_number => ip_ver_major_number(i+j*MAX_HEADS),
|
||||
|
||||
avs_address => avs_csr_address(3 downto 0),
|
||||
avs_write => avs_csr_write_int(i+j*MAX_HEADS),
|
||||
avs_writedata => avs_csr_writedata,
|
||||
avs_read => avs_csr_read_int(i+j*MAX_HEADS),
|
||||
avs_readdata => avs_csr_readdata_int(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
fifo_queue_inst : entity work.streamer_fifo_0
|
||||
port map (
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
fifo_wr_port_pulse => fifo_wr_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_wr_port => fifo_wr_port(i+j*MAX_HEADS),
|
||||
fifo_wr_port_in => fifo_wr_port_in(i+j*MAX_HEADS),
|
||||
fifo_rd_port => fifo_rd_port(i+j*MAX_HEADS),
|
||||
fifo_rd_port_pulse => fifo_rd_port_pulse(i+j*MAX_HEADS),
|
||||
fifo_status_empty => fifo_status_empty(i+j*MAX_HEADS),
|
||||
fifo_status_full => fifo_status_full(i+j*MAX_HEADS),
|
||||
fifo_status_underrun => fifo_status_underrun(i+j*MAX_HEADS),
|
||||
fifo_status_overrun => fifo_status_overrun(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_fifo => fifo_controls_clr_fifo(i+j*MAX_HEADS),
|
||||
fifo_controls_clr_errors => fifo_controls_clr_errors(i+j*MAX_HEADS),
|
||||
fifo_controls_pop_rd_port => fifo_controls_pop_rd_port(i+j*MAX_HEADS),
|
||||
fifo_loop_count => fifo_loop_count(i+j*MAX_HEADS),
|
||||
|
||||
avm_rx_address => avm_rx_address_int(i+j*MAX_HEADS)(31 downto 28),
|
||||
avm_rx_read => avm_rx_read_int(i+j*MAX_HEADS),
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
data_streamer_inst : entity work.data_streamer_7
|
||||
generic map(
|
||||
NUM_EXT_DSTS => 1,
|
||||
CMD_QUEUE_DEPTH => CMD_QUEUE_DEPTH,
|
||||
EXCLUDE_VIRTUAL_MAPPING_LOGIC => SLIM
|
||||
)
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
control_clear_cmd => control_clear_cmd(i+j*MAX_HEADS),
|
||||
control_clear_errors => control_clear_errors(i+j*MAX_HEADS),
|
||||
control_msb => control_msb(i+j*MAX_HEADS),
|
||||
control_watermark => control_watermark(i+j*MAX_HEADS),
|
||||
control_disable => control_disable(i+j*MAX_HEADS),
|
||||
control_clr_dst0_count => control_clr_dst0_count(i+j*MAX_HEADS),
|
||||
|
||||
cmd_port_wr => cmd_port_pulse(i+j*MAX_HEADS),
|
||||
cmd_port => cmd_port(i+j*MAX_HEADS),
|
||||
|
||||
auto_load_err => auto_load_err(i+j*MAX_HEADS),
|
||||
bad_cmd_err => bad_cmd_err(i+j*MAX_HEADS),
|
||||
cpu_race_err => cpu_race_err(i+j*MAX_HEADS),
|
||||
overrun_err => overrun_err(i+j*MAX_HEADS),
|
||||
auto_cmd_active => auto_cmd_active(i+j*MAX_HEADS),
|
||||
status_queue_space => status_queue_space(i+j*MAX_HEADS),
|
||||
handle => handle(i+j*MAX_HEADS),
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_int(i+j*MAX_HEADS),
|
||||
avm_rx_burstcount => avm_rx_burstcount_int(i+j*MAX_HEADS),
|
||||
avm_rx_address => avm_rx_address_int(i+j*MAX_HEADS),
|
||||
avm_rx_read => avm_rx_read_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdata => avm_rx_readdata_int(i+j*MAX_HEADS),
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_int(i+j*MAX_HEADS),
|
||||
|
||||
dest_port_wr => dest_port_wr(i+j*MAX_HEADS downto i+j*MAX_HEADS),
|
||||
dest_port_wr_data => dest_port_wr_data_int(i+j*MAX_HEADS),
|
||||
dest_port_rdy => dest_port_rdy(i+j*MAX_HEADS downto i+j*MAX_HEADS),
|
||||
dest_port_last_word => dest_port_last_word_int(i+j*MAX_HEADS),
|
||||
|
||||
ip_id_ip_number => ip_id_ip_number(i+j*MAX_HEADS),
|
||||
ip_id_mfr_number => ip_id_mfr_number(i+j*MAX_HEADS),
|
||||
ip_ver_minor_number => ip_ver_minor_number(i+j*MAX_HEADS),
|
||||
ip_ver_major_number => ip_ver_major_number(i+j*MAX_HEADS),
|
||||
|
||||
transfer_active => transfer_active(i+j*MAX_HEADS),
|
||||
|
||||
irq => irq_int(i+j*MAX_HEADS),
|
||||
|
||||
ld_q_redirect_addr => fifo_rd_addr(i+j*MAX_HEADS),
|
||||
|
||||
diag_step_mode => diag_step_mode(i+j*MAX_HEADS),
|
||||
diag_step => diag_step(i+j*MAX_HEADS),
|
||||
|
||||
debug_out => debug_out_int(i+j*MAX_HEADS),
|
||||
diag_dst0_count => dst0_word_count(i+j*MAX_HEADS),
|
||||
diag_1 => diag_1(i+j*MAX_HEADS),
|
||||
diag_2 => diag_2(i+j*MAX_HEADS),
|
||||
|
||||
diag_cmd_q_write => diag_cmd_q_write(i+j*MAX_HEADS),
|
||||
diag_cmd_q_write_data => diag_cmd_q_write_data(i+j*MAX_HEADS)
|
||||
|
||||
);
|
||||
|
||||
end generate GEN_ZERO_GAP;
|
||||
|
||||
GEN_NO_ZERO_GAP : if NO_ZERO_GAP= true and j = 1 generate
|
||||
|
||||
transfer_active(i+MAX_HEADS) <= '0';
|
||||
auto_cmd_active(i+MAX_HEADS) <= '0';
|
||||
avm_rx_read_int(i+MAX_HEADS) <= '0';
|
||||
|
||||
end generate GEN_NO_ZERO_GAP;
|
||||
|
||||
end generate GEN_PRINT_STREAMER_LOOP;
|
||||
|
||||
end generate GEN_AUX_LOOP;
|
||||
|
||||
mem_arbiter_inst : entity work.mem_arbiter_7
|
||||
generic map(
|
||||
NUM_PORTS => MAX_HEADS*MAX_CHANS -- arbiter always for the maximim
|
||||
)
|
||||
port map(
|
||||
|
||||
clk => clk,
|
||||
rst_n => rst_n,
|
||||
|
||||
transfer_active => transfer_active,
|
||||
avm_rx_waitrequest_in => avm_rx_waitrequest_int,
|
||||
avm_rx_burstcount_in => avm_rx_burstcount_int,
|
||||
avm_rx_address_in => avm_rx_address_int,
|
||||
avm_rx_read_in => avm_rx_read_int,
|
||||
avm_rx_readdata_in => avm_rx_readdata_int,
|
||||
avm_rx_readdatavalid_in => avm_rx_readdatavalid_int,
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
avm_rx_burstcount => avm_rx_burstcount_arb,
|
||||
avm_rx_address => avm_rx_address_arb,
|
||||
avm_rx_read => avm_rx_read_arb,
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
|
||||
);
|
||||
|
||||
avm_to_axi_master_inst : entity work.avm_to_axi_master_7
|
||||
port map (
|
||||
|
||||
en_acp_window => control_en_acp_window(0),
|
||||
|
||||
axm_awaddr => axm_awaddr,
|
||||
axm_awprot => axm_awprot,
|
||||
axm_awvalid => axm_awvalid,
|
||||
axm_awready => axm_awready,
|
||||
|
||||
axm_wdata => axm_wdata,
|
||||
axm_wlast => axm_wlast,
|
||||
axm_wvalid => axm_wvalid,
|
||||
axm_wready => axm_wready,
|
||||
|
||||
axm_bvalid => axm_bvalid,
|
||||
axm_bready => axm_bready,
|
||||
|
||||
axm_araddr => axm_araddr,
|
||||
axm_arlen => axm_arlen,
|
||||
axm_arsize => axm_arsize,
|
||||
axm_arburst => axm_arburst,
|
||||
axm_arcache => axm_arcache,
|
||||
axm_aruser => axm_aruser,
|
||||
axm_arprot => axm_arprot,
|
||||
axm_arvalid => axm_arvalid,
|
||||
axm_arready => axm_arready,
|
||||
|
||||
axm_rdata => axm_rdata,
|
||||
axm_rvalid => axm_rvalid,
|
||||
axm_rready => axm_rready,
|
||||
|
||||
avm_rx_waitrequest => avm_rx_waitrequest_arb,
|
||||
|
||||
avm_rx_burstcount1 => avm_rx_burstcount,
|
||||
avm_rx_address1 => avm_rx_address,
|
||||
avm_rx_read1 => avm_rx_read,
|
||||
|
||||
avm_rx_burstcount0 => avm_rx_burstcount_arb,
|
||||
avm_rx_address0 => avm_rx_address_arb,
|
||||
avm_rx_read0 => avm_rx_read_arb,
|
||||
|
||||
avm_rx_readdata => avm_rx_readdata_arb,
|
||||
avm_rx_readdatavalid => avm_rx_readdatavalid_arb
|
||||
|
||||
);
|
||||
|
||||
avm_rx_waitrequest <= avm_rx_waitrequest_arb;
|
||||
avm_rx_readdata <= avm_rx_readdata_arb;
|
||||
avm_rx_readdatavalid <= avm_rx_readdatavalid_arb;
|
||||
|
||||
|
||||
end architecture;
|
||||
100
generic_ip/print_streamer/7/src/streamer_log_7.vhd
Normal file
100
generic_ip/print_streamer/7/src/streamer_log_7.vhd
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
-------------------------------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief data streamer logger
|
||||
--!
|
||||
--! @b Clock/resets:
|
||||
--! @li clk : nominally 100MHz
|
||||
--! @li rst_n : active low reset for clk (asynchronous assert)
|
||||
--!
|
||||
--! @b Clock-crossing considerations:
|
||||
--! @li Module is a single clock domain synchronous block
|
||||
--!
|
||||
--! @b Language build standard requirements:
|
||||
--! @li VHDL 2008
|
||||
--!
|
||||
--! @author Simon Southwell
|
||||
--! @copyright (c) 2020 Global Inkjet Systems
|
||||
--! @date 2020-06-10
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
use ieee.std_logic_misc.all;
|
||||
|
||||
use work.common_pkg.all;
|
||||
|
||||
entity streamer_logger_7 is
|
||||
generic (
|
||||
LOGGER_DEPTH : natural range 8 to 1024 := 256;
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
wr_req : in std_logic;
|
||||
wr_data : in std_logic_vector(31 downto 0);
|
||||
wr_ptr : out std_logic_vector(log2(LOGGER_DEPTH)-1 downto 0);
|
||||
|
||||
rd_addr : in std_logic_vector(log2(LOGGER_DEPTH)-1 downto 0);
|
||||
rd_data_out : out std_logic_vector(31 downto 0);
|
||||
|
||||
clr_logger : in std_logic
|
||||
|
||||
);
|
||||
|
||||
end entity streamer_logger_7;
|
||||
|
||||
architecture rtl of streamer_logger_7 is
|
||||
|
||||
signal rd_data : std_logic_vector(31 downto 0);
|
||||
signal wr_count : std_logic_vector(31 downto 0);
|
||||
begin
|
||||
|
||||
wr_ptr <= wr_count(log2(LOGGER_DEPTH)-1 downto 0);
|
||||
|
||||
|
||||
ram_inst : entity work.alt_dp_ram
|
||||
generic map (
|
||||
DEPTH => LOGGER_DEPTH,
|
||||
DATA_WIDTH => 32,
|
||||
REGISTER_OUTPUT => "UNREGISTERED",
|
||||
READ_WRITE_MODE => "DONT_CARE",
|
||||
DEVICE_FAMILY => DEVICE_FAMILY
|
||||
)
|
||||
port map
|
||||
(
|
||||
clk => clk,
|
||||
wrdata => wr_data,
|
||||
rdaddr => rd_addr,
|
||||
wraddr => wr_count(log2(LOGGER_DEPTH)-1 downto 0),
|
||||
wren => wr_req,
|
||||
rddata => rd_data
|
||||
);
|
||||
|
||||
pSYNC_PROC : process(clk, rst_n)
|
||||
begin
|
||||
|
||||
if rst_n = '0' then
|
||||
|
||||
wr_count <= (others => '0');
|
||||
|
||||
elsif clk'event and clk = '1' then
|
||||
|
||||
rd_data_out <= rd_data;
|
||||
|
||||
if wr_req then
|
||||
wr_count <= std_logic_vector(unsigned(wr_count) + 1);
|
||||
end if;
|
||||
|
||||
if clr_logger then
|
||||
wr_count <= (others => '0');
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end rtl;
|
||||
|
|
@ -35,10 +35,11 @@ if {$COMP_ONLY == 0} {
|
|||
|
||||
# compile the UUTs:
|
||||
vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/altera/sync_fifo_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/queue_and_delay_1.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_1.vhd
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ if {$COMP_ONLY == 0} {
|
|||
|
||||
# compile the UUTs:
|
||||
vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/altera/sync_fifo_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/queue_and_delay_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_1.vhd
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
|||
#vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_1.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_1.vhd
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_2.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_2.vhd
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_2.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_2.vhd
|
||||
|
|
|
|||
|
|
@ -38,11 +38,12 @@ if {$COMP_ONLY == 0} {
|
|||
vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vlog -work $WORKLIB $COMMON_PATH/dpram_sclk.v
|
||||
vcom -2008 -work $WORKLIB $FPM_PATH/simple_enc_vel_detect.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/pulse_conditioning_2.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_15.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_2.vhd
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_3.vhd
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
|||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_3.vhd
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@ if {$COMP_ONLY == 0} {
|
|||
vcom -2008 -work work $COMMON_PATH/common_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/sync_fifo.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/queue_and_delay.vhd
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/altera/alt_rw_dp_ram.vhd
|
||||
#vcom -2008 -work $WORKLIB $COMMON_PATH/dpram_sclk.vhd
|
||||
vlog -work $WORKLIB $COMMON_PATH/dpram_sclk.v
|
||||
vcom -2008 -work $WORKLIB $FPM_PATH/simple_enc_vel_detect.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
#vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/altera/generic_seq_ram_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/src/generic_sequencer_16.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_frac_div_3.vhd
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ use ieee.std_logic_1164.all;
|
|||
use ieee.numeric_std.all;
|
||||
|
||||
entity streamer_fifo_0 is
|
||||
|
||||
generic (
|
||||
DEVICE_FAMILY : string := "Cyclone V" -- "Cyclone 10 LP"
|
||||
);
|
||||
port(
|
||||
|
||||
clk : in std_logic;
|
||||
|
|
@ -88,27 +90,34 @@ begin
|
|||
|
||||
ip_id_ip_number <= 8x"02";
|
||||
ip_id_mfr_number <= 8x"FF";
|
||||
ip_ver_minor_number <= 8x"02";
|
||||
ip_ver_minor_number <= 8x"03";
|
||||
ip_ver_major_number <= 8x"00";
|
||||
|
||||
-- ---------------------------------------
|
||||
-- ADDRESS/COUNT QUEUE
|
||||
-- ---------------------------------------
|
||||
|
||||
streamer_queue_inst : entity work.streamer_queue_0
|
||||
streamer_queue_inst : entity work.alt_sync_fifo
|
||||
generic map(
|
||||
QUEUE_DEPTH => 32
|
||||
DATA_WIDTH => 32,
|
||||
DEPTH => 32,
|
||||
REGISTER_OUTPUT => "OFF",
|
||||
NEARLY_FULL => 31,
|
||||
NEARLY_EMPTY => 2,
|
||||
DEVICE_FAMILY => DEVICE_FAMILY,
|
||||
SHOWAHEAD => "ON",
|
||||
CHECKING => "OFF"
|
||||
)
|
||||
port map
|
||||
(
|
||||
clock => clk,
|
||||
clk => clk,
|
||||
sclr => fifo_controls_clr_fifo,
|
||||
|
||||
wrreq => fifo_wr_port_pulse,
|
||||
data => fifo_wr_port,
|
||||
wrdata => fifo_wr_port,
|
||||
|
||||
rdreq => pop_fifo,
|
||||
q => fifo_rd_port,
|
||||
rddata => fifo_rd_port,
|
||||
|
||||
empty => fifo_status_empty,
|
||||
full => fifo_status_full,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue