CORE-73 - FPM-5 modifications completed. Working on the modified testbench

This commit is contained in:
gianmarcogirau 2019-12-18 16:44:36 +00:00
commit 464a8ea1cb
7 changed files with 451 additions and 81 deletions

View file

@ -42,7 +42,7 @@
"major_number" : {
"type" : "c",
"bit_len" : "8",
"reset" : "0x04",
"reset" : "0x05",
"description" : "Major number"
},
@ -55,7 +55,7 @@
},
"Signal selection": {
"address": "2",
"width": "2",
"width": "4",
"description": "Controls signal selection",
"fields": {
"fire_pulse_sel": {
@ -69,6 +69,18 @@
"bit_len": "1",
"reset": "0x0",
"description": "0 => Use POF RX, 1 => Use internal enc/PD emulator"
},
"seb_epd_en": {
"type": "w",
"bit_len": "1",
"reset": "0x0",
"description": "1 => Enable SEB-EPD interface, 0 => Use POF based interface"
},
"seb_epd_linkout_sel": {
"type": "w",
"bit_len": "1",
"reset": "0x0",
"description": "0 => SEB_EPD_LINK_OUT is driven by the POF-Tx output, 0 => SEB_EPD_LINK_OUT is driven by the Drop-Watch output"
}
}
},

View file

@ -15,6 +15,8 @@ set POF_PATH_1 ../../../pof_protocol/1/src
set SEQUENCER_PATH ../../../generic_sequencer/15/src
set PULSE_GEN_PATH ../../../pulse_generator/2/src
set EMUL_PATH ../../../enc_pd_emul/1/src
set EMS_PATH ../../../ems/0/src
set ENC_MULT_PATH ../../../encoder_multiply/0/src
set LOG_PATH ../../../event_logger/0/src
set SRC_PATH ../src
set OSVVM_PATH ../../../common/0/src/test/OSVVM
@ -33,6 +35,7 @@ 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/digital_lpf.vhd
# Generic Sequencer
vcom -2008 -work $WORKLIB $SEQUENCER_PATH/altera/generic_seq_ram_15.vhd
@ -49,6 +52,13 @@ vcom -2008 -work $WORKLIB $PULSE_GEN_PATH/pulse_generator_2.vhd
vcom -2008 -work $WORKLIB $EMUL_PATH/enc_pd_emul_1_pkg.vhd
vcom -2008 -work $WORKLIB $EMUL_PATH/enc_pd_emul_1.vhd
# EMS
vcom -2008 -work $WORKLIB $EMS_PATH/ems_0_pkg.vhd
vcom -2008 -work $WORKLIB $ENC_MULT_PATH/lut_divider_0.vhd
vcom -2008 -work $WORKLIB $ENC_MULT_PATH/encoder_speed_detect_0.vhd
vcom -2008 -work $WORKLIB $ENC_MULT_PATH/encoder_multiply_0.vhd
vcom -2008 -work $WORKLIB $EMS_PATH/ems_0.vhd
# Event Logger
vcom -2008 -work $WORKLIB $LOG_PATH/event_logger_0_pkg.vhd
vcom -2008 -work $WORKLIB $LOG_PATH/event_logger_0.vhd
@ -71,6 +81,7 @@ vcom -2008 -work $WORKLIB $COMMON_PATH/cs_bus_itf.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/smb_diagnostics_5.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/simple_enc_vel_detect_5.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_5_pkg.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_ctrl_5_pkg.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_ctrl_5.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_ext_5.vhd
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_manager_5.vhd

View file

@ -6,7 +6,7 @@
-- Author : Gianmarco Girau
-- Company : Global Inkjet Systems
-- Created : 2017-09-08
-- Last update: 2019-12-16
-- Last update: 2019-12-18
-- SVN ID : Git
-- Standard : VHDL'08
-------------------------------------------------------------------------------
@ -25,13 +25,17 @@ package fire_pulse_5_pkg is
-- Inner block mapping
-----------------------------------------------------------------------------
constant blk_num : integer := 8; -- number of sub-blocks with dedicated
constant blk_size : integer := 2048;
constant blk_num : integer := 10; -- number of sub-blocks with dedicated
-- C&S registers
constant fp_ctrl_id : natural := 0; -- Block ID for the Fire-Pulse-Mang Controller
constant diag_blk_id : natural := 1; -- Block ID for the Diagnostic Block
constant log_blk_id : natural := 2; -- Block ID for the Event Logger
constant int_enc_id : natural := 3; -- Block ID for the Internal Encoder Block
constant pg_ch_id : natural := 4; -- Block ID for Pulse-Generator
constant ems_blk_id : natural := 4; -- Block ID for the EMS block
constant pof_blk_id : natural := 5; -- Block ID for the POF output interface
constant pg_ch_id : natural := 6; -- Block ID for Pulse-Generator
end package fire_pulse_5_pkg;

View file

@ -6,7 +6,7 @@
-- Author : Gianmarco Girau
-- Company : Global Inkjet Systems
-- Created : 2017-09-06
-- Last update: 2019-12-16
-- Last update: 2019-12-18
-- SVN ID : Git
-- Standard : VHDL'08
-------------------------------------------------------------------------------
@ -19,11 +19,14 @@ library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library work;
use work.fire_pulse_ctrl_5_pkg.all;
entity fire_pulse_ctrl_5 is
port(
reset_n : in std_logic;
clk : in std_logic;
src_sel : out std_logic_vector(1 downto 0);
src_sel : out std_logic_vector(3 downto 0);
uart_regen_bypass : out std_logic;
upd_max_pos : out std_logic;
upd_min_pos : out std_logic;
@ -43,6 +46,8 @@ entity fire_pulse_ctrl_5 is
one_pps : out std_logic;
ext_fp_det : out std_logic_vector(15 downto 0);
ext_fp_gen : out std_logic_vector(15 downto 0);
dw_src : out std_logic_vector( 3 downto 0);
dw_pulse_width : out std_logic_vector(15 downto 0);
-- Interrupt Senders
ins_fpm_irq_0 : out std_logic;
-- Avalon MM Interface
@ -60,21 +65,7 @@ architecture rtl of fire_pulse_ctrl_5 is
-- Control & Status Registers Map
-----------------------------------------------------------------------------
constant CSR_IP_ID : std_logic_vector(31 downto 0) := x"0000FF14";
constant CSR_IP_VER : std_logic_vector(31 downto 0) := x"00000400";
constant CSR_IP_ID_REG : std_logic_vector(3 downto 0) := b"0000";
constant CSR_IP_VER_REG : std_logic_vector(3 downto 0) := b"0001";
constant SRC_SEL_REG : std_logic_vector(3 downto 0) := b"0010";
constant POF_RX_CTRL : std_logic_vector(3 downto 0) := b"0011";
constant MON_PT_CTRL_REG : std_logic_vector(3 downto 0) := b"0100";
constant COARSE_TIME_INIT_REG : std_logic_vector(3 downto 0) := b"0101";
constant FINE_TIME_INIT_REG : std_logic_vector(3 downto 0) := b"0110";
constant FINE_TIME_REG : std_logic_vector(3 downto 0) := b"0111";
constant COARSE_TIME_REG : std_logic_vector(3 downto 0) := b"1000";
constant RX_ERROR_STATUS : std_logic_vector(3 downto 0) := b"1001";
constant RX_ERROR_CSR : std_logic_vector(3 downto 0) := b"1010";
constant IRQ_MNG_REG : std_logic_vector(3 downto 0) := b"1011";
constant EXT_FP_CTRL_REG : std_logic_vector(3 downto 0) := b"1100";
constant CSR_IP_VER : std_logic_vector(31 downto 0) := x"00000500";
-----------------------------------------------------------------------------
-- Constants, Signals
@ -88,24 +79,48 @@ architecture rtl of fire_pulse_ctrl_5 is
signal rx_watchdog_en_i, rx_watchdog_clr_i : std_logic;
signal uart_regen_bypass_i : std_logic;
signal upd_min_pos_i, upd_max_pos_i : std_logic;
signal irq, irq_src, irq_src_d : std_logic_vector(0 downto 0);
signal irq_en, irq_mask, irq_val, irq_clr : std_logic_vector(0 downto 0);
signal src_sel_i : std_logic_vector(1 downto 0);
signal mp_sel0, mp_sel1, mp_sel2, mp_sel3 : std_logic_vector(3 downto 0);
signal bit_div : std_logic_vector(3 downto 0);
signal error_rate_thres_i : std_logic_vector(7 downto 0);
signal fpm_init_i, fpm_init_d : std_logic;
signal fpm_init_start, fpm_init_done : std_logic;
signal fpm_init_done_flag, fpm_init_pulse : std_logic;
signal irq, irq_src, irq_src_d : std_logic_vector( 0 downto 0);
signal irq_en, irq_mask, irq_val, irq_clr : std_logic_vector( 0 downto 0);
signal src_sel_i, dw_src_i : std_logic_vector( 3 downto 0);
signal mp_sel0, mp_sel1, mp_sel2, mp_sel3 : std_logic_vector( 3 downto 0);
signal bit_div : std_logic_vector( 3 downto 0);
signal error_rate_thres_i, init_cnt : std_logic_vector( 7 downto 0);
signal ext_fp_det_i, ext_fp_gen_i : std_logic_vector(15 downto 0);
signal dw_pulse_width_i : std_logic_vector(15 downto 0);
signal fine_time_init, fine_time_i : std_logic_vector(27 downto 0);
signal coarse_time_init, coarse_time_i : std_logic_vector(31 downto 0);
signal ext_fp_det_i, ext_fp_gen_i : std_logic_vector(15 downto 0);
begin
pCTRL_REGs : process(reset_n, clk)
begin -- process
if (reset_n = '0') then
fine_time_i <= (others => '0');
coarse_time_i <= (others => '0');
fpm_init_i <= '0';
fpm_init_d <= '0';
fpm_init_done_flag <= '0';
init_cnt <= (others => '0');
fine_time_i <= (others => '0');
coarse_time_i <= (others => '0');
elsif (clk = '1' and clk'event) then
fpm_init_d <= fpm_init_start;
if(fpm_init_start = '1' and fpm_init_d = '0') then
fpm_init_done_flag <= '0';
elsif(fpm_init_done = '1') then
fpm_init_done_flag <= '1';
end if;
if(fpm_init_pulse = '1') then
fpm_init_i <= '1';
elsif(fpm_init_done = '1') then
fpm_init_i <= '0';
end if;
if(fpm_init_pulse = '1') then
init_cnt <= (others => '0');
elsif(fpm_init_i = '1') then
init_cnt <= std_logic_vector(unsigned(init_cnt)+1);
end if;
if (time_ld_en = '1') then
fine_time_i <= fine_time_init;
elsif (fine_time_wrap = '1') then
@ -122,11 +137,17 @@ begin
end if;
end process pCTRL_REGs;
fpm_init_pulse <= fpm_init_start and fpm_init_d;
fpm_init_done <= '1' when unsigned(init_cnt) = 50 else '0';
fine_time_wrap <= '1' when unsigned(fine_time_i) = FINE_TIME_TC else '0';
coarse_time <= coarse_time_i;
fine_time <= fine_time_i;
dw_src <= dw_src_i;
dw_pulse_width <= dw_pulse_width_i;
-- MOnitoring Point selection
mon_points(0) <= mon_point_src(to_integer(unsigned(mp_sel0)));
mon_points(1) <= mon_point_src(to_integer(unsigned(mp_sel1)));
@ -182,7 +203,8 @@ begin
begin
if (reset_n = '0') then
avs_readdatavalid <= '0';
src_sel_i <= "00";
fpm_init_start <= '0';
src_sel_i <= "0000";
enable_rx_i <= '0';
uart_regen_bypass_i <= '0';
upd_max_pos_i <= '0';
@ -204,8 +226,10 @@ begin
-- CTRL registers
if (avs_write = '1') then
case avs_address is
when FPM_INIT_REG =>
fpm_init_start <= avs_writedata(0);
when SRC_SEL_REG =>
src_sel_i <= avs_writedata(1 downto 0);
src_sel_i <= avs_writedata(3 downto 0);
when POF_RX_CTRL =>
enable_rx_i <= avs_writedata(0);
uart_regen_bypass_i <= avs_writedata(1);
@ -233,6 +257,9 @@ begin
when EXT_FP_CTRL_REG =>
ext_fp_det_i <= avs_writedata(15 downto 0);
ext_fp_gen_i <= avs_writedata(31 downto 16);
when DW_CFG_REG =>
dw_src_i <= avs_writedata( 3 downto 0);
dw_pulse_width_i <= avs_writedata(15 downto 0);
when others => null;
end case;
end if;
@ -244,8 +271,10 @@ begin
avs_readdata <= CSR_IP_ID;
when CSR_IP_VER_REG =>
avs_readdata <= CSR_IP_VER;
when FPM_INIT_REG =>
avs_readdata <= (0 => fpm_init_start, 1 => fpm_init_done_flag, others => '0');
when SRC_SEL_REG =>
avs_readdata <= (0 => src_sel_i(0), 1 => src_sel_i(1), others => '0');
avs_readdata <= 28x"0" & src_sel_i;
when POF_RX_CTRL =>
avs_readdata <= X"000000" & bit_div & upd_min_pos_i & upd_max_pos_i & uart_regen_bypass_i & enable_rx_i;
when MON_PT_CTRL_REG =>
@ -266,6 +295,8 @@ begin
avs_readdata <= X"0000" & "000" & irq_val & "000" & irq_mask & "000" & irq_clr & "000" & irq_en;
when EXT_FP_CTRL_REG =>
avs_readdata <= ext_fp_gen_i & ext_fp_det_i;
when DW_CFG_REG =>
avs_readdata <= dw_pulse_width_i & X"000" & dw_src_i;
when others =>
avs_readdata <= X"BAD1BAD0";
end case;

View file

@ -0,0 +1,40 @@
-------------------------------------------------------------------------------
-- Title : fire_pulse_ctrl_5_pkg
-- Project : FPM
-------------------------------------------------------------------------------
-- File : fire_pulse_ctrl_5_pkg.vhd
-- Author : GMG
-- Company : Global Inkjet Systems
-- Created : 2018-05-24
-- Last update: 2019-12-18
-- SVN ID : Git
-- Standard : VHDL'2008
-------------------------------------------------------------------------------
-- Description:
-- Package defining common constants for fire_pulse_ctrl_5
-------------------------------------------------------------------------------
-- altera vhdl_input_version vhdl_2008
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
package fire_pulse_ctrl_5_pkg is
constant CSR_IP_ID_REG : std_logic_vector(3 downto 0) := X"0";
constant CSR_IP_VER_REG : std_logic_vector(3 downto 0) := X"1";
constant FPM_INIT_REG : std_logic_vector(3 downto 0) := X"2";
constant SRC_SEL_REG : std_logic_vector(3 downto 0) := X"3";
constant POF_RX_CTRL : std_logic_vector(3 downto 0) := X"4";
constant MON_PT_CTRL_REG : std_logic_vector(3 downto 0) := X"5";
constant COARSE_TIME_INIT_REG : std_logic_vector(3 downto 0) := X"6";
constant FINE_TIME_INIT_REG : std_logic_vector(3 downto 0) := X"7";
constant FINE_TIME_REG : std_logic_vector(3 downto 0) := X"8";
constant COARSE_TIME_REG : std_logic_vector(3 downto 0) := X"9";
constant RX_ERROR_STATUS : std_logic_vector(3 downto 0) := X"A";
constant RX_ERROR_CSR : std_logic_vector(3 downto 0) := X"B";
constant IRQ_MNG_REG : std_logic_vector(3 downto 0) := X"C";
constant EXT_FP_CTRL_REG : std_logic_vector(3 downto 0) := X"D";
constant DW_CFG_REG : std_logic_vector(3 downto 0) := X"E";
end package fire_pulse_ctrl_5_pkg;

View file

@ -6,7 +6,7 @@
-- Author : Gianmarco Girau
-- Company : Global Inkjet Systems
-- Created : 2017-09-06
-- Last update: 2019-12-17
-- Last update: 2019-12-18
-- SVN ID : Git
-- Standard : VHDL'08
-------------------------------------------------------------------------------
@ -19,11 +19,14 @@ library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library work;
use work.common_pkg.all;
use work.fire_pulse_5_pkg.all;
entity fire_pulse_manager_5 is
generic (
CH_NUM : integer := 4; -- number of Pulse-Generator blocks
SEB_EPD_MODE : boolean := false; -- Support SEB-EPD
CH_NUM : integer := 4; -- number of Pulse-Generator blocks
PD_QUEUE_SIZE : natural := 512;
ADD_SMB_DIAG : boolean := false; -- Instantiate SMB Diagnostic block
ADD_EVENT_LOGGER : boolean := false; -- Instantiate Event-Logger block
@ -33,6 +36,7 @@ entity fire_pulse_manager_5 is
PULSE_DELAY_EQUAL_EN : boolean := false;
TOF_COMP_EN : boolean := false;
PIXEL_PITCH_CORR_EN : boolean := false;
DW_GEN_EN : boolean := false;
OUT_PULSE_CONDITION : boolean := true);
port(
reset_n : in std_logic;
@ -42,6 +46,10 @@ entity fire_pulse_manager_5 is
pof_rx : in std_logic;
pof_tx : out std_logic;
pof_iso_en : out std_logic;
seb_epd_enc_p1 : in std_logic;
seb_epd_enc_p2 : in std_logic;
seb_epd_pd : in std_logic;
seb_epd_link_out : out std_logic;
fire_pulse : out std_logic_vector(ch_num - 1 downto 0);
start_of_image : out std_logic_vector(ch_num - 1 downto 0);
dp_dir_out : out std_logic_vector(ch_num - 1 downto 0);
@ -108,6 +116,16 @@ architecture rtl of fire_pulse_manager_5 is
signal cs_ie_read_valid : std_logic;
signal cs_ie_read_data : std_logic_vector(31 downto 0);
--
signal cs_ems_write_en : std_logic;
signal cs_ems_read_en : std_logic;
signal cs_ems_read_valid : std_logic;
signal cs_ems_read_data : std_logic_vector(31 downto 0);
--
signal cs_pof_write_en : std_logic;
signal cs_pof_read_en : std_logic;
signal cs_pof_read_valid : std_logic;
signal cs_pof_read_data : std_logic_vector(31 downto 0);
--
signal enable_rx : std_logic;
signal uart_regen_bypass : std_logic;
signal max_error_flag : std_logic;
@ -115,10 +133,12 @@ architecture rtl of fire_pulse_manager_5 is
signal rx_watchdog_en : std_logic;
signal rx_watchdog_clr : std_logic;
signal print_start_i : std_logic;
signal error_rate_thres : std_logic_vector(7 downto 0);
signal dw_src : std_logic_vector( 3 downto 0);
signal error_rate_thres : std_logic_vector( 7 downto 0);
signal parity_err_cnt : std_logic_vector(15 downto 0);
signal skip_pos_cnt : std_logic_vector(15 downto 0);
signal mon_point_src : std_logic_vector(15 downto 0);
signal dw_pulse_width : std_logic_vector(15 downto 0);
signal fine_time : std_logic_vector(27 downto 0);
signal coarse_time : std_logic_vector(31 downto 0);
--
@ -129,22 +149,40 @@ architecture rtl of fire_pulse_manager_5 is
signal pd_pulse : std_logic;
signal pd_pulse_ie : std_logic;
signal pd_pulse_pof : std_logic;
signal pd_ems : std_logic;
--
signal inc_pos : std_logic;
signal inc_pos_pof : std_logic;
signal inc_pos_ie : std_logic;
signal inc_pos_ems : std_logic;
signal dec_pos : std_logic;
signal dec_pos_pof : std_logic;
signal dec_pos_ie : std_logic;
signal dec_pos_ems : std_logic;
signal abs_pos : std_logic_vector(31 downto 0);
signal abs_pos_pof : std_logic_vector(31 downto 0);
signal abs_pos_ems : std_logic_vector(31 downto 0);
signal abs_pos_ie : std_logic_vector(39 downto 0);
--
signal pd_pulse_mux : std_logic;
signal enc_p1_mux : std_logic;
signal enc_p2_mux : std_logic;
signal enc_p1_ie : std_logic;
signal enc_p2_ie : std_logic;
--
signal pof_tx_data : std_logic;
signal dw_pulse : std_logic;
signal dw_pulse_i : std_logic;
signal rst_dw_pulse : std_logic;
signal set_dw_pulse : std_logic;
signal dw_pulse_cnt : std_logic_vector(15 downto 0);
--
signal ch_pd, ch_pulse_out : std_logic_vector(CH_NUM - 1 downto 0);
signal ch_raw_pulse, ch_mask : std_logic_vector(CH_NUM - 1 downto 0);
signal ch_start_of_image : std_logic_vector(CH_NUM - 1 downto 0);
signal start_of_image_i : std_logic_vector(CH_NUM - 1 downto 0);
signal fire_pulse_i : std_logic_vector(CH_NUM - 1 downto 0);
signal src_sel : std_logic_vector(1 downto 0);
signal src_sel : std_logic_vector(3 downto 0);
--
type vel_samp_per_vec_t is array (0 to CH_NUM-1) of std_logic_vector(19 downto 0);
signal vel_meas : std_logic_vector(19 downto 0);
@ -154,7 +192,7 @@ architecture rtl of fire_pulse_manager_5 is
signal ext_fp_det : std_logic_vector(15 downto 0);
signal ext_fp_gen : std_logic_vector(15 downto 0);
signal pof_rx_regen : std_logic;
signal log_data_src : std_logic_vector(31 downto 0);
signal log_data_src : std_logic_vector(31 downto 0);
begin
@ -196,6 +234,8 @@ begin
cs_diag_write_en <= cs_write_en(diag_blk_id);
cs_log_write_en <= cs_write_en(log_blk_id);
cs_ie_write_en <= cs_write_en(int_enc_id);
cs_ems_write_en <= cs_write_en(ems_blk_id);
cs_pof_write_en <= cs_write_en(pof_blk_id);
cs_pg_write_en_g : for i in 1 to CH_NUM generate
cs_pg_write_en(i - 1) <= cs_write_en(pg_ch_id + i - 1);
end generate;
@ -204,6 +244,8 @@ begin
cs_diag_read_en <= cs_read_en(diag_blk_id);
cs_log_read_en <= cs_read_en(log_blk_id);
cs_ie_read_en <= cs_read_en(int_enc_id);
cs_ems_read_en <= cs_read_en(ems_blk_id);
cs_pof_read_en <= cs_read_en(pof_blk_id);
cs_pg_read_en_g : for i in 1 to CH_NUM generate
cs_pg_read_en(i - 1) <= cs_read_en(pg_ch_id + i - 1);
end generate;
@ -212,6 +254,8 @@ begin
cs_read_valid(diag_blk_id) <= cs_diag_read_valid;
cs_read_valid(log_blk_id) <= cs_log_read_valid;
cs_read_valid(int_enc_id) <= cs_ie_read_valid;
cs_read_valid(ems_blk_id) <= cs_ems_read_valid;
cs_read_valid(pof_blk_id) <= cs_pof_read_valid;
cs_read_valid_pg_g : for i in 1 to CH_NUM generate
cs_read_valid(pg_ch_id + i - 1) <= cs_pg_read_valid(i - 1);
end generate;
@ -220,6 +264,8 @@ begin
cs_read_data(31 + 32 * diag_blk_id downto 32 * diag_blk_id) <= cs_diag_read_data;
cs_read_data(31 + 32 * log_blk_id downto 32 * log_blk_id) <= cs_log_read_data;
cs_read_data(31 + 32 * int_enc_id downto 32 * int_enc_id) <= cs_ie_read_data;
cs_read_data(31 + 32 * ems_blk_id downto 32 * ems_blk_id) <= cs_ems_read_data;
cs_read_data(31 + 32 * pof_blk_id downto 32 * pof_blk_id) <= cs_pof_read_data;
cs_read_data_pg_g : for i in 1 to CH_NUM generate
cs_read_data(31 + 32 * (pg_ch_id + i - 1) downto 32 * (pg_ch_id + i - 1)) <= cs_pg_read_data(31 + 32 * (i - 1) downto 32 * (i - 1));
end generate;
@ -252,6 +298,8 @@ begin
one_pps => one_pps,
ext_fp_det => ext_fp_det,
ext_fp_gen => ext_fp_gen,
dw_src => dw_src,
dw_pulse_width => dw_pulse_width,
ins_fpm_irq_0 => ins_fpm_irq_0,
avs_address => cs_addr(3 downto 0),
avs_write => cs_ctrl_write_en,
@ -264,16 +312,52 @@ begin
ins_fpm_irq_2 <= '0';
ins_fpm_irq_3 <= '0';
-----------------------------------------------------------------------------
-- I/Os selection
-----------------------------------------------------------------------------
-- Output multiplexer
fire_pulse_i <= ch_pulse_out when src_sel(0) = '1' else (others => pof_rx_regen);
-- The start-of-image for zero-gap is available only when fire-request are
-- generated locally, through the pulse-generator
start_of_image_i <= ch_start_of_image when src_sel(0) = '1' else (others => '0');
pd_pulse <= pd_pulse_pof when src_sel(1) = '0' else pd_pulse_ie;
abs_pos <= abs_pos_pof when src_sel(1) = '0' else abs_pos_ie(31 downto 0);
inc_pos <= inc_pos_pof when src_sel(1) = '0' else inc_pos_ie;
dec_pos <= dec_pos_pof when src_sel(1) = '0' else dec_pos_ie;
pENC_PD_SRC_SEL : process(clk)
begin
if(clk = '1' and clk'event) then
-- Abs-Pos and PD source selection
if(src_sel(2) = '1') then
-- Use SEB-EPD inputs
pd_pulse <= pd_ems;
abs_pos <= abs_pos_ems;
inc_pos <= inc_pos_ems;
dec_pos <= dec_pos_ems;
else
if(src_sel(1) = '0') then
pd_pulse <= pd_pulse_pof;
abs_pos <= abs_pos_pof;
inc_pos <= inc_pos_pof;
dec_pos <= dec_pos_pof;
else
pd_pulse <= pd_pulse_ie;
abs_pos <= abs_pos_ie(31 downto 0);
inc_pos <= inc_pos_ie;
dec_pos <= dec_pos_ie;
end if;
end if;
end if;
end process pENC_PD_SRC_SEL;
gSEB_EPD_LINKOUT : if SEB_EPD_MODE = true generate
seb_epd_link_out <= pof_tx_data when src_sel(3) = '0' else dw_pulse;
else generate
seb_epd_link_out <= '0';
end generate gSEB_EPD_LINKOUT;
pBUF_OUT : process(clk)
begin
@ -377,7 +461,7 @@ begin
end generate;
-----------------------------------------------------------------------------
-- POF Interface
-- POF Rx Interface
-----------------------------------------------------------------------------
gPOF: if POF_PROT_VER = 0 generate
@ -465,6 +549,105 @@ begin
end generate gPOF;
-----------------------------------------------------------------------------
-- EMS
-----------------------------------------------------------------------------
gEMS : if SEB_EPD_MODE = true generate
iEMS : entity work.ems_0
generic map(
GEN_PRINT_START => false)
port map (
clk => clk,
reset_n => reset_n_i,
init => init,
avs_address => cs_addr(3 downto 0),
avs_write => cs_ems_write_en,
avs_writedata => cs_write_data,
avs_read => cs_ems_read_en,
avs_readdatavalid => cs_ems_read_valid,
avs_readdata => cs_ems_read_data,
rs422_pd => pd_pulse_mux,
rs422_p1 => enc_p1_mux,
rs422_p2 => enc_p2_mux,
rs422_zp => '0',
ttl_pd => '0',
ttl_pd_npn => '0',
ttl_p1 => '0',
ttl_p2 => '0',
ttl_zp => '0',
abs_position => abs_pos_ems,
pd_out => pd_ems,
print_start => open,
set_pos => open,
inc_pos => inc_pos_ems,
dec_pos => dec_pos_ems,
filt_p1 => open,
filt_p2 => open,
filt_zp => open,
filt_pd => open);
pd_pulse_mux <= seb_epd_pd when src_sel(1) = '0' else pd_pulse_ie;
enc_p1_mux <= seb_epd_enc_p1 when src_sel(1) = '0' else enc_p1_ie;
enc_p2_mux <= seb_epd_enc_p2 when src_sel(1) = '0' else enc_p2_ie;
else generate
pEMS_RD : process(clk)
begin
if(clk = '1' and clk'event) then
cs_ems_read_valid <= cs_ems_read_en;
end if;
end process pEMS_RD;
cs_ems_read_data <= X"DEAD_BEEF";
abs_pos_ems <= (others => '0');
pd_ems <= '0';
inc_pos_ems <= '0';
dec_pos_ems <= '0';
end generate gEMS;
-----------------------------------------------------------------------------
-- POF-Tx
-----------------------------------------------------------------------------
gPOF_TX : if SEB_EPD_MODE = true generate
-- Default POF-Protocol
iPOF_TX: entity work.pof_tx_0
port map (
reset_n => reset_n_i,
clk => clk,
init => init,
pd_in => pd_ems,
inc_pos => inc_pos_ems,
dec_pos => dec_pos_ems,
abs_position => abs_pos_ems,
tx_data => pof_tx_data,
avs_address => cs_addr(2 downto 0),
avs_write => cs_pof_write_en,
avs_writedata => cs_write_data,
avs_read => cs_pof_read_en,
avs_readdatavalid => cs_pof_read_valid,
avs_readdata => cs_pof_read_data);
else generate
pPOF_TX_RD : process(clk)
begin
if(clk = '1' and clk'event) then
cs_pof_read_valid <= cs_pof_read_en;
end if;
end process pPOF_TX_RD;
cs_pof_read_data <= X"DEAD_BEEF";
pof_tx_data <= '0';
end generate gPOF_TX;
-----------------------------------------------------------------------------
-- Diagnostic block
-----------------------------------------------------------------------------
@ -589,6 +772,33 @@ begin
ext_in => pof_rx,
ext_out => pof_rx_regen);
-----------------------------------------------------------------------------
-- Drop-Watch Pulse generation
-----------------------------------------------------------------------------
dw_pulse <= '0';
pGEN_DW: process(clk)
begin
if(clk = '1' and clk'event) then
if(rst_dw_pulse = '1') then
dw_pulse_i <= '0';
elsif(set_dw_pulse = '1') then
dw_pulse_i <= '1';
end if;
if(rst_dw_pulse = '1') then
dw_pulse_cnt <= (0 => '1', others => '0');
elsif(dw_pulse_i = '1') then
dw_pulse_cnt <= std_logic_vector(unsigned(dw_pulse_cnt) + 1);
end if;
end if;
end process pGEN_DW;
rst_dw_pulse <= '1' when init = '1' or unsigned(dw_pulse_cnt) = unsigned(dw_pulse_width) else '0';
set_dw_pulse <= '1' when fire_pulse_i(to_integer(unsigned(dw_src(log2(CH_NUM)-1 downto 0)))) = '1' else '0';
dw_pulse <= dw_pulse_i;
-----------------------------------------------------------------------------
-- Internal encoder generator
-----------------------------------------------------------------------------
@ -604,8 +814,8 @@ begin
ttl_enc_p2 => open,
ttl_enc_zp => open,
rs422_pd => pd_pulse_ie,
rs422_enc_p1 => open,
rs422_enc_p2 => open,
rs422_enc_p1 => enc_p1_ie,
rs422_enc_p2 => enc_p2_ie,
rs422_enc_zp => open,
abs_pos_out => abs_pos_ie,
set_pos_out => set_pos_ie,

View file

@ -6,7 +6,7 @@
-- Author : Christos Spirotis
-- Company : Global Inkjet Systems
-- Created : 2018-08-10
-- Last update: 2019-12-16
-- Last update: 2019-12-18
-- SVN ID : Git
-- Standard : VHDL'08
-------------------------------------------------------------------------------
@ -23,14 +23,11 @@ use ieee.math_real.all;
use std.textio.all;
library work;
use work.fire_pulse_5_pkg.all;
use work.fire_pulse_ctrl_5_pkg.all;
use work.log_pkg.all;
use work.avalon_verify_pkg.all;
use work.pulse_generator_2_pkg.all;
use work.enc_pd_emul_1_pkg.CSR_ENC_NCO_INC_ADDR;
use work.enc_pd_emul_1_pkg.CSR_ENC_CTRL_ADDR;
use work.enc_pd_emul_1_pkg.CSR_PD_CTRL_ADDR;
use work.enc_pd_emul_1_pkg.CSR_OUT_ENABLE_ADDR;
use work.enc_pd_emul_1_pkg.CSR_PULSE_NUM_ADDR;
use work.enc_pd_emul_1_pkg.all;
library osvvm;
use osvvm.RandomPkg.all;
@ -47,7 +44,6 @@ architecture behav of fire_pulse_manager_5_tb is
constant CLK_PERIOD : time := 10.0 ns;
constant CLK_FREQ : real := 100.0e6;
-- TODO Try different receive oversampling ratios - 300MHz is in the real system
constant RX_CLK_PERIOD : time := CLK_PERIOD / 3; -- clock period for used by the
-- UART-Rx on the POF
@ -86,6 +82,10 @@ architecture behav of fire_pulse_manager_5_tb is
signal tx_data : std_logic;
signal pof_tx_avs_rv : std_logic;
signal pof_tx_avs_we_d : std_logic;
signal seb_epd_enc_p1 : std_logic;
signal seb_epd_enc_p2 : std_logic;
signal seb_epd_pd : std_logic;
signal seb_epd_link_out : std_logic;
--
signal abs_position_d : std_logic_vector(31 downto 0);
signal dir_in : std_logic;
@ -112,6 +112,7 @@ architecture behav of fire_pulse_manager_5_tb is
signal pd_cnt : pd_cnt_t;
type fp_cnt_t is array (0 to CH_NUM - 1) of integer;
signal fp_cnt : fp_cnt_t;
type pg_offset_t is array (0 to CH_NUM - 1) of integer;
-- generate the NCO increment corresponding to a given output frequency
function freq2NCO_inc(
@ -155,6 +156,10 @@ begin -- behav
rx_clk => rx_clk,
pof_rx => pof_rx,
pof_tx => pof_tx,
seb_epd_enc_p1 => seb_epd_enc_p1,
seb_epd_enc_p2 => seb_epd_enc_p2,
seb_epd_pd => seb_epd_pd,
seb_epd_link_out => seb_epd_link_out,
fire_pulse => ch_pulse_out,
mon_pt => open,
ins_fpm_irq_0 => open,
@ -172,7 +177,34 @@ begin -- behav
pof_rx <= transport tx_data after POF_DELAY;
-----------------------------------------------------------------------------
-- POF Tx
-- Encoder/PD emulator (Stimuli Generator)
-----------------------------------------------------------------------------
iEMUL : entity work.enc_pd_emul_1
port map (
clk => clk,
reset_n => reset_n,
ttl_pd => ttl_pd,
ttl_enc_p1 => ttl_p1,
ttl_enc_p2 => ttl_p2,
ttl_enc_zp => ttl_zp,
rs422_pd => rs422_pd,
rs422_enc_p1 => rs422_p1,
rs422_enc_p2 => rs422_p2,
rs422_enc_zp => rs422_zp,
abs_pos_out => emul_pos,
set_pos_out => emul_set_pos,
inc_pos_out => emul_inc_pos,
dec_pos_out => emul_dec_pos,
avs_address => emul_address,
avs_write => emul_write,
avs_writedata => emul_writedata,
avs_read => emul_read,
avs_readdatavalid => emul_readdatavalid,
avs_readdata => emul_readdata);
-----------------------------------------------------------------------------
-- POF Tx (Stimuli Generator)
-----------------------------------------------------------------------------
iPOF_TX : entity work.pof_tx_0
@ -206,6 +238,8 @@ begin -- behav
-- Stimuli Generation
-----------------------------------------------------------------------------
/*
pSTIMULI_REGs : process(clk)
begin
if (clk = '1' and clk'event) then
@ -216,6 +250,10 @@ begin -- behav
inc_pos <= '1' when signed(abs_position) = signed(abs_position_d) + 1 else '0';
dec_pos <= '1' when signed(abs_position) = signed(abs_position_d) - 1 else '0';
seb_epd_pd <= '0';
seb_epd_enc_p1 <= '0';
seb_epd_enc_p2 <= '0';
pSTIMULI : process
variable end_of_stimuli : boolean;
variable rv : RandomPType;
@ -309,6 +347,10 @@ begin -- behav
end process pSTIMULI;
*/
-----------------------------------------------------------------------------
-- Testbench Control
-----------------------------------------------------------------------------
@ -438,15 +480,19 @@ begin -- behav
variable data : std_logic_vector(31 downto 0) := (others => '0');
variable ratio_int : integer;
variable ratio_slv : std_logic_vector(33 downto 0);
variable pg_off : pg_offset_t;
variable pg_ram_off : pg_offset_t;
begin
sel_slave_0 <= '0';
sel_slave_1 <= '0';
configuring <= true;
-- initilialize the Avalon master-bus
-- Initialize avalon mm interfaces
mm_m_init(avs_m, use_waitrequest => true);
mm_m_init(emul_mm_m, use_readvalid => true);
if (reset_n = '0') then
wait until reset_n = '1';
wait for 100 ns;
@ -495,26 +541,32 @@ begin -- behav
-- Write the data to the register
mm_32b_write(addr, data, avs_s, avs_m);
-- precompute the channel memory offsets:
for i in 0 to CH_NUM - 1 loop
pg_off(i) := (work.fire_pulse_5_pkg.pg_ch_id + i)*work.fire_pulse_5_pkg.blk_size;
pg_ram_off(i) := pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.SEQ_RAM_OFFSET));
end loop; -- i
config_pg_l : for i in 0 to CH_NUM - 1 loop
-- Disable/Re-enable first the whole pulse_generator
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(PULSE_GEN_CTRL_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.PULSE_GEN_CTRL_REG)), 32));
data := (others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
data := (0 => '1', 16 => '1', others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
-- Disable/Re-enable the Channel Controller sequencer
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(CH_CTRL_CTRL_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.CH_CTRL_CTRL_REG)), 32));
data := (others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(CH_CTRL_CTRL_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.CH_CTRL_CTRL_REG)), 32));
data := (0 => '1', others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
-- set the sub-pixel offset
data := std_logic_vector(to_unsigned(0, 32));
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SP_OFFSET_INT)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.SP_OFFSET_INT)), 32));
mm_32b_write(addr, data, avs_s, avs_m);
data := std_logic_vector(to_unsigned(0, 32));
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SP_OFFSET_FRAC)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.SP_OFFSET_FRAC)), 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- set the division ratio
ratio_int := integer(2.0 * real(2**24));
@ -522,95 +574,95 @@ begin -- behav
-- Set the integer part of the div-ratio
data(31 downto 10) := (others => '0');
data(9 downto 0) := ratio_slv(33 downto 24);
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(DIV_RATIO_INT)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.DIV_RATIO_INT)), 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- Set the fractional part of the div-ratio
data(31 downto 24) := (others => '0');
data(23 downto 0) := ratio_slv(23 downto 0);
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(DIV_RATIO_FRAC)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.DIV_RATIO_FRAC)), 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- Disable/Enable the fractional divider
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(FRAC_DIV_CTRL_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.FRAC_DIV_CTRL_REG)), 32));
data := (others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
data := (0 => '1', others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
-- Configure the Channel Offset (Both DIR_0 and DIR_1):
-- DIR_0
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(CH_OFFSET_D0_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.CH_OFFSET_D0_REG)), 32));
data := std_logic_vector(to_unsigned(ch_offset(i), 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- DIR_1
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(CH_OFFSET_D1_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.CH_OFFSET_D1_REG)), 32));
data := std_logic_vector(to_unsigned(ch_offset(i), 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- Configure the Channel Delay
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(CH_DELAY_REG)), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.CH_DELAY_REG)), 32));
data := std_logic_vector(to_unsigned(0, 32));
mm_32b_write(addr, data, avs_s, avs_m);
-- Fill Sequencer RAM with simple swathe DIR-0
-- 0x00, 0x30000000 – Reset the vector output value
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET)), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i), 32));
data := X"30000000";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x01, 0x10000001 – Trigger Mask (PD trigger enabled)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 1), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 1, 32));
data := X"10000001";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x02, 0x20000001 – Wait for a single PD event
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 2), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 2, 32));
data := X"20000001";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x03, 0x30006404 – Issue a request for starting the generation of 100 fire pulses (DIR-0)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 3), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 3, 32));
data := X"30006404";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x04, 0x30006400 – De-assert the request bit (start_image_req)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 4), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 4, 32));
data := X"30006400";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x05, 0x80000258 – Wait till POS END
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 5), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 5, 32));
data := X"80000258";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x06, 0xC0000000 – Jump to DIR-1
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 6), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 6, 32));
data := X"C0000010";
mm_32b_write(addr, data, avs_s, avs_m);
-- Fill Sequencer RAM with simple swathe DIR-1
-- 0x10, 0x30000000 – Reset the vector output value
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 16), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 16, 32));
data := X"30000001";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x11, 0x10000001 – Trigger Mask (PD trigger enabled)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 17), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 17, 32));
data := X"10000001";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x12, 0x20000001 – Wait for a single PD event
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 18), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 18, 32));
data := X"20000001";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x13, 0x30006405 – Issue a request for starting the generation of 100 fire pulses (DIR-1)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 19), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 19, 32));
data := X"30006405";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x14, 0x30006401 – De-assert the request bit (start_image_req)
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 20), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 20, 32));
data := X"30006401";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x15, 0x80000000 – Wait till POS START
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 21), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 21, 32));
data := X"80000000";
mm_32b_write(addr, data, avs_s, avs_m);
-- 0x16, 0xC0000000 – Jump to DIR-0
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_RAM_OFFSET) + 22), 32));
addr := std_logic_vector(to_unsigned(pg_ram_off(i) + 22, 32));
data := X"C0000000";
mm_32b_write(addr, data, avs_s, avs_m);
-- Start Sequencer
addr := std_logic_vector(to_unsigned(8192 + (2048 * i) + to_integer(unsigned(SEQ_CSR_OFFSET) + 3), 32));
addr := std_logic_vector(to_unsigned(pg_off(i) + to_integer(unsigned(work.pulse_generator_2_pkg.SEQ_CSR_OFFSET) + 3), 32));
data := (0 => '1', others => '0');
mm_32b_write(addr, data, avs_s, avs_m);
end loop config_pg_l;
@ -715,5 +767,15 @@ begin -- behav
avs_read(0) <= avs_m.mm_read and sel_slave_0;
avs_read(1) <= avs_m.mm_read and sel_slave_1;
-- Emulator Avalon bus maapings
emul_mm_s.mm_readdata <= emul_readdata;
emul_mm_s.mm_readdatavalid <= emul_readdatavalid;
emul_mm_s.mm_waitrequest <= '0';
emul_address <= emul_mm_m.mm_address(emul_address'range);
emul_writedata <= emul_mm_m.mm_writedata;
emul_write <= emul_mm_m.mm_write;
emul_read <= emul_mm_m.mm_read;
end behav;