Merge branch 'master' of hydra:GIS_Embedded_Logic/EL-GENERIC-IP
This commit is contained in:
commit
ae75f17829
18 changed files with 966 additions and 694 deletions
|
|
@ -1 +0,0 @@
|
|||
FPM Major version 5: FPM with Programmable number of channels
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
[
|
||||
{
|
||||
"ip_name": "fpm_diags_7",
|
||||
"ip_name": "epd_diags_7",
|
||||
"bus": "csr",
|
||||
"addr_width": "6",
|
||||
"description": "SMB diagnostics, see https://congis.atlassian.net/wiki/spaces/EL/pages/26778599541/Notes+on+FPM+changes+to+support+auto+generated+registers",
|
||||
"description": "Fire Pulse Manager Encoder / PD diagnostics - used to monitor encoder / PD inputs",
|
||||
"notes": "<p>Diagnostics for the Fire Pulse Manager for use when the SEB-EPD inputs are connected. Details on confluence via https://congis.atlassian.net/wiki/spaces/EL/pages/26778599541/Notes+on+FPM+changes+to+support+auto+generated+registers#epd_diags_7 This is optionally instantiated in FPM_7 based on a generic. (presence will be reported in fpm_ctrl registers.</p> <p>When the ESW wants to read the encoder fifo, the ESW should: a. write '1' to register rd_enc_fifo to prepare the encoder fifo output; b. read the encoder fifo output from register enc_fifo_output.</p> <p>When the ESW wants to read the product detect fifo, the ESW should: a. write '1' to register rd_pd_fifo to prepare the product detect fifo output;b. read the product detect fifo output from register pd_fifo_output.</p>",
|
||||
"registers": {
|
||||
"init": {
|
||||
"address": "0",
|
||||
|
|
@ -6,16 +6,17 @@
|
|||
"addr_hi_bit": "14",
|
||||
"addr_lo_bit": "11",
|
||||
"description": "Fire-Pulse-Manager version 7",
|
||||
"notes": "The Fire Pulse Manager produces fire-request strobe signals to trigger the print_units to load and fire the printhead (or sub-head). It does so based on either received UART messages over Plastic Optic Fibre (POF) if using the SEB-PDW, or from encoder/PD inputs if using the SEB-EPD. Full details on confluence at https://congis.atlassian.net/wiki/spaces/EL/pages/26742062920/Fire+Pulse+Manager#FPM---v7",
|
||||
"sub_blocks": {
|
||||
"fpm_ctrl_7": {
|
||||
"instance": "",
|
||||
"process": "enabled",
|
||||
"offset": "0x0000"
|
||||
},
|
||||
"fpm_diags_7": {
|
||||
"epd_diags_7": {
|
||||
"instance": "",
|
||||
"process": "enabled",
|
||||
"note": "This block is instantiated only when generic ADD_SMB_DIAG is set to true",
|
||||
"note": "This block is instantiated only when generic ADD_EPD_DIAGS is set to true",
|
||||
"offset": "0x0800"
|
||||
},
|
||||
"event_logger_1": {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"bus": "csr",
|
||||
"addr_width": "5",
|
||||
"description": "This block is the fire pulse manager control",
|
||||
"notes": "This is the control registers for the Fire Pulse Manager. https://congis.atlassian.net/wiki/spaces/EL/pages/26742062920/Fire+Pulse+Manager#FPM---v7. The Fire Pulse Manager produces fire-request strobe signals to trigger the print_units to load and fire the printhead (or sub-head). It does so based on either received UART messages over Plastic Optic Fibre (POF) if using the SEB-PDW, or from encoder/PD inputs if using the SEB-EPD. Full details on confluence at https://congis.atlassian.net/wiki/spaces/EL/pages/26742062920/Fire+Pulse+Manager#FPM---v7",
|
||||
"registers": {
|
||||
"ip_id": {
|
||||
"address": "0",
|
||||
|
|
@ -37,7 +38,7 @@
|
|||
"minor_number": {
|
||||
"type": "c",
|
||||
"bit_len": "8",
|
||||
"reset": "0x03",
|
||||
"reset": "0x05",
|
||||
"description": "Minor number"
|
||||
},
|
||||
"major_number": {
|
||||
|
|
@ -70,11 +71,11 @@
|
|||
"reset": "0",
|
||||
"description": "0 => SEB-EPD logic not present, 1 => SEB-EPD logic present"
|
||||
},
|
||||
"smb_diagnostic_present": {
|
||||
"epd_diagnostic_present": {
|
||||
"type": "r",
|
||||
"bit_len": "1",
|
||||
"reset": "0",
|
||||
"description": "0 => SMB diagnostic block not present, 1 => SMB diagnostic block present"
|
||||
"description": "0 => EPD diagnostic block not present, 1 => EPD diagnostic block present. Encoder Product Detect Diagnostics. Previously called smb_diags"
|
||||
},
|
||||
"event_logger_present": {
|
||||
"type": "r",
|
||||
|
|
@ -118,7 +119,7 @@
|
|||
},
|
||||
"signal_selection": {
|
||||
"address": "5",
|
||||
"width": "4",
|
||||
"width": "6",
|
||||
"description": "Controls signal selection",
|
||||
"fields": {
|
||||
"fire_pulse_sel": {
|
||||
|
|
@ -144,6 +145,12 @@
|
|||
"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"
|
||||
},
|
||||
"print_start_override": {
|
||||
"type": "w",
|
||||
"bit_len": "2",
|
||||
"reset": "0x0",
|
||||
"description": "0- => no override. 10 => override to zero (stop print). 11 => override to one (start print). output of FPM and value for pof_tx"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -307,7 +314,7 @@
|
|||
},
|
||||
"pof_rx_control_r": {
|
||||
"address": "14",
|
||||
"width": "2",
|
||||
"width": "3",
|
||||
"description": "POF receiver error status",
|
||||
"fields": {
|
||||
"rx_watchdog": {
|
||||
|
|
@ -321,6 +328,12 @@
|
|||
"bit_len": "1",
|
||||
"reset": "0x0",
|
||||
"description": "0 => Error rate below threshold, 1 => Error rate above threshold"
|
||||
},
|
||||
"print_start_received": {
|
||||
"type": "r",
|
||||
"bit_len": "1",
|
||||
"reset": "0x0",
|
||||
"description": "print_start as received over pof. (for protocol zero, will be fixed at '1')"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -93,9 +93,9 @@ vcom -2008 -work $WORKLIB $POF_PATH_2/pof_tx_2.vhd
|
|||
|
||||
# Fire-Pulse-Manager
|
||||
vcom -2008 -work $WORKLIB $COMMON_PATH/cs_bus_itf_no_wait.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/fpm_diags_7_pkg_auto.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/fpm_diags_7_csr_regs_auto.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/smb_diagnostics_7.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/epd_diags_7_pkg_auto.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/epd_diags_7_csr_regs_auto.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/epd_diagnostics_7.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/simple_enc_vel_detect_7.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/fire_pulse_7_pkg.vhd
|
||||
vcom -2008 -work $WORKLIB $SRC_PATH/fpm_ctrl_7_pkg_auto.vhd
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b
|
|||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\..\..\event_logger\1\doc\event_logger_1.json -o ..\..\..\event_logger\1\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\..\..\pof_protocol\2\doc\pof_tx_2.json -o ..\..\..\pof_protocol\2\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\..\..\generic_sequencer\18\doc\generic_sequencer_18.json -o ..\..\..\generic_sequencer\18\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\fpm_7.json -o ..\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\fpm_ctrl_7.json -o ..\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\fpm_diags_7.json -o ..\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\fpm_7.json -o ..\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\fpm_ctrl_7.json -o ..\src\
|
||||
python.exe ..\..\..\..\..\fw_development_tools\logic_memory_mapper\gen_hdl.py -b csr seq -s "_auto" -j ..\doc\epd_diags_7.json -o ..\src\
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
onerror {resume}
|
||||
quietly WaveActivateNextPane {} 0
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/tb_fpm_init_tx
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iPOF_TX/init
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/tb_fpm_init_done
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_start
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_done
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iPOF_TX/init_blk_cnt
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iDUT/init
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/iDUT/remote_init
|
||||
add wave -noupdate -group TB -expand /fire_pulse_manager_7_tb/ch_offset
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/reset_n
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/clk
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/rx_clk
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/pof_tx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/pof_rx
|
||||
add wave -noupdate -group TB -expand /fire_pulse_manager_7_tb/ch_pulse_out
|
||||
add wave -noupdate -group TB -expand /fire_pulse_manager_7_tb/ch_start_of_img
|
||||
add wave -noupdate -group TB -expand /fire_pulse_manager_7_tb/ch_fire_pulse
|
||||
|
|
@ -14,16 +20,13 @@ add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_address
|
|||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_write
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_writedata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_read
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_waitrequest
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_readdata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/rst_fp_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/ext_pulse
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/ext_pulse_enable
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/init_tx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/inc_pos
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/dec_pos
|
||||
add wave -noupdate -group TB -radix unsigned /fire_pulse_manager_7_tb/abs_position
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/tx_data
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/swathe_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/enc_p1
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/enc_p2
|
||||
|
|
@ -43,8 +46,6 @@ add wave -noupdate -group TB /fire_pulse_manager_7_tb/registers_read
|
|||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/reprogram_offset
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_m
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/avs_s
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/sel_slave_0
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/sel_slave_1
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/pd_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/fp_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_tb/run_dw
|
||||
|
|
@ -73,42 +74,33 @@ add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_address
|
|||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_write
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_writedata
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_read
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_waitrequest
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/avs_readdata
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/reset_n_i
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_addr
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_write_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ctrl_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ctrl_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ctrl_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ctrl_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pg_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pg_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pg_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pg_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_diag_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_diag_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_diag_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_diag_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_log_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_log_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_log_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_log_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ie_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ie_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ie_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ie_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ems_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ems_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ems_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_ems_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pof_write_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pof_read_en
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pof_read_valid
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/cs_pof_read_data
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/enable_rx
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/uart_regen_bypass
|
||||
|
|
@ -185,92 +177,6 @@ add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/led_pof_g
|
|||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/led_pof_y
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/led_pof_r
|
||||
add wave -noupdate -group {FPM top} /fire_pulse_manager_7_tb/iDUT/led_status
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/reset_n
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/clk
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/init
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_clk
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_data
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/init_out
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pd_out
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/inc_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/dec_pos
|
||||
add wave -noupdate -group {POF RX} -radix decimal /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/abs_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/enable
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/error_rate_thres
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/one_pps
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/max_error_flag
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_watchdog
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_watchdog_en
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_watchdog_clr
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/parity_err_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/skip_pos_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/clear
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_ok
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/inc_pos_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/dec_pos_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/sync_gen
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pd_gen
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_error
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_valid
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_valid_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_valid_d
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/toggle_sync
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/sync_confirmed
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/sync_toggle_test
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/sync
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/toggle_pd
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pd_confirmed
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pd_toggle_test
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pd
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/valid_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/upd_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/corr_done
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/corr_sign
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/skip_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/apply_corr
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/inc_pos_ii
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/dec_pos_ii
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_error
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_error_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/print_start_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_symbol_val
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/clear_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/skip_pos_d
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pos_recovery
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/max_error_flag_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/clk_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/dist
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/abs_dist
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/skip_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/next_pos_lsb
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/curr_pos_lsb
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/pos_corr
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/max_dist
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_error_v
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/gray_pos
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_symbol_val_v
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/symbol_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_symbol
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/rx_wd_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/parity_err_cnt_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/skip_pos_cnt_i
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/error_rate_cnt
|
||||
add wave -noupdate -group {POF RX} /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/error_rate
|
||||
add wave -noupdate -group {POF RX} -radix decimal /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/abs_pos_i
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/reset_n
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/clk
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/init
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/data_out
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/data_out_valid
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/rx_error
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/rx_data
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/rx_data_i
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/data
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/bit_cnt_unary
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/sample_cnt_unary
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/receiving
|
||||
add wave -noupdate -group UART_RX /fire_pulse_manager_7_tb/iDUT/gPOF/iPOF_RX/iRX_SYMBOL/init_int
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/reset_n
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/clk
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/init
|
||||
|
|
@ -283,7 +189,6 @@ add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_address
|
|||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_write
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_writedata
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_read
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_readdatavalid
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/avs_readdata
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/rd_event
|
||||
add wave -noupdate -group POF_Tx /fire_pulse_manager_7_tb/iPOF_TX/wr_event
|
||||
|
|
@ -352,7 +257,6 @@ add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_add
|
|||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_write
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_writedata
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_read
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_readdatavalid
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/avs_readdata
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/enable_rx_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fine_time_wrap
|
||||
|
|
@ -360,14 +264,8 @@ add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/time_ld
|
|||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/rx_watchdog_en_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/rx_watchdog_clr_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/uart_regen_bypass_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/upd_min_pos_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/upd_max_pos_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_d
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_start
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_done
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_done_flag
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fpm_init_pulse
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/irq
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/irq_src
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/irq_src_d
|
||||
|
|
@ -381,9 +279,7 @@ add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/mp_sel0
|
|||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/mp_sel1
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/mp_sel2
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/mp_sel3
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/bit_div
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/error_rate_thres_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/init_cnt
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/dw_pulse_width_i
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fine_time_init
|
||||
add wave -noupdate -group {FPM Ctrl} /fire_pulse_manager_7_tb/iDUT/iCTRL/fine_time_i
|
||||
|
|
@ -396,7 +292,6 @@ add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_addres
|
|||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_write
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_writedata
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_read
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_readdatavalid
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/avs_readdata
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/rs422_pd
|
||||
add wave -noupdate -group EMS /fire_pulse_manager_7_tb/iDUT/gEMS/iEMS/rs422_p1
|
||||
|
|
@ -526,7 +421,6 @@ add wave -noupdate -group PG-0 -radix hexadecimal /fire_pulse_manager_7_tb/iDUT/
|
|||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_write
|
||||
add wave -noupdate -group PG-0 -radix hexadecimal /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_writedata
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_read
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_readdatavalid
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_readdata
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/init_de
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/init_qd
|
||||
|
|
@ -644,7 +538,6 @@ add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0
|
|||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/ch_ctrl_address
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/tof_lut_wr_addr
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/tof_lut_addr
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/avs_address_i
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/wh_rotat_cnt
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/gnd_16
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/wh_loop_filt_tot
|
||||
|
|
@ -704,13 +597,89 @@ add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0
|
|||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/pos_error
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/wh_loop_err
|
||||
add wave -noupdate -group PG-0 /fire_pulse_manager_7_tb/iDUT/pulse_generator_g(0)/iCH_PG/div_ratio_corr_ext
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/dut_pof_rx
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/dut_pof_tx
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/pof_tx_to_DUT_tx_data
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/sel_slave_DUT
|
||||
add wave -noupdate /fire_pulse_manager_7_tb/sel_slave_TB_POFTX
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/reset_n
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/clk
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_done
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_in
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pof_protocol_version
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/inc_pos
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/dec_pos
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/abs_position
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_data
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/avs_address
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/avs_write
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/avs_writedata
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/avs_read
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/avs_readdata
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/rd_event
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/wr_event
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/empty
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/full
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_ready
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/rd_event_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/wr_event_i
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/symbol_valid
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/enable
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/toggle_sync
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/toggle_pd
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/add_keepalive
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/ovfl_err
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_gen
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/clear
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_in_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_gen
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/parity_bit
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/inject_error
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/inject_error_req
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_event
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_event_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_event_dd
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_blocked
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/pd_event_ddd
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/delayed_pos
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/clr_fifo_lmax
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_en
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_src
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_sw
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_val
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_val_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_event
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_event_d
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/print_start_gen
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/delayed_pos_v
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_v
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/gray
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/bit_div
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/latched_pos
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/event_in_i
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/event_in
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/event_out
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/symbol
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_blk_cnt
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/keepalive_cnt
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/keepalive_period
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/init_blocked_period
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/fifo_level
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/fifo_level_max
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_data_0
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_data_1
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_ready_0
|
||||
add wave -noupdate -expand -group DUT_POF_TX /fire_pulse_manager_7_tb/iDUT/gPOF_TX/iPOF_TX/tx_ready_1
|
||||
TreeUpdate [SetDefaultTree]
|
||||
WaveRestoreCursors {{Cursor 1} {10405000 ps} 0}
|
||||
quietly wave cursor active 1
|
||||
configure wave -namecolwidth 223
|
||||
WaveRestoreCursors {{Cursor 1} {2132125000 ps} 0} {{Cursor 2} {2134795000 ps} 0}
|
||||
quietly wave cursor active 2
|
||||
configure wave -namecolwidth 433
|
||||
configure wave -valuecolwidth 100
|
||||
configure wave -justifyvalue left
|
||||
configure wave -signalnamewidth 1
|
||||
configure wave -signalnamewidth 0
|
||||
configure wave -snapdistance 10
|
||||
configure wave -datasetprefix 0
|
||||
configure wave -rowmargin 4
|
||||
|
|
@ -721,4 +690,4 @@ configure wave -griddelta 40
|
|||
configure wave -timeline 0
|
||||
configure wave -timelineunits ps
|
||||
update
|
||||
WaveRestoreZoom {0 ps} {778147840 ps}
|
||||
WaveRestoreZoom {2120726423 ps} {2154724926 ps}
|
||||
|
|
|
|||
89
generic_ip/fire_pulse_manager/7/sim/wave_fpm_one.do
Normal file
89
generic_ip/fire_pulse_manager/7/sim/wave_fpm_one.do
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
onerror {resume}
|
||||
quietly WaveActivateNextPane {} 0
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_offset
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_fire_pulse
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_start_of_image
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/reset_n
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/clk
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/rx_clk
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dut_pof_tx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dut_pof_rx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/fire_pulse
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/start_of_image
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_address
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_write
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_writedata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_read
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_readdata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/tb_pof_tx_init_tx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/inc_pos
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dec_pos
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/abs_position
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/pof_tx_to_DUT_tx_data
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/enc_p1
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/enc_p2
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/pd
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/seb_epd_enc_p1
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/seb_epd_enc_p2
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/seb_epd_pd
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_address
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_write
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_writedata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_read
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_readdata
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_pos
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/enc_dir
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/swathe_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/half_swathe_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/swathe_pos
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/end_of_swathe
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/test_completed
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/running
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/configuring
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/passed
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/failed
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/stimuli_completed
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/registers_read
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/reprogram_offset
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_m
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/avs_s
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/sel_slave_DUT
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/sel_slave_TB_POFTX
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_s
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/emul_m
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/pd_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/fp_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/loc_fp_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/rst_fp_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_pulse_out
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_pulse_out_d
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ch_start_of_img
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/run_dw
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dw
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dw_d
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/dw_cnt
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/input_mode
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ext_pulse
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/ext_pulse_enable
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/fpm_abs_pos_out
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/fpm_print_start_rx
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/tb_pof_tx_print_start
|
||||
add wave -noupdate -group TB /fire_pulse_manager_7_one_tb/tb_pof_tx_init_done
|
||||
TreeUpdate [SetDefaultTree]
|
||||
WaveRestoreCursors {{Cursor 1} {2132125000 ps} 0} {{Cursor 2} {2134795000 ps} 0}
|
||||
quietly wave cursor active 2
|
||||
configure wave -namecolwidth 433
|
||||
configure wave -valuecolwidth 100
|
||||
configure wave -justifyvalue left
|
||||
configure wave -signalnamewidth 0
|
||||
configure wave -snapdistance 10
|
||||
configure wave -datasetprefix 0
|
||||
configure wave -rowmargin 4
|
||||
configure wave -childrowmargin 2
|
||||
configure wave -gridoffset 0
|
||||
configure wave -gridperiod 1
|
||||
configure wave -griddelta 40
|
||||
configure wave -timeline 0
|
||||
configure wave -timelineunits ps
|
||||
update
|
||||
WaveRestoreZoom {1088091423 ps} {1122089926 ps}
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
-------------------------------------------------------------------------------
|
||||
-- Title : smb diagnostic block
|
||||
-- Project : SMB
|
||||
-- Title : epd diagnostic block
|
||||
-- Project : Fire Pulse Manager
|
||||
-------------------------------------------------------------------------------
|
||||
-- File : smb_diagnostics_7.vhd
|
||||
-- File : epd_diagnostics_7.vhd
|
||||
-- Author : Gianmarco Girau
|
||||
-- Company : Global Inkjet Systems
|
||||
-- Created : 2016-08-02
|
||||
-- Last update: 2021-01-12
|
||||
-- Last update: 2022-05-17
|
||||
-- SVN ID : Git
|
||||
-- Standard : VHDL'2008
|
||||
-------------------------------------------------------------------------------
|
||||
-- Description: This block includes all the SMB diagnostic functionalities
|
||||
-- except the event logger.
|
||||
-- Description: This block includes all the EPD (encoder/Product Detect) diagnostic
|
||||
-- functionalities except the event logger.
|
||||
-------------------------------------------------------------------------------
|
||||
-- altera vhdl_input_version vhdl_2008
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ library ieee;
|
|||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
entity smb_diagnostics_7 is
|
||||
port (
|
||||
entity epd_diagnostics_7 is
|
||||
port(
|
||||
clk : in std_logic;
|
||||
reset_n : in std_logic := '1';
|
||||
-- External sync reset (via daisy-chain)
|
||||
|
|
@ -55,19 +55,19 @@ entity smb_diagnostics_7 is
|
|||
ins_diag_irq_1 : out std_logic;
|
||||
ins_diag_irq_2 : out std_logic;
|
||||
-- Avalon MM Interface
|
||||
avs_address : in std_logic_vector( 5 downto 0);
|
||||
avs_address : in std_logic_vector(5 downto 0);
|
||||
avs_write : in std_logic;
|
||||
avs_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_read : in std_logic;
|
||||
avs_readdatavalid : out std_logic;
|
||||
avs_readdata : out std_logic_vector(31 downto 0));
|
||||
end entity smb_diagnostics_7;
|
||||
end entity epd_diagnostics_7;
|
||||
|
||||
architecture rtl of smb_diagnostics_7 is
|
||||
architecture rtl of epd_diagnostics_7 is
|
||||
|
||||
-- signals
|
||||
type fsm_status_t is (idle, wait_ph1_ris, wait_ph0_ris);
|
||||
signal fsm_status_curr,fsm_status_next : fsm_status_t;
|
||||
signal fsm_status_curr, fsm_status_next : fsm_status_t;
|
||||
--
|
||||
signal filt_phase0_d, filt_phase1_d, filt_zero_ph_d, filt_prod_det_d : std_logic;
|
||||
signal enc_out_d, pd_out_d, filt_phase0_p, filt_phase1_p, init_i : std_logic;
|
||||
|
|
@ -85,35 +85,35 @@ architecture rtl of smb_diagnostics_7 is
|
|||
signal fire_req_d, fire_req_p : std_logic;
|
||||
signal rd_enc_fifo_pulse, rd_pd_fifo_pulse : std_logic;
|
||||
--
|
||||
signal enable_diff_measur_cnt : std_logic_vector( 1 downto 0);
|
||||
signal irq_en, irq_clr, irq_src, irq_src_d : std_logic_vector( 2 downto 0);
|
||||
signal irq, irq_val, irq_mask, pd_data_sel : std_logic_vector( 2 downto 0);
|
||||
signal meas_enc_pulse : std_logic_vector( 3 downto 0);
|
||||
signal pd_fifo_usedw, pd_fifo_thres : std_logic_vector( 7 downto 0);
|
||||
signal fifo_thres, fifo_usedw : std_logic_vector( 9 downto 0);
|
||||
signal dir_cnt, dir_change_cnt : std_logic_vector(15 downto 0);
|
||||
signal pos_dir_thres, neg_dir_thres : std_logic_vector(15 downto 0);
|
||||
signal meas_pulse_cnt, meas_step : std_logic_vector(15 downto 0);
|
||||
signal input_status : std_logic_vector(16 downto 0);
|
||||
signal sampling_period, sampling_time_cnt : std_logic_vector(27 downto 0);
|
||||
signal fine_time_l : std_logic_vector(27 downto 0);
|
||||
signal filt_phase0_cnt, filt_phase1_cnt : std_logic_vector(31 downto 0);
|
||||
signal filt_zero_ph_cnt, filt_prod_det_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_out_cnt, pd_out_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time, enc_delta_time_prev : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time_min, enc_delta_time_max : std_logic_vector(31 downto 0);
|
||||
signal fifo_d, fifo_q, pos_cnt : std_logic_vector(31 downto 0);
|
||||
signal pd_fifo_d, pd_fifo_q : std_logic_vector(31 downto 0);
|
||||
signal pd_pos, coarse_time_l, pd_wd_thres : std_logic_vector(31 downto 0);
|
||||
signal pd_delta_pos, pd_delta_pos_abs : std_logic_vector(31 downto 0);
|
||||
signal fire_req_cnt : std_logic_vector(31 downto 0);
|
||||
|
||||
signal enable_diff_measur_cnt : std_logic_vector(1 downto 0);
|
||||
signal irq_en, irq_clr, irq_src, irq_src_d : std_logic_vector(2 downto 0);
|
||||
signal irq, irq_val, irq_mask, pd_data_sel : std_logic_vector(2 downto 0);
|
||||
signal meas_enc_pulse : std_logic_vector(3 downto 0);
|
||||
signal pd_fifo_usedw, pd_fifo_thres : std_logic_vector(7 downto 0);
|
||||
signal fifo_thres, fifo_usedw : std_logic_vector(9 downto 0);
|
||||
signal dir_cnt, dir_change_cnt : std_logic_vector(15 downto 0);
|
||||
signal pos_dir_thres, neg_dir_thres : std_logic_vector(15 downto 0);
|
||||
signal meas_pulse_cnt, meas_step : std_logic_vector(15 downto 0);
|
||||
signal input_status : std_logic_vector(16 downto 0);
|
||||
signal sampling_period, sampling_time_cnt : std_logic_vector(27 downto 0);
|
||||
signal fine_time_l : std_logic_vector(27 downto 0);
|
||||
signal filt_phase0_cnt, filt_phase1_cnt : std_logic_vector(31 downto 0);
|
||||
signal filt_zero_ph_cnt, filt_prod_det_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_out_cnt, pd_out_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time, enc_delta_time_prev : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time_cnt : std_logic_vector(31 downto 0);
|
||||
signal enc_delta_time_min, enc_delta_time_max : std_logic_vector(31 downto 0);
|
||||
signal fifo_d, fifo_q, pos_cnt : std_logic_vector(31 downto 0);
|
||||
signal pd_fifo_d, pd_fifo_q : std_logic_vector(31 downto 0);
|
||||
signal pd_pos, coarse_time_l, pd_wd_thres : std_logic_vector(31 downto 0);
|
||||
signal pd_delta_pos, pd_delta_pos_abs : std_logic_vector(31 downto 0);
|
||||
signal fire_req_cnt : std_logic_vector(31 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
pInit : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if (clk = '1' and clk'event) then
|
||||
init <= init_i or ext_diag_rst;
|
||||
end if;
|
||||
end process pInit;
|
||||
|
|
@ -124,17 +124,17 @@ begin
|
|||
|
||||
pInputStatus : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
input_status( 0) <= rs422_phase0;
|
||||
input_status( 1) <= rs422_phase1;
|
||||
input_status( 2) <= rs422_zero_ph;
|
||||
input_status( 3) <= rs422_prod_det;
|
||||
input_status( 4) <= ttl_phase0;
|
||||
input_status( 5) <= ttl_phase1;
|
||||
input_status( 6) <= ttl_zero_ph;
|
||||
input_status( 7) <= ttl_prod_det;
|
||||
input_status( 8) <= ttl_prod_det_npn;
|
||||
input_status( 9) <= filt_phase0;
|
||||
if (clk = '1' and clk'event) then
|
||||
input_status(0) <= rs422_phase0;
|
||||
input_status(1) <= rs422_phase1;
|
||||
input_status(2) <= rs422_zero_ph;
|
||||
input_status(3) <= rs422_prod_det;
|
||||
input_status(4) <= ttl_phase0;
|
||||
input_status(5) <= ttl_phase1;
|
||||
input_status(6) <= ttl_zero_ph;
|
||||
input_status(7) <= ttl_prod_det;
|
||||
input_status(8) <= ttl_prod_det_npn;
|
||||
input_status(9) <= filt_phase0;
|
||||
input_status(10) <= filt_phase1;
|
||||
input_status(11) <= filt_zero_ph;
|
||||
input_status(12) <= filt_prod_det;
|
||||
|
|
@ -151,7 +151,7 @@ begin
|
|||
|
||||
pEdgeDetect_Cnt : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if (clk = '1' and clk'event) then
|
||||
filt_phase0_d <= filt_phase0;
|
||||
filt_phase1_d <= filt_phase1;
|
||||
filt_zero_ph_d <= filt_zero_ph;
|
||||
|
|
@ -159,51 +159,51 @@ begin
|
|||
enc_out_d <= enc_out;
|
||||
pd_out_d <= pd_out;
|
||||
fire_req_d <= fire_req;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
filt_phase0_cnt <= (others => '0');
|
||||
elsif(filt_phase0_p = '1') then
|
||||
filt_phase0_cnt <= std_logic_vector(unsigned(filt_phase0_cnt)+1);
|
||||
elsif (filt_phase0_p = '1') then
|
||||
filt_phase0_cnt <= std_logic_vector(unsigned(filt_phase0_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
filt_phase1_cnt <= (others => '0');
|
||||
elsif(filt_phase1_p = '1') then
|
||||
filt_phase1_cnt <= std_logic_vector(unsigned(filt_phase1_cnt)+1);
|
||||
elsif (filt_phase1_p = '1') then
|
||||
filt_phase1_cnt <= std_logic_vector(unsigned(filt_phase1_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
filt_zero_ph_cnt <= (others => '0');
|
||||
elsif(filt_zero_ph_p = '1') then
|
||||
filt_zero_ph_cnt <= std_logic_vector(unsigned(filt_zero_ph_cnt)+1);
|
||||
elsif (filt_zero_ph_p = '1') then
|
||||
filt_zero_ph_cnt <= std_logic_vector(unsigned(filt_zero_ph_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
filt_prod_det_cnt <= (others => '0');
|
||||
elsif(filt_prod_det_p = '1') then
|
||||
filt_prod_det_cnt <= std_logic_vector(unsigned(filt_prod_det_cnt)+1);
|
||||
elsif (filt_prod_det_p = '1') then
|
||||
filt_prod_det_cnt <= std_logic_vector(unsigned(filt_prod_det_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
enc_out_cnt <= (others => '0');
|
||||
elsif(enc_out_p = '1') then
|
||||
enc_out_cnt <= std_logic_vector(unsigned(enc_out_cnt)+1);
|
||||
elsif (enc_out_p = '1') then
|
||||
enc_out_cnt <= std_logic_vector(unsigned(enc_out_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
pd_out_cnt <= (others => '0');
|
||||
elsif(pd_out_p = '1') then
|
||||
pd_out_cnt <= std_logic_vector(unsigned(pd_out_cnt)+1);
|
||||
elsif (pd_out_p = '1') then
|
||||
pd_out_cnt <= std_logic_vector(unsigned(pd_out_cnt) + 1);
|
||||
end if;
|
||||
if(rst_counters = '1') then
|
||||
if (rst_counters = '1') then
|
||||
fire_req_cnt <= (others => '0');
|
||||
elsif(fire_req_p = '1') then
|
||||
fire_req_cnt <= std_logic_vector(unsigned(fire_req_cnt)+1);
|
||||
elsif (fire_req_p = '1') then
|
||||
fire_req_cnt <= std_logic_vector(unsigned(fire_req_cnt) + 1);
|
||||
end if;
|
||||
end if;
|
||||
end process pEdgeDetect_Cnt;
|
||||
|
||||
filt_phase0_p <= filt_phase0 and not filt_phase0_d;
|
||||
filt_phase1_p <= filt_phase1 and not filt_phase1_d;
|
||||
filt_zero_ph_p <= filt_zero_ph and not filt_zero_ph_d;
|
||||
|
||||
filt_phase0_p <= filt_phase0 and not filt_phase0_d;
|
||||
filt_phase1_p <= filt_phase1 and not filt_phase1_d;
|
||||
filt_zero_ph_p <= filt_zero_ph and not filt_zero_ph_d;
|
||||
filt_prod_det_p <= filt_prod_det and not filt_prod_det_d;
|
||||
enc_out_p <= enc_out and not enc_out_d;
|
||||
pd_out_p <= pd_out and not pd_out_d;
|
||||
fire_req_p <= fire_req and not fire_req_d;
|
||||
enc_out_p <= enc_out and not enc_out_d;
|
||||
pd_out_p <= pd_out and not pd_out_d;
|
||||
fire_req_p <= fire_req and not fire_req_d;
|
||||
|
||||
rst_counters <= rst_counters_i or init;
|
||||
|
||||
|
|
@ -213,54 +213,54 @@ begin
|
|||
|
||||
pMeasure : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(rst_measur = '1' or meas_enc_p = '1') then
|
||||
if (clk = '1' and clk'event) then
|
||||
if (rst_measur = '1' or meas_enc_p = '1') then
|
||||
meas_pulse_cnt <= (others => '0');
|
||||
elsif(enc_out_d = '1') then
|
||||
meas_pulse_cnt <= std_logic_vector(unsigned(meas_pulse_cnt)+1);
|
||||
elsif (enc_out_d = '1') then
|
||||
meas_pulse_cnt <= std_logic_vector(unsigned(meas_pulse_cnt) + 1);
|
||||
end if;
|
||||
if(rst_measur = '1') then
|
||||
if (rst_measur = '1') then
|
||||
meas_enc_pulse <= (others => '0');
|
||||
else
|
||||
meas_enc_pulse <= meas_enc_pulse(meas_enc_pulse'high-1 downto 0) & meas_enc_p;
|
||||
meas_enc_pulse <= meas_enc_pulse(meas_enc_pulse'high - 1 downto 0) & meas_enc_p;
|
||||
end if;
|
||||
if(rst_measur = '1' or meas_enc_pulse(0) = '1') then
|
||||
if (rst_measur = '1' or meas_enc_pulse(0) = '1') then
|
||||
enc_delta_time_cnt <= (others => '0');
|
||||
else
|
||||
enc_delta_time_cnt <= std_logic_vector(unsigned(enc_delta_time_cnt)+1);
|
||||
enc_delta_time_cnt <= std_logic_vector(unsigned(enc_delta_time_cnt) + 1);
|
||||
end if;
|
||||
if(rst_measur = '1') then
|
||||
if (rst_measur = '1') then
|
||||
enc_delta_time <= (others => '0');
|
||||
enc_delta_time_prev <= (others => '0');
|
||||
elsif(meas_enc_pulse(0) = '1') then
|
||||
elsif (meas_enc_pulse(0) = '1') then
|
||||
enc_delta_time <= enc_delta_time_cnt;
|
||||
enc_delta_time_prev <= enc_delta_time;
|
||||
end if;
|
||||
if(rst_measur = '1' or rst_counters = '1') then
|
||||
if (rst_measur = '1' or rst_counters = '1') then
|
||||
enable_diff_measur_cnt <= (others => '0');
|
||||
elsif(meas_enc_p = '1') then
|
||||
enable_diff_measur_cnt <= std_logic_vector(unsigned(enable_diff_measur_cnt)+1);
|
||||
elsif (meas_enc_p = '1') then
|
||||
enable_diff_measur_cnt <= std_logic_vector(unsigned(enable_diff_measur_cnt) + 1);
|
||||
end if;
|
||||
if(rst_measur = '1' or rst_counters = '1') then
|
||||
enable_diff_measur <= '0';
|
||||
elsif(enable_diff_measur_cnt = "11") then
|
||||
if (rst_measur = '1' or rst_counters = '1') then
|
||||
enable_diff_measur <= '0';
|
||||
elsif (enable_diff_measur_cnt = "11") then
|
||||
enable_diff_measur <= '1';
|
||||
end if;
|
||||
if(enable_diff_measur = '0') then
|
||||
if (enable_diff_measur = '0') then
|
||||
enc_delta_time_min <= (others => '1');
|
||||
elsif(meas_enc_pulse(2) = '1' and unsigned(enc_delta_time) < unsigned(enc_delta_time_min)) then
|
||||
elsif (meas_enc_pulse(2) = '1' and unsigned(enc_delta_time) < unsigned(enc_delta_time_min)) then
|
||||
enc_delta_time_min <= enc_delta_time;
|
||||
end if;
|
||||
if(enable_diff_measur = '0') then
|
||||
if (enable_diff_measur = '0') then
|
||||
enc_delta_time_max <= (others => '0');
|
||||
elsif(meas_enc_pulse(2) = '1' and unsigned(enc_delta_time) > unsigned(enc_delta_time_max)) then
|
||||
elsif (meas_enc_pulse(2) = '1' and unsigned(enc_delta_time) > unsigned(enc_delta_time_max)) then
|
||||
enc_delta_time_max <= enc_delta_time;
|
||||
end if;
|
||||
end if;
|
||||
end process pMeasure;
|
||||
|
||||
meas_enc_p <= '1' when enc_out_p = '1' and unsigned(meas_pulse_cnt) = unsigned(meas_step) else '0';
|
||||
|
||||
|
||||
rst_measur <= rst_measur_i or init;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
|
@ -273,7 +273,7 @@ begin
|
|||
-- Backward direction => Phase-0 is delayed w.r.t. Phase-1
|
||||
|
||||
ph0_rising <= filt_phase0_p;
|
||||
ph0_falling <= not filt_phase0 and filt_phase0_d;
|
||||
ph0_falling <= not filt_phase0 and filt_phase0_d;
|
||||
ph1_rising <= filt_phase1_p;
|
||||
ph1_falling <= not filt_phase1 and filt_phase1_d;
|
||||
|
||||
|
|
@ -283,8 +283,8 @@ begin
|
|||
-- FSM Status Register
|
||||
pFSM_SR : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(rst_dir = '1') then
|
||||
if (clk = '1' and clk'event) then
|
||||
if (rst_dir = '1') then
|
||||
fsm_status_curr <= idle;
|
||||
else
|
||||
fsm_status_curr <= fsm_status_next;
|
||||
|
|
@ -299,56 +299,56 @@ begin
|
|||
set_dir_forward <= '0';
|
||||
set_dir_backward <= '0';
|
||||
--
|
||||
fsm_status_next <= fsm_status_curr;
|
||||
fsm_status_next <= fsm_status_curr;
|
||||
|
||||
case fsm_status_curr is
|
||||
when idle =>
|
||||
if(ph0_rising = '1') then
|
||||
if (ph0_rising = '1') then
|
||||
fsm_status_next <= wait_ph1_ris;
|
||||
elsif(ph1_rising = '1') then
|
||||
elsif (ph1_rising = '1') then
|
||||
fsm_status_next <= wait_ph0_ris;
|
||||
end if;
|
||||
|
||||
when wait_ph1_ris =>
|
||||
if(ph1_rising = '1') then
|
||||
set_dir_forward <= '1';
|
||||
fsm_status_next <= idle;
|
||||
elsif(ph0_falling = '1') then
|
||||
fsm_status_next <= idle;
|
||||
if (ph1_rising = '1') then
|
||||
set_dir_forward <= '1';
|
||||
fsm_status_next <= idle;
|
||||
elsif (ph0_falling = '1') then
|
||||
fsm_status_next <= idle;
|
||||
end if;
|
||||
|
||||
when wait_ph0_ris =>
|
||||
if(ph0_rising = '1') then
|
||||
if (ph0_rising = '1') then
|
||||
set_dir_backward <= '1';
|
||||
fsm_status_next <= idle;
|
||||
elsif(ph1_falling = '1') then
|
||||
fsm_status_next <= idle;
|
||||
elsif (ph1_falling = '1') then
|
||||
fsm_status_next <= idle;
|
||||
end if;
|
||||
|
||||
|
||||
when others => null;
|
||||
end case;
|
||||
end process pFSM_CL;
|
||||
|
||||
pDirRegs : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(rst_dir = '1') then
|
||||
if (clk = '1' and clk'event) then
|
||||
if (rst_dir = '1') then
|
||||
dir_cnt <= (others => '0');
|
||||
elsif(set_dir_forward = '1' and dir_pos_sat = '0') then
|
||||
dir_cnt <= std_logic_vector(signed(dir_cnt)+1);
|
||||
elsif(set_dir_backward = '1' and dir_neg_sat = '0') then
|
||||
dir_cnt <= std_logic_vector(signed(dir_cnt)-1);
|
||||
elsif (set_dir_forward = '1' and dir_pos_sat = '0') then
|
||||
dir_cnt <= std_logic_vector(signed(dir_cnt) + 1);
|
||||
elsif (set_dir_backward = '1' and dir_neg_sat = '0') then
|
||||
dir_cnt <= std_logic_vector(signed(dir_cnt) - 1);
|
||||
end if;
|
||||
direction_d <= direction;
|
||||
if(rst_dir = '1') then
|
||||
if (rst_dir = '1') then
|
||||
dir_change_cnt <= (others => '0');
|
||||
elsif(direction_change = '1') then
|
||||
dir_change_cnt <= std_logic_vector(unsigned(dir_change_cnt)+1);
|
||||
elsif (direction_change = '1') then
|
||||
dir_change_cnt <= std_logic_vector(unsigned(dir_change_cnt) + 1);
|
||||
end if;
|
||||
end if;
|
||||
end process pDirRegs;
|
||||
|
||||
direction <= dir_cnt(dir_cnt'high);
|
||||
direction <= dir_cnt(dir_cnt'high);
|
||||
direction_change <= direction xor direction_d;
|
||||
|
||||
-- Positive/Negative saturation for the direction counter
|
||||
|
|
@ -358,13 +358,13 @@ begin
|
|||
-- Position Tracking
|
||||
pPOS_TRACK : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(rst_pos = '1') then
|
||||
if (clk = '1' and clk'event) then
|
||||
if (rst_pos = '1') then
|
||||
pos_cnt <= (others => '0');
|
||||
elsif(pos_step = '1') then
|
||||
pos_cnt <= std_logic_vector(signed(pos_cnt)+1);
|
||||
elsif(neg_step = '1') then
|
||||
pos_cnt <= std_logic_vector(signed(pos_cnt)-1);
|
||||
elsif (pos_step = '1') then
|
||||
pos_cnt <= std_logic_vector(signed(pos_cnt) + 1);
|
||||
elsif (neg_step = '1') then
|
||||
pos_cnt <= std_logic_vector(signed(pos_cnt) - 1);
|
||||
end if;
|
||||
abs_position <= pos_cnt;
|
||||
end if;
|
||||
|
|
@ -378,22 +378,22 @@ begin
|
|||
|
||||
pPD_log : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(init = '1') then
|
||||
if (clk = '1' and clk'event) then
|
||||
if (init = '1') then
|
||||
pd_fifo_error <= '0';
|
||||
elsif(pd_fifo_wr_en = '1' and pd_fifo_full = '1') then
|
||||
elsif (pd_fifo_wr_en = '1' and pd_fifo_full = '1') then
|
||||
pd_fifo_error <= '1';
|
||||
end if;
|
||||
if(init = '0' and pd_p = '1') then
|
||||
if (init = '0' and pd_p = '1') then
|
||||
pd_data_sel <= "001";
|
||||
else
|
||||
pd_data_sel <= pd_data_sel(1 downto 0) & '0';
|
||||
end if;
|
||||
if(init = '1') then
|
||||
if (init = '1') then
|
||||
fine_time_l <= (others => '0');
|
||||
coarse_time_l <= (others => '0');
|
||||
pd_pos <= (others => '0');
|
||||
elsif(pd_p = '1') then
|
||||
elsif (pd_p = '1') then
|
||||
fine_time_l <= fine_time;
|
||||
coarse_time_l <= coarse_time;
|
||||
pd_pos <= pos_cnt;
|
||||
|
|
@ -407,7 +407,7 @@ begin
|
|||
generic map(
|
||||
FIFO_WIDTH => 32,
|
||||
FIFO_DEPTH => 256)
|
||||
port map (
|
||||
port map(
|
||||
clock => clk,
|
||||
data => pd_fifo_d,
|
||||
rdreq => pd_fifo_rd_en,
|
||||
|
|
@ -429,25 +429,25 @@ begin
|
|||
with pd_data_sel select
|
||||
pd_fifo_d <=
|
||||
X"0" & fine_time_l when "001",
|
||||
coarse_time_l when "010",
|
||||
pd_pos when others;
|
||||
coarse_time_l when "010",
|
||||
pd_pos when others;
|
||||
|
||||
rst_pd_fifo <= rst_pd_fifo_i or init;
|
||||
|
||||
-- PD Positional Watch-Dog
|
||||
pPD_WatchDog : process(clk)
|
||||
begin
|
||||
if(clk = '1') then
|
||||
if(init = '1' or clr_pd_pos = '1' or filt_prod_det_p = '1') then
|
||||
if (clk = '1') then
|
||||
if (init = '1' or clr_pd_pos = '1' or filt_prod_det_p = '1') then
|
||||
pd_delta_pos <= (others => '0');
|
||||
elsif(pos_step = '1') then
|
||||
pd_delta_pos <= std_logic_vector(signed(pd_delta_pos)+1);
|
||||
elsif(neg_step = '1') then
|
||||
pd_delta_pos <= std_logic_vector(signed(pd_delta_pos)-1);
|
||||
elsif (pos_step = '1') then
|
||||
pd_delta_pos <= std_logic_vector(signed(pd_delta_pos) + 1);
|
||||
elsif (neg_step = '1') then
|
||||
pd_delta_pos <= std_logic_vector(signed(pd_delta_pos) - 1);
|
||||
end if;
|
||||
-- compare the absolute value of the delta position against the
|
||||
-- threshold. Use the 1's complement to save some logic.
|
||||
if(pd_wd_en = '1' and unsigned(pd_delta_pos_abs) > unsigned(pd_wd_thres)) then
|
||||
if (pd_wd_en = '1' and unsigned(pd_delta_pos_abs) > unsigned(pd_wd_thres)) then
|
||||
pd_wd_alarm <= '1';
|
||||
else
|
||||
pd_wd_alarm <= '0';
|
||||
|
|
@ -468,30 +468,30 @@ begin
|
|||
|
||||
pEncPulseSample : process(clk)
|
||||
begin
|
||||
if(clk = '1' and clk'event) then
|
||||
if(rst_fifo = '1' or sampling_time = '1') then
|
||||
sampling_time_cnt <= (others => '0');
|
||||
if (clk = '1' and clk'event) then
|
||||
if (rst_fifo = '1' or sampling_time = '1') then
|
||||
sampling_time_cnt <= (others => '0');
|
||||
else
|
||||
sampling_time_cnt <= std_logic_vector(unsigned(sampling_time_cnt)+1);
|
||||
sampling_time_cnt <= std_logic_vector(unsigned(sampling_time_cnt) + 1);
|
||||
end if;
|
||||
if(rst_fifo = '1') then
|
||||
if (rst_fifo = '1') then
|
||||
fifo_error <= '0';
|
||||
elsif(fifo_wr_en = '1' and fifo_full = '1') then
|
||||
elsif (fifo_wr_en = '1' and fifo_full = '1') then
|
||||
fifo_error <= '1';
|
||||
end if;
|
||||
fifo_wr_en <= sampling_time;
|
||||
--fifo_d <= enc_out_cnt;
|
||||
fifo_d <= pos_cnt;
|
||||
fifo_d <= pos_cnt;
|
||||
end if;
|
||||
end process pEncPulseSample;
|
||||
|
||||
sampling_time <= '1' when unsigned(sampling_time_cnt) = unsigned(sampling_period) else '0';
|
||||
|
||||
|
||||
iEncPulseFifo : entity work.sync_fifo
|
||||
generic map(
|
||||
FIFO_WIDTH => 32,
|
||||
FIFO_DEPTH => 1024)
|
||||
port map (
|
||||
port map(
|
||||
clock => clk,
|
||||
data => fifo_d,
|
||||
rdreq => fifo_rd_en,
|
||||
|
|
@ -514,21 +514,21 @@ begin
|
|||
|
||||
pIRQ : process(reset_n, clk)
|
||||
begin
|
||||
if(reset_n = '0') then
|
||||
if (reset_n = '0') then
|
||||
ins_diag_irq_0 <= '0';
|
||||
ins_diag_irq_1 <= '0';
|
||||
ins_diag_irq_2 <= '0';
|
||||
irq <= "000";
|
||||
irq_src_d <= "000";
|
||||
elsif(clk = '1' and clk'event) then
|
||||
irq_src_d <= irq_src;
|
||||
elsif (clk = '1' and clk'event) then
|
||||
irq_src_d <= irq_src;
|
||||
for n in 0 to 2 loop
|
||||
if(irq_clr(n) = '1') then
|
||||
if (irq_clr(n) = '1') then
|
||||
irq(n) <= '0';
|
||||
elsif(irq_en(n) = '1' and irq_src(n) = '1' and irq_src_d(n) = '0') then
|
||||
elsif (irq_en(n) = '1' and irq_src(n) = '1' and irq_src_d(n) = '0') then
|
||||
irq(n) <= '1';
|
||||
end if;
|
||||
end loop; -- n
|
||||
end loop; -- n
|
||||
ins_diag_irq_0 <= irq_val(0);
|
||||
ins_diag_irq_1 <= irq_val(1);
|
||||
ins_diag_irq_2 <= irq_val(2);
|
||||
|
|
@ -537,98 +537,98 @@ begin
|
|||
|
||||
irq_val <= irq and not irq_mask;
|
||||
irq_src <= pd_wd_alarm & pd_fifo_alarm & enc_fifo_alarm;
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- C&S registers (Avalon-MM I/F)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
fpm_diags_7_csr_regs_i : entity work.fpm_diags_7_csr_regs
|
||||
generic map (
|
||||
ADDR_DECODE_WIDTH => 5
|
||||
)
|
||||
port map (
|
||||
-- Clock and reset
|
||||
clk => clk,
|
||||
rst_n => reset_n,
|
||||
epd_diags_7_csr_regs_i : entity work.epd_diags_7_csr_regs
|
||||
generic map(
|
||||
ADDR_DECODE_WIDTH => 5
|
||||
)
|
||||
port map(
|
||||
-- Clock and reset
|
||||
clk => clk,
|
||||
rst_n => reset_n,
|
||||
|
||||
-- auto-generated
|
||||
|
||||
-- Internal signal ports
|
||||
init_init => init_i,
|
||||
init_rst_counters => rst_counters_i,
|
||||
init_rst_measur => rst_measur_i,
|
||||
init_rst_dir => rst_dir_i,
|
||||
init_rst_enc_fifo => rst_fifo_i,
|
||||
init_rst_pos => rst_pos_i,
|
||||
init_rst_pd_fifo => rst_pd_fifo_i,
|
||||
delta_time_meas_step => meas_step,
|
||||
dir_thres_pos_dir_thres => pos_dir_thres,
|
||||
dir_thres_neg_dir_thres => neg_dir_thres,
|
||||
enc_sampling_period => sampling_period,
|
||||
enc_fifo_mng_w_irq_gen_thres => fifo_thres,
|
||||
pd_fifo_mng_w_irq_gen_thres => pd_fifo_thres,
|
||||
pd_fifo_mng_w_pd_log_src => pd_log_src,
|
||||
pd_watchdog_ctrl_watchdog_en => pd_wd_en,
|
||||
pd_watchdog_ctrl_watchdog_clr => clr_pd_pos,
|
||||
pd_watchdog_thres => pd_wd_thres,
|
||||
irq_mng_irq_en => irq_en,
|
||||
irq_mng_irq_clr => irq_clr,
|
||||
irq_mng_irq_mask => irq_mask,
|
||||
rd_enc_fifo_pulse => rd_enc_fifo_pulse,
|
||||
rd_enc_fifo => open,
|
||||
rd_enc_fifo_in => '0',
|
||||
rd_pd_fifo_pulse => rd_pd_fifo_pulse,
|
||||
rd_pd_fifo => open,
|
||||
rd_pd_fifo_in => '0',
|
||||
input_status_rs422_p1 => input_status( 0),
|
||||
input_status_rs422_p2 => input_status( 1),
|
||||
input_status_rs422_zp => input_status( 2),
|
||||
input_status_rs422_pd => input_status( 3),
|
||||
input_status_ttl_p1 => input_status( 4),
|
||||
input_status_ttl_p2 => input_status( 5),
|
||||
input_status_ttl_zp => input_status( 6),
|
||||
input_status_ttl_pd_pnp => input_status( 7),
|
||||
input_status_ttl_pd_npn => input_status( 8),
|
||||
input_status_filt_p1 => input_status( 9),
|
||||
input_status_filt_p2 => input_status(10),
|
||||
input_status_filt_zp => input_status(11),
|
||||
input_status_filt_pd => input_status(12),
|
||||
input_status_enc_pulse => input_status(13),
|
||||
input_status_pd_out => input_status(14),
|
||||
input_status_drop_watch => input_status(15),
|
||||
input_status_fire_req => input_status(16),
|
||||
phase1_counter => filt_phase0_cnt,
|
||||
phase2_counter => filt_phase1_cnt,
|
||||
zero_phase_counter => filt_zero_ph_cnt,
|
||||
pd_counter => filt_prod_det_cnt,
|
||||
enc_pulse_counter => enc_out_cnt,
|
||||
pd_output_counter => pd_out_cnt,
|
||||
fire_request_counter => fire_req_cnt,
|
||||
delta_time_meas => enc_delta_time,
|
||||
deltamin_time_meas => enc_delta_time_min,
|
||||
deltamax_time_meas => enc_delta_time_max,
|
||||
delta_time_prev_meas => enc_delta_time_prev,
|
||||
abs_pos => pos_cnt,
|
||||
dir_cnt_dir_cnt => dir_cnt,
|
||||
dir_cnt_dir_change_cnt => dir_change_cnt,
|
||||
enc_fifo_mng_r_fifo_level => fifo_usedw,
|
||||
enc_fifo_mng_r_fifo_overflow => fifo_error,
|
||||
enc_fifo_output => fifo_q,
|
||||
pd_fifo_mng_r_fifo_level => pd_fifo_usedw,
|
||||
pd_fifo_mng_r_fifo_overflow => pd_fifo_error,
|
||||
pd_fifo_output => pd_fifo_q,
|
||||
pd_watchdog_status => pd_wd_alarm,
|
||||
irq_value => irq_val,
|
||||
|
||||
-- end auto-generated
|
||||
|
||||
-- Slave bus port
|
||||
avs_address => avs_address(4 downto 0),
|
||||
avs_write => avs_write,
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read,
|
||||
avs_readdata => avs_readdata
|
||||
-- auto-generated
|
||||
|
||||
);
|
||||
-- Internal signal ports
|
||||
init_init => init_i,
|
||||
init_rst_counters => rst_counters_i,
|
||||
init_rst_measur => rst_measur_i,
|
||||
init_rst_dir => rst_dir_i,
|
||||
init_rst_enc_fifo => rst_fifo_i,
|
||||
init_rst_pos => rst_pos_i,
|
||||
init_rst_pd_fifo => rst_pd_fifo_i,
|
||||
delta_time_meas_step => meas_step,
|
||||
dir_thres_pos_dir_thres => pos_dir_thres,
|
||||
dir_thres_neg_dir_thres => neg_dir_thres,
|
||||
enc_sampling_period => sampling_period,
|
||||
enc_fifo_mng_w_irq_gen_thres => fifo_thres,
|
||||
pd_fifo_mng_w_irq_gen_thres => pd_fifo_thres,
|
||||
pd_fifo_mng_w_pd_log_src => pd_log_src,
|
||||
pd_watchdog_ctrl_watchdog_en => pd_wd_en,
|
||||
pd_watchdog_ctrl_watchdog_clr => clr_pd_pos,
|
||||
pd_watchdog_thres => pd_wd_thres,
|
||||
irq_mng_irq_en => irq_en,
|
||||
irq_mng_irq_clr => irq_clr,
|
||||
irq_mng_irq_mask => irq_mask,
|
||||
rd_enc_fifo_pulse => rd_enc_fifo_pulse,
|
||||
rd_enc_fifo => open,
|
||||
rd_enc_fifo_in => '0',
|
||||
rd_pd_fifo_pulse => rd_pd_fifo_pulse,
|
||||
rd_pd_fifo => open,
|
||||
rd_pd_fifo_in => '0',
|
||||
input_status_rs422_p1 => input_status(0),
|
||||
input_status_rs422_p2 => input_status(1),
|
||||
input_status_rs422_zp => input_status(2),
|
||||
input_status_rs422_pd => input_status(3),
|
||||
input_status_ttl_p1 => input_status(4),
|
||||
input_status_ttl_p2 => input_status(5),
|
||||
input_status_ttl_zp => input_status(6),
|
||||
input_status_ttl_pd_pnp => input_status(7),
|
||||
input_status_ttl_pd_npn => input_status(8),
|
||||
input_status_filt_p1 => input_status(9),
|
||||
input_status_filt_p2 => input_status(10),
|
||||
input_status_filt_zp => input_status(11),
|
||||
input_status_filt_pd => input_status(12),
|
||||
input_status_enc_pulse => input_status(13),
|
||||
input_status_pd_out => input_status(14),
|
||||
input_status_drop_watch => input_status(15),
|
||||
input_status_fire_req => input_status(16),
|
||||
phase1_counter => filt_phase0_cnt,
|
||||
phase2_counter => filt_phase1_cnt,
|
||||
zero_phase_counter => filt_zero_ph_cnt,
|
||||
pd_counter => filt_prod_det_cnt,
|
||||
enc_pulse_counter => enc_out_cnt,
|
||||
pd_output_counter => pd_out_cnt,
|
||||
fire_request_counter => fire_req_cnt,
|
||||
delta_time_meas => enc_delta_time,
|
||||
deltamin_time_meas => enc_delta_time_min,
|
||||
deltamax_time_meas => enc_delta_time_max,
|
||||
delta_time_prev_meas => enc_delta_time_prev,
|
||||
abs_pos => pos_cnt,
|
||||
dir_cnt_dir_cnt => dir_cnt,
|
||||
dir_cnt_dir_change_cnt => dir_change_cnt,
|
||||
enc_fifo_mng_r_fifo_level => fifo_usedw,
|
||||
enc_fifo_mng_r_fifo_overflow => fifo_error,
|
||||
enc_fifo_output => fifo_q,
|
||||
pd_fifo_mng_r_fifo_level => pd_fifo_usedw,
|
||||
pd_fifo_mng_r_fifo_overflow => pd_fifo_error,
|
||||
pd_fifo_output => pd_fifo_q,
|
||||
pd_watchdog_status => pd_wd_alarm,
|
||||
irq_value => irq_val,
|
||||
|
||||
-- end auto-generated
|
||||
|
||||
-- Slave bus port
|
||||
avs_address => avs_address(4 downto 0),
|
||||
avs_write => avs_write,
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read,
|
||||
avs_readdata => avs_readdata
|
||||
|
||||
);
|
||||
|
||||
end architecture rtl;
|
||||
|
|
@ -26,13 +26,13 @@ package fire_pulse_7_pkg is
|
|||
-----------------------------------------------------------------------------
|
||||
|
||||
constant BLK_SIZE : integer := 2048;
|
||||
|
||||
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 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
|
||||
|
||||
|
||||
constant FP_CTRL_ID : natural := 0; -- Block ID for the Fire-Pulse-Manager 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 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_7_pkg;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ entity fire_pulse_ctrl_7 is
|
|||
clk : in std_logic;
|
||||
fpm_config : in std_logic_vector(9 downto 0);
|
||||
fpm_init : out std_logic;
|
||||
fpm_init_done : in std_logic;
|
||||
src_sel : out std_logic_vector(3 downto 0);
|
||||
uart_regen_bypass : out std_logic;
|
||||
pof_protocol_version : out std_logic;
|
||||
|
|
@ -33,6 +34,8 @@ entity fire_pulse_ctrl_7 is
|
|||
error_rate_thres : out std_logic_vector(7 downto 0);
|
||||
max_error_flag : in std_logic;
|
||||
rx_watchdog : in std_logic;
|
||||
print_start_pof_rx : in std_logic;
|
||||
print_start_override : out std_logic_vector(1 downto 0);
|
||||
rx_watchdog_en : out std_logic;
|
||||
rx_watchdog_clr : out std_logic;
|
||||
parity_err_cnt : in std_logic_vector(15 downto 0);
|
||||
|
|
@ -70,14 +73,12 @@ architecture rtl of fire_pulse_ctrl_7 is
|
|||
signal rx_watchdog_en_i, rx_watchdog_clr_i : std_logic;
|
||||
signal uart_regen_bypass_i : std_logic;
|
||||
signal pof_protocol_version_i : std_logic;
|
||||
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 fpm_init_start : 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 error_rate_thres_i, init_cnt : std_logic_vector(7 downto 0);
|
||||
signal error_rate_thres_i : std_logic_vector(7 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);
|
||||
|
|
@ -87,29 +88,9 @@ begin
|
|||
pCTRL_REGs : process(reset_n, clk)
|
||||
begin -- process
|
||||
if (reset_n = '0') then
|
||||
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');
|
||||
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,14 +103,11 @@ begin
|
|||
elsif (fine_time_wrap = '1') then
|
||||
coarse_time_i <= std_logic_vector(unsigned(coarse_time_i) + 1);
|
||||
end if;
|
||||
one_pps <= fine_time_wrap;
|
||||
one_pps <= fine_time_wrap;
|
||||
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';
|
||||
|
||||
fpm_init <= fpm_init_i;
|
||||
fpm_init <= fpm_init_start;
|
||||
|
||||
fine_time_wrap <= '1' when unsigned(fine_time_i) = FINE_TIME_TC else '0';
|
||||
|
||||
|
|
@ -192,6 +170,7 @@ begin
|
|||
signal_selection_enc_pd_emul_en => src_sel_i(1),
|
||||
signal_selection_seb_epd_en => src_sel_i(2),
|
||||
signal_selection_seb_epd_linkout_sel => src_sel_i(3),
|
||||
signal_selection_print_start_override => print_start_override,
|
||||
pof_receiver_control_pof_rx_enable => enable_rx_i,
|
||||
pof_receiver_control_uart_regeneration_bypass => uart_regen_bypass_i,
|
||||
pof_receiver_control_clear_max => open,
|
||||
|
|
@ -215,18 +194,19 @@ begin
|
|||
drop_watch_config_dw_pulse_width => dw_pulse_width_i,
|
||||
fpm_config_ch_num => fpm_config(3 downto 0),
|
||||
fpm_config_seb_epd_logic_present => fpm_config(4),
|
||||
fpm_config_smb_diagnostic_present => fpm_config(5),
|
||||
fpm_config_epd_diagnostic_present => fpm_config(5),
|
||||
fpm_config_event_logger_present => fpm_config(6),
|
||||
fpm_config_delay_equalization_enable => fpm_config(7),
|
||||
fpm_config_tof_comp_enable => fpm_config(8),
|
||||
fpm_config_pixel_pitch_corr_enable => fpm_config(9),
|
||||
fpm_init_done => fpm_init_done_flag,
|
||||
fpm_init_done => fpm_init_done,
|
||||
fine_time_status => fine_time_i,
|
||||
coarse_time_status => coarse_time_i,
|
||||
pof_rx_status_parity_bit_error_count => parity_err_cnt,
|
||||
pof_rx_status_skipped_position_error_count => skip_pos_cnt,
|
||||
pof_rx_control_r_rx_watchdog => rx_watchdog,
|
||||
pof_rx_control_r_rx_error_flag => max_error_flag,
|
||||
pof_rx_control_r_print_start_received => print_start_pof_rx,
|
||||
irq_status => irq_val(0),
|
||||
pd_cnt => pd_cnt,
|
||||
seb_epd_led_status_led_pd_g => led_status(0),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ entity fire_pulse_manager_7 is
|
|||
SEB_EPD_MODE : boolean := false; -- Support SEB-EPD
|
||||
CH_NUM : integer range 1 to 15 := 4; -- number of Pulse-Generator blocks
|
||||
PD_QUEUE_SIZE : natural := 512;
|
||||
ADD_SMB_DIAG : boolean := false; -- Instantiate SMB Diagnostic block
|
||||
ADD_EPD_DIAGS : boolean := false; -- Instantiate Encoder PD Diagnostic block
|
||||
ADD_EVENT_LOGGER : boolean := false; -- Instantiate Event-Logger block
|
||||
LOG_FIFO_SIZE : natural range 256 to 4096 := 1024;
|
||||
PULSE_DELAY_EQUAL_EN : boolean := false;
|
||||
|
|
@ -116,7 +116,7 @@ architecture rtl of fire_pulse_manager_7 is
|
|||
signal rx_watchdog : std_logic;
|
||||
signal rx_watchdog_en : std_logic;
|
||||
signal rx_watchdog_clr : std_logic;
|
||||
signal print_start_i : std_logic;
|
||||
signal print_start_pof_rx : std_logic;
|
||||
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);
|
||||
|
|
@ -126,9 +126,10 @@ architecture rtl of fire_pulse_manager_7 is
|
|||
signal fine_time : std_logic_vector(27 downto 0);
|
||||
signal coarse_time : std_logic_vector(31 downto 0);
|
||||
--
|
||||
signal init, remote_init : std_logic;
|
||||
signal init : std_logic; -- strobing this sends init signal over pof_tx. it is also a sort of reset to pd_cnt, simple_enc_vel_detect, pulse_generator, ems, seb_led_gen, smb_diagnostics, dw_pulse
|
||||
signal remote_init : std_logic;
|
||||
signal dp_dir : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal set_pos_ie : std_logic;
|
||||
signal set_pos_ie : std_logic; -- set for internal encoder / encoder emulator
|
||||
signal enc_pulse : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal pd_pulse : std_logic;
|
||||
signal pd_pulse_ie : std_logic;
|
||||
|
|
@ -175,8 +176,14 @@ architecture rtl of fire_pulse_manager_7 is
|
|||
signal ch_start_of_image : fire_pulse_t;
|
||||
signal ch_pd : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_raw_pulse, ch_mask : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal src_sel : std_logic_vector(3 downto 0);
|
||||
signal fpm_init : std_logic;
|
||||
--
|
||||
constant SRC_SEL_SEB_EPD_LINKOUT_SEL : integer := 3;
|
||||
constant SRC_SEL_SEB_EPD_EN : integer := 2;
|
||||
constant SRC_SEL_ENC_PD_EMUL_EN : integer := 1;
|
||||
constant SRC_SEL_FIRE_PULSE_SEL : integer := 0;
|
||||
signal src_sel : std_logic_vector(3 downto 0); -- seb_epd_linkout_sel, seb_epd_en, enc_pd_emul_en, fire_pulse_sel
|
||||
--
|
||||
signal fire_pulse_ctrl_init : std_logic; -- init signal driven by control register
|
||||
--
|
||||
signal ext_fp_in_sync : std_logic;
|
||||
signal ext_fp_in : std_logic;
|
||||
|
|
@ -206,6 +213,9 @@ architecture rtl of fire_pulse_manager_7 is
|
|||
--
|
||||
signal fpm_generic_status : std_logic_vector(9 downto 0);
|
||||
signal pof_protocol_version : std_logic;
|
||||
signal iPOF_TX_init_done : std_logic;
|
||||
signal print_start_override : std_logic_vector(1 downto 0);
|
||||
signal print_start_i : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
|
|
@ -280,7 +290,8 @@ begin
|
|||
reset_n => reset_n_i,
|
||||
clk => clk,
|
||||
fpm_config => fpm_generic_status,
|
||||
fpm_init => fpm_init,
|
||||
fpm_init => fire_pulse_ctrl_init,
|
||||
fpm_init_done => iPOF_TX_init_done,
|
||||
src_sel => src_sel,
|
||||
uart_regen_bypass => uart_regen_bypass,
|
||||
pof_protocol_version => pof_protocol_version,
|
||||
|
|
@ -288,6 +299,8 @@ begin
|
|||
error_rate_thres => error_rate_thres,
|
||||
max_error_flag => max_error_flag,
|
||||
rx_watchdog => rx_watchdog,
|
||||
print_start_pof_rx => print_start_pof_rx,
|
||||
print_start_override => print_start_override,
|
||||
rx_watchdog_en => rx_watchdog_en,
|
||||
rx_watchdog_clr => rx_watchdog_clr,
|
||||
parity_err_cnt => parity_err_cnt,
|
||||
|
|
@ -310,7 +323,7 @@ begin
|
|||
|
||||
fpm_generic_status(3 downto 0) <= std_logic_vector(to_unsigned(CH_NUM, 4));
|
||||
fpm_generic_status(4) <= '1' when SEB_EPD_MODE = true else '0';
|
||||
fpm_generic_status(5) <= '1' when ADD_SMB_DIAG = true else '0';
|
||||
fpm_generic_status(5) <= '1' when ADD_EPD_DIAGS = true else '0';
|
||||
fpm_generic_status(6) <= '1' when ADD_EVENT_LOGGER = true else '0';
|
||||
fpm_generic_status(7) <= '1' when PULSE_DELAY_EQUAL_EN = true else '0';
|
||||
fpm_generic_status(8) <= '1' when TOF_COMP_EN = true else '0';
|
||||
|
|
@ -325,14 +338,14 @@ begin
|
|||
begin
|
||||
if (clk = '1' and clk'event) then
|
||||
-- Abs-Pos and PD source selection
|
||||
if (src_sel(2) = '1') then
|
||||
if (src_sel(SRC_SEL_SEB_EPD_EN) = '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
|
||||
if (src_sel(SRC_SEL_ENC_PD_EMUL_EN) = '0') then
|
||||
pd_pulse <= pd_pulse_pof;
|
||||
abs_pos <= abs_pos_pof;
|
||||
inc_pos <= inc_pos_pof;
|
||||
|
|
@ -349,14 +362,14 @@ begin
|
|||
|
||||
gPOF_TX_OUT : if SEB_EPD_MODE = true generate
|
||||
|
||||
pof_tx <= dw_pulse when src_sel(3) = '1' else
|
||||
pof_tx_regen when src_sel(2) = '0' else
|
||||
pof_tx <= dw_pulse when src_sel(SRC_SEL_SEB_EPD_LINKOUT_SEL) = '1' else
|
||||
pof_tx_regen when src_sel(SRC_SEL_SEB_EPD_EN) = '0' else
|
||||
pof_tx_data;
|
||||
|
||||
pBUF_SEB_EPD_MODE : process(clk)
|
||||
begin
|
||||
if (clk = '1' and clk'event) then
|
||||
seb_epd_mode_en <= src_sel(2);
|
||||
seb_epd_mode_en <= src_sel(SRC_SEL_SEB_EPD_EN);
|
||||
end if;
|
||||
end process pBUF_SEB_EPD_MODE;
|
||||
|
||||
|
|
@ -374,7 +387,7 @@ begin
|
|||
abs_pos_out <= abs_pos;
|
||||
dp_dir_out <= dp_dir;
|
||||
for i in 0 to CH_NUM - 1 loop
|
||||
if (src_sel(0) = '1') then
|
||||
if (src_sel(SRC_SEL_FIRE_PULSE_SEL) = '1') then
|
||||
fire_pulse(i * 32 + 31 downto i * 32) <= ch_fire_pulse(i);
|
||||
start_of_image(i * 32 + 31 downto i * 32) <= ch_start_of_image(i);
|
||||
else
|
||||
|
|
@ -382,17 +395,33 @@ begin
|
|||
start_of_image(i * 32 + 31 downto i * 32) <= (others => '0');
|
||||
end if;
|
||||
end loop; -- i
|
||||
print_start <= print_start_i;
|
||||
if print_start_override(1) = '1' then -- force output value and control to pof_tx (if present)
|
||||
print_start_i <= print_start_override(0);
|
||||
elsif pof_protocol_version = '0' then -- for protocol 0, start is always enabled
|
||||
print_start_i <= '1';
|
||||
else -- use the received value
|
||||
print_start_i <= print_start_pof_rx;
|
||||
end if;
|
||||
|
||||
end if;
|
||||
end process pBUF_OUT;
|
||||
print_start <= print_start_i;
|
||||
|
||||
pINIT_GEN : process(clk)
|
||||
begin
|
||||
if (clk = '1' and clk'Event) then
|
||||
if (src_sel(1) = '0') then
|
||||
init <= fpm_init or (not src_sel(2) and (not enable_rx or remote_init));
|
||||
else
|
||||
init <= fpm_init or set_pos_ie;
|
||||
init <= '0';
|
||||
if fire_pulse_ctrl_init = '1' then -- signal from control registers
|
||||
init <= '1';
|
||||
elsif src_sel(SRC_SEL_ENC_PD_EMUL_EN) = '1' then -- setting the internal encoder position also re-initialises
|
||||
init <= set_pos_ie; -- fpm_init_done should be polled by ESW before any further actions to ensure init is complete
|
||||
elsif src_sel(SRC_SEL_SEB_EPD_EN) = '0' and remote_init = '1' then
|
||||
-- source is not SEB-EPD (i.e. it's the SEB-PDW RX link) and we received an init signal over the POF RX link (it's a strobe)
|
||||
init <= '1';
|
||||
elsif src_sel(SRC_SEL_SEB_EPD_EN) = '0' and enable_rx = '0' then
|
||||
-- source is not enc_pd_emul and is not SEB-EPD (i.e. it's the SEB-PDW RX link) but the RX link has been disabled
|
||||
-- FIXME - will this condition hold several systems in reset, but not begin the pof_tx init process?
|
||||
init <= '1';
|
||||
end if;
|
||||
end if;
|
||||
end process pINIT_GEN;
|
||||
|
|
@ -410,7 +439,7 @@ begin
|
|||
mon_point_src(10) <= ch_start_of_image(0)(0);
|
||||
mon_point_src(11) <= inc_pos;
|
||||
mon_point_src(12) <= dec_pos;
|
||||
mon_point_src(13) <= print_start_i;
|
||||
mon_point_src(13) <= print_start_pof_rx;
|
||||
--
|
||||
mon_point_src(15 downto 14) <= (others => '0');
|
||||
|
||||
|
|
@ -536,7 +565,7 @@ begin
|
|||
rx_data => pof_rx,
|
||||
init_out => remote_init,
|
||||
pd_out => pd_pulse_pof,
|
||||
print_start => print_start_i,
|
||||
print_start => print_start_pof_rx,
|
||||
inc_pos => inc_pos_pof,
|
||||
dec_pos => dec_pos_pof,
|
||||
abs_pos => abs_pos_pof,
|
||||
|
|
@ -592,9 +621,9 @@ begin
|
|||
filt_zp => open,
|
||||
filt_pd => ems_filt_pd);
|
||||
|
||||
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;
|
||||
pd_pulse_mux <= seb_epd_pd when src_sel(SRC_SEL_ENC_PD_EMUL_EN) = '0' else pd_pulse_ie;
|
||||
enc_p1_mux <= seb_epd_enc_p1 when src_sel(SRC_SEL_ENC_PD_EMUL_EN) = '0' else enc_p1_ie;
|
||||
enc_p2_mux <= seb_epd_enc_p2 when src_sel(SRC_SEL_ENC_PD_EMUL_EN) = '0' else enc_p2_ie;
|
||||
|
||||
else generate
|
||||
|
||||
|
|
@ -614,11 +643,13 @@ begin
|
|||
gPOF_TX : if SEB_EPD_MODE = true generate
|
||||
-- Default POF-Protocol
|
||||
iPOF_TX : entity work.pof_tx_2
|
||||
port map( -- @suppress "Port map uses default values. Missing optional actuals: print_start"
|
||||
port map(
|
||||
reset_n => reset_n_i,
|
||||
clk => clk,
|
||||
init => init,
|
||||
init_done => iPOF_TX_init_done,
|
||||
pd_in => pd_ems,
|
||||
print_start => print_start_i, -- note for the 0th in chain, this must be set using override in fire pulse ctrl
|
||||
pof_protocol_version => pof_protocol_version,
|
||||
inc_pos => inc_pos_ems,
|
||||
dec_pos => dec_pos_ems,
|
||||
|
|
@ -636,6 +667,8 @@ begin
|
|||
|
||||
pof_tx_data <= '0';
|
||||
|
||||
iPOF_TX_init_done <= '1'; -- always assume it's complete!
|
||||
|
||||
end generate gPOF_TX;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
|
@ -681,7 +714,7 @@ begin
|
|||
-- Diagnostic block
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
gDIAG : if ADD_SMB_DIAG = false generate
|
||||
gDIAG : if ADD_EPD_DIAGS = false generate
|
||||
|
||||
cs_diag_read_data <= X"DEAD_BEEF";
|
||||
|
||||
|
|
@ -689,9 +722,9 @@ begin
|
|||
ins_fpm_irq_2 <= '0';
|
||||
ins_fpm_irq_3 <= '0';
|
||||
|
||||
elsif ADD_SMB_DIAG = true generate
|
||||
elsif ADD_EPD_DIAGS = true generate
|
||||
|
||||
iDiagnostic : entity work.smb_diagnostics_7
|
||||
iDiagnostic : entity work.epd_diagnostics_7
|
||||
port map(
|
||||
clk => clk,
|
||||
reset_n => reset_n_i,
|
||||
|
|
@ -769,7 +802,7 @@ begin
|
|||
log_data_src(10) <= ch_start_of_image(0)(0);
|
||||
log_data_src(11) <= inc_pos;
|
||||
log_data_src(12) <= dec_pos;
|
||||
log_data_src(13) <= print_start_i;
|
||||
log_data_src(13) <= print_start_pof_rx;
|
||||
--
|
||||
log_data_src(31 downto 14) <= (others => '0');
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,11 @@ end fire_pulse_manager_7_one_tb;
|
|||
|
||||
architecture behav of fire_pulse_manager_7_one_tb is
|
||||
|
||||
constant DEV_NUM : integer := 2;
|
||||
constant NUM_AVS_DEVICES : integer := 2;
|
||||
|
||||
constant RX_CLK_PERIOD : time := CLK_PERIOD / 3; -- clock period for used by the
|
||||
constant AVS_ADDR_DUT : integer := 0;
|
||||
constant AVS_ADDR_TB_POFTX : integer := 1;
|
||||
constant RX_CLK_PERIOD : time := CLK_PERIOD / 3; -- clock period for used by the
|
||||
-- UART-Rx on the POF
|
||||
|
||||
constant POF_DELAY : time := 30 ns; -- Total delay from POF-Tx input to POF-Rx output
|
||||
|
|
@ -72,86 +74,86 @@ architecture behav of fire_pulse_manager_7_one_tb is
|
|||
signal ch_fire_pulse : fire_pulse_t;
|
||||
signal ch_start_of_image : fire_pulse_t;
|
||||
|
||||
type avs_read_bus_t is array (0 to DEV_NUM - 1) of std_logic_vector(31 downto 0);
|
||||
type avs_read_bus_t is array (0 to NUM_AVS_DEVICES - 1) of std_logic_vector(31 downto 0);
|
||||
|
||||
signal reset_n : std_logic := '0';
|
||||
signal clk : std_logic := '0';
|
||||
signal rx_clk : std_logic := '0';
|
||||
signal pof_tx, pof_rx : std_logic;
|
||||
signal fire_pulse : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal start_of_image : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal avs_address : std_logic_vector(14 downto 0);
|
||||
signal avs_write : std_logic_vector(DEV_NUM - 1 downto 0);
|
||||
signal avs_writedata : std_logic_vector(31 downto 0);
|
||||
signal avs_read : std_logic_vector(DEV_NUM - 1 downto 0);
|
||||
signal avs_readdata : avs_read_bus_t;
|
||||
signal reset_n : std_logic := '0';
|
||||
signal clk : std_logic := '0';
|
||||
signal rx_clk : std_logic := '0';
|
||||
signal dut_pof_tx, dut_pof_rx : std_logic; -- pof signals in and out of fpm. This TB does not check fpm output POF signal except as DW
|
||||
signal fire_pulse : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal start_of_image : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal avs_address : std_logic_vector(14 downto 0);
|
||||
signal avs_write : std_logic_vector(NUM_AVS_DEVICES - 1 downto 0);
|
||||
signal avs_writedata : std_logic_vector(31 downto 0);
|
||||
signal avs_read : std_logic_vector(NUM_AVS_DEVICES - 1 downto 0);
|
||||
signal avs_readdata : avs_read_bus_t;
|
||||
--
|
||||
signal init_tx : std_logic;
|
||||
signal inc_pos : std_logic;
|
||||
signal dec_pos : std_logic;
|
||||
signal abs_position : std_logic_vector(31 downto 0);
|
||||
signal tx_data : std_logic;
|
||||
signal pof_tx_avs_rv : std_logic;
|
||||
signal pof_tx_avs_we_d : std_logic;
|
||||
signal enc_p1 : std_logic;
|
||||
signal enc_p2 : std_logic;
|
||||
signal pd : std_logic;
|
||||
signal seb_epd_enc_p1 : std_logic;
|
||||
signal seb_epd_enc_p2 : std_logic;
|
||||
signal seb_epd_pd : std_logic;
|
||||
signal tb_pof_tx_init_tx : std_logic;
|
||||
signal inc_pos : std_logic;
|
||||
signal dec_pos : std_logic;
|
||||
signal abs_position : std_logic_vector(31 downto 0);
|
||||
signal pof_tx_to_DUT_tx_data : std_logic;
|
||||
signal enc_p1 : std_logic;
|
||||
signal enc_p2 : std_logic;
|
||||
signal pd : std_logic;
|
||||
signal seb_epd_enc_p1 : std_logic;
|
||||
signal seb_epd_enc_p2 : std_logic;
|
||||
signal seb_epd_pd : std_logic;
|
||||
--
|
||||
signal emul_address : std_logic_vector(9 downto 0);
|
||||
signal emul_write : std_logic;
|
||||
signal emul_writedata : std_logic_vector(31 downto 0);
|
||||
signal emul_read : std_logic;
|
||||
signal emul_readdata : std_logic_vector(31 downto 0);
|
||||
signal emul_inc_pos : std_logic;
|
||||
signal emul_dec_pos : std_logic;
|
||||
signal emul_pos : std_logic_vector(39 downto 0);
|
||||
signal emul_address : std_logic_vector(9 downto 0);
|
||||
signal emul_write : std_logic;
|
||||
signal emul_writedata : std_logic_vector(31 downto 0);
|
||||
signal emul_read : std_logic;
|
||||
signal emul_readdata : std_logic_vector(31 downto 0);
|
||||
signal emul_pos : std_logic_vector(39 downto 0);
|
||||
--
|
||||
signal enc_dir : enc_dir_t;
|
||||
signal swathe_cnt : integer;
|
||||
signal half_swathe_cnt : integer;
|
||||
signal swathe_pos : integer;
|
||||
signal end_of_swathe : std_logic;
|
||||
signal test_completed : boolean;
|
||||
signal running : boolean;
|
||||
signal configuring : boolean;
|
||||
signal passed : boolean;
|
||||
signal failed : boolean;
|
||||
signal stimuli_completed : boolean;
|
||||
signal enc_dir : enc_dir_t;
|
||||
signal swathe_cnt : integer;
|
||||
signal half_swathe_cnt : integer;
|
||||
signal swathe_pos : integer;
|
||||
signal end_of_swathe : std_logic;
|
||||
signal test_completed : boolean;
|
||||
signal running : boolean;
|
||||
signal configuring : boolean;
|
||||
signal passed : boolean;
|
||||
signal failed : boolean;
|
||||
signal stimuli_completed : boolean;
|
||||
--
|
||||
shared variable error_flag : boolean;
|
||||
shared variable error_flag : boolean;
|
||||
|
||||
signal registers_read : boolean := false;
|
||||
signal reprogram_offset : boolean := false;
|
||||
signal registers_read : boolean := false;
|
||||
signal reprogram_offset : boolean := false;
|
||||
--
|
||||
signal avs_m : mm_m_rec_t;
|
||||
signal avs_s : mm_s_rec_t;
|
||||
signal sel_slave_0 : std_logic;
|
||||
signal sel_slave_1 : std_logic;
|
||||
signal emul_s : mm_s_rec_t;
|
||||
signal emul_m : mm_m_rec_t;
|
||||
signal avs_m : mm_m_rec_t;
|
||||
signal avs_s : mm_s_rec_t;
|
||||
signal sel_slave_DUT : std_logic;
|
||||
signal sel_slave_TB_POFTX : std_logic;
|
||||
signal emul_s : mm_s_rec_t;
|
||||
signal emul_m : mm_m_rec_t;
|
||||
--
|
||||
type pd_cnt_t is array (0 to CH_NUM - 1) of integer;
|
||||
signal pd_cnt : pd_cnt_t;
|
||||
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;
|
||||
signal loc_fp_cnt : fp_cnt_t;
|
||||
signal rst_fp_cnt : std_logic;
|
||||
signal ch_pulse_out : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_pulse_out_d : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_start_of_img : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal fp_cnt : fp_cnt_t;
|
||||
signal loc_fp_cnt : fp_cnt_t;
|
||||
signal rst_fp_cnt : std_logic;
|
||||
signal ch_pulse_out : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_pulse_out_d : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_start_of_img : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
--
|
||||
signal run_dw : std_logic;
|
||||
signal dw : std_logic;
|
||||
signal dw_d : std_logic;
|
||||
signal dw_cnt : natural;
|
||||
signal run_dw : std_logic;
|
||||
signal dw : std_logic;
|
||||
signal dw_d : std_logic;
|
||||
signal dw_cnt : natural;
|
||||
--
|
||||
signal input_mode : fpm_input_type_t;
|
||||
signal input_mode : fpm_input_type_t;
|
||||
--
|
||||
signal ext_pulse : std_logic;
|
||||
signal ext_pulse_enable : std_logic;
|
||||
signal ext_pulse : std_logic;
|
||||
signal ext_pulse_enable : std_logic;
|
||||
signal fpm_abs_pos_out : std_logic_vector(31 downto 0);
|
||||
signal fpm_print_start_rx : std_logic;
|
||||
signal tb_pof_tx_print_start : std_logic := '1';
|
||||
signal tb_pof_tx_init_done : std_logic;
|
||||
|
||||
|
||||
begin -- behav
|
||||
|
|
@ -172,37 +174,53 @@ begin -- behav
|
|||
wait for 0.5 * RX_CLK_PERIOD;
|
||||
end process rx_clk_pr;
|
||||
|
||||
tb_pof_tx_print_start <= not tb_pof_tx_print_start after 39.7 us;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- DUTs : Fire Pulse Manager
|
||||
-----------------------------------------------------------------------------
|
||||
-- FIXME test FPM with pof protocol version 1
|
||||
|
||||
iDUT : entity work.fire_pulse_manager_7
|
||||
generic map(
|
||||
SEB_EPD_MODE => true,
|
||||
CH_NUM => CH_NUM)
|
||||
SEB_EPD_MODE => true,
|
||||
CH_NUM => CH_NUM,
|
||||
PD_QUEUE_SIZE => 512,
|
||||
ADD_EPD_DIAGS => false,
|
||||
ADD_EVENT_LOGGER => false,
|
||||
LOG_FIFO_SIZE => 1024,
|
||||
PULSE_DELAY_EQUAL_EN => false,
|
||||
TOF_COMP_EN => false,
|
||||
PIXEL_PITCH_CORR_EN => false)
|
||||
port map(
|
||||
reset_n => reset_n,
|
||||
clk => clk,
|
||||
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,
|
||||
fire_pulse => fire_pulse,
|
||||
start_of_image => start_of_image,
|
||||
mon_pt => open,
|
||||
ins_fpm_irq_0 => open,
|
||||
ins_fpm_irq_1 => open,
|
||||
ins_fpm_irq_2 => open,
|
||||
ins_fpm_irq_3 => open,
|
||||
avs_address => avs_address,
|
||||
avs_write => avs_write(0),
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read(0),
|
||||
avs_readdata => avs_readdata(0));
|
||||
reset_n => reset_n,
|
||||
clk => clk,
|
||||
rx_clk => rx_clk,
|
||||
pof_rx => dut_pof_rx,
|
||||
pof_tx => dut_pof_tx,
|
||||
pof_iso_en => open,
|
||||
seb_epd_mode_en => open,
|
||||
seb_epd_enc_p1 => seb_epd_enc_p1,
|
||||
seb_epd_enc_p2 => seb_epd_enc_p2,
|
||||
seb_epd_pd => seb_epd_pd,
|
||||
fire_pulse => fire_pulse,
|
||||
start_of_image => start_of_image,
|
||||
stream_busy_a => open,
|
||||
stream_busy_b => open,
|
||||
dp_dir_out => open,
|
||||
abs_pos_out => fpm_abs_pos_out,
|
||||
print_start => fpm_print_start_rx,
|
||||
mon_pt => open,
|
||||
ins_fpm_irq_0 => open,
|
||||
ins_fpm_irq_1 => open,
|
||||
ins_fpm_irq_2 => open,
|
||||
ins_fpm_irq_3 => open,
|
||||
avs_address => avs_address,
|
||||
avs_write => avs_write(AVS_ADDR_DUT),
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read(AVS_ADDR_DUT),
|
||||
avs_readdata => avs_readdata(AVS_ADDR_DUT));
|
||||
|
||||
pof_rx <= transport tx_data after POF_DELAY when ext_pulse_enable = '0' else ext_pulse;
|
||||
dut_pof_rx <= transport pof_tx_to_DUT_tx_data after POF_DELAY when ext_pulse_enable = '0' else ext_pulse;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Split subpixel phases
|
||||
|
|
@ -266,19 +284,21 @@ begin -- behav
|
|||
port map(
|
||||
reset_n => reset_n,
|
||||
clk => clk,
|
||||
init => init_tx,
|
||||
init => tb_pof_tx_init_tx,
|
||||
init_done => tb_pof_tx_init_done,
|
||||
pd_in => pd,
|
||||
print_start => open,
|
||||
print_start => tb_pof_tx_print_start,
|
||||
pof_protocol_version => '1',
|
||||
inc_pos => inc_pos,
|
||||
dec_pos => dec_pos,
|
||||
abs_position => abs_position,
|
||||
tx_data => tx_data,
|
||||
tx_data => pof_tx_to_DUT_tx_data,
|
||||
avs_address => avs_address(2 downto 0),
|
||||
avs_write => avs_write(1),
|
||||
avs_write => avs_write(AVS_ADDR_TB_POFTX),
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read(1),
|
||||
avs_readdata => avs_readdata(1));
|
||||
avs_read => avs_read(AVS_ADDR_TB_POFTX),
|
||||
avs_readdata => avs_readdata(AVS_ADDR_TB_POFTX)
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Stimuli Generation
|
||||
|
|
@ -293,7 +313,7 @@ begin -- behav
|
|||
begin
|
||||
|
||||
-- initialization
|
||||
init_tx <= '0';
|
||||
tb_pof_tx_init_tx <= '0';
|
||||
enc_dir <= START_DIR;
|
||||
swathe_pos <= 0;
|
||||
--
|
||||
|
|
@ -315,9 +335,10 @@ begin -- behav
|
|||
|
||||
-- Send a Init/Sync pulse to the POF-Tx
|
||||
wait until clk = '1' and clk'event;
|
||||
init_tx <= '1';
|
||||
tb_pof_tx_init_tx <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
init_tx <= '0';
|
||||
tb_pof_tx_init_tx <= '0';
|
||||
wait until rising_edge(tb_pof_tx_init_done);
|
||||
wait for 500 ns;
|
||||
|
||||
--
|
||||
|
|
@ -330,6 +351,8 @@ begin -- behav
|
|||
ch_offset(i) <= rv.RandInt(0, 199);
|
||||
--ch_offset(i) <= 50;
|
||||
end loop;
|
||||
|
||||
-- handshake with pUUT_CTRL
|
||||
reprogram_offset <= true;
|
||||
wait until configuring = true;
|
||||
reprogram_offset <= false;
|
||||
|
|
@ -345,7 +368,7 @@ begin -- behav
|
|||
log("Running Swathe " & to_string(swathe_cnt + 1) & ", DIR-1.", VMEDIUM);
|
||||
end if;
|
||||
|
||||
-- issue a PD to start firing
|
||||
-- issue a PD to start periodic firing after a randomly selected initial offset
|
||||
pd_pos := rv.RandInt(0, 49);
|
||||
--pd_pos := 10;
|
||||
for k in 1 to pd_pos loop
|
||||
|
|
@ -362,20 +385,26 @@ begin -- behav
|
|||
|
||||
wait for 25 us;
|
||||
half_swathe_cnt <= half_swathe_cnt + 1;
|
||||
|
||||
-- Signal to pOUT_CHECK_REGs
|
||||
wait until clk = '1' and clk'event;
|
||||
end_of_swathe <= '1';
|
||||
end_of_swathe <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
end_of_swathe <= '0';
|
||||
end_of_swathe <= '0';
|
||||
|
||||
-- reverse direction
|
||||
if (enc_dir /= START_DIR) then
|
||||
-- The number of iterations is doubled, to take into account POF and
|
||||
-- EPD input types
|
||||
if (swathe_cnt = 2 * NUM_ITERATIONS - 1) then
|
||||
end_of_stimuli := true;
|
||||
-- **************************************************************************
|
||||
end_of_stimuli := true; -- This will terminate the loop of swathe generations
|
||||
-- **************************************************************************
|
||||
else
|
||||
swathe_cnt <= swathe_cnt + 1;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (end_of_stimuli = false) then
|
||||
wait until clk = '1' and clk'event;
|
||||
if (enc_dir = DIR_0) then
|
||||
|
|
@ -383,6 +412,7 @@ begin -- behav
|
|||
else
|
||||
enc_dir <= DIR_0;
|
||||
end if;
|
||||
|
||||
-- Wait some time to make sure the change of direction is transmitted.
|
||||
-- Note: if the position starts changing before the receiver was able to
|
||||
-- confirm the change of direction, then some encoder pulses may not be
|
||||
|
|
@ -392,6 +422,7 @@ begin -- behav
|
|||
end if;
|
||||
end loop; -- end_of_stimuli = false
|
||||
|
||||
-- Signal to pTB_CTRL and pUUT_CTRL
|
||||
stimuli_completed <= true;
|
||||
wait;
|
||||
|
||||
|
|
@ -426,7 +457,7 @@ begin -- behav
|
|||
-- Testbench Control
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
dw <= pof_tx when run_dw = '1' else '0';
|
||||
dw <= dut_pof_tx when run_dw = '1' else '0';
|
||||
|
||||
pOUT_CHECK_REGs : process(reset_n, clk)
|
||||
begin
|
||||
|
|
@ -462,6 +493,37 @@ begin -- behav
|
|||
end if;
|
||||
end process pOUT_CHECK_REGs;
|
||||
|
||||
pCHECK_PRINT_START : process
|
||||
variable time_variable : time;
|
||||
begin
|
||||
|
||||
while stimuli_completed = false loop
|
||||
wait until (tb_pof_tx_print_start'event or stimuli_completed);
|
||||
time_variable := now;
|
||||
for i in 1 to 6 loop
|
||||
wait until (seb_epd_enc_p1'event or stimuli_completed);
|
||||
if (stimuli_completed) then
|
||||
exit;
|
||||
end if;
|
||||
end loop;
|
||||
time_variable := now - time_variable;
|
||||
if time_variable <= tb_pof_tx_print_start'last_event then
|
||||
if fpm_print_start_rx /= tb_pof_tx_print_start then
|
||||
log("FPM Print Start not aligned with driven value @ " & time'image(now), VLOW, true);
|
||||
error_flag := true;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (stimuli_completed) then
|
||||
exit;
|
||||
end if;
|
||||
|
||||
|
||||
end loop;
|
||||
wait;
|
||||
|
||||
end process pCHECK_PRINT_START;
|
||||
|
||||
pTB_CTRL : process
|
||||
type fp_arrived_t is array (0 to CH_NUM - 1) of boolean;
|
||||
variable fp_arrived : fp_arrived_t;
|
||||
|
|
@ -544,6 +606,7 @@ begin -- behav
|
|||
end if;
|
||||
|
||||
if (registers_read = false) then
|
||||
-- Signal from pUUT_CTRL
|
||||
wait until registers_read = true;
|
||||
end if;
|
||||
|
||||
|
|
@ -600,10 +663,10 @@ begin -- behav
|
|||
variable data : std_logic_vector(31 downto 0) := (others => '0');
|
||||
|
||||
begin
|
||||
sel_slave_0 <= '0';
|
||||
sel_slave_1 <= '0';
|
||||
rst_fp_cnt <= '0';
|
||||
configuring <= true;
|
||||
sel_slave_DUT <= '0';
|
||||
sel_slave_TB_POFTX <= '0';
|
||||
rst_fp_cnt <= '0';
|
||||
configuring <= true;
|
||||
|
||||
input_mode <= POF_INPUT;
|
||||
|
||||
|
|
@ -624,22 +687,23 @@ begin -- behav
|
|||
ext_pulse_enable <= '0';
|
||||
wait for 1 us;
|
||||
wait until clk = '1' and clk'event;
|
||||
-- signal to pOUT_CHECK_REGs to reset its own count
|
||||
rst_fp_cnt <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
rst_fp_cnt <= '0';
|
||||
|
||||
log("Configuring POFTX ... ", VLOW, true);
|
||||
sel_slave_1 <= '1';
|
||||
sel_slave_TB_POFTX <= '1';
|
||||
-- enable the block
|
||||
addr := std_logic_vector(to_unsigned(0, 32));
|
||||
data := X"0000_0021";
|
||||
addr := std_logic_vector(to_unsigned(0, 32));
|
||||
data := X"0000_0021";
|
||||
mm_32b_write(addr, data, avs_s, avs_m);
|
||||
|
||||
sel_slave_1 <= '0';
|
||||
sel_slave_0 <= '1';
|
||||
sel_slave_TB_POFTX <= '0';
|
||||
sel_slave_DUT <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
|
||||
log("Configuring FPM ... ", VLOW, true);
|
||||
log("Configuring FPM (DUT) ... ", VLOW, true);
|
||||
|
||||
fpm_ctrl_config(avs_s, avs_m);
|
||||
|
||||
|
|
@ -718,7 +782,15 @@ begin -- behav
|
|||
log("CH-" & to_string(i) & ": pd_in_cnt = " & to_string(pd_cnt(i)) & ", fire_req_cnt = " & to_string(fp_cnt(i)), VMEDIUM);
|
||||
end loop;
|
||||
|
||||
-- As a check that init can be sent safely. Needs visual inspection of transcript and waveform
|
||||
fpm_init(avs_s, avs_m);
|
||||
|
||||
wait for 1 us;
|
||||
fpm_init(avs_s, avs_m);
|
||||
|
||||
wait for 1 us;
|
||||
registers_read <= true;
|
||||
|
||||
|
||||
wait;
|
||||
end process pUUT_CTRL;
|
||||
|
|
@ -726,19 +798,19 @@ begin -- behav
|
|||
clk_clk <= clk;
|
||||
reset_reset_n <= reset_n;
|
||||
|
||||
avs_s.mm_readdata <= avs_readdata(0) when sel_slave_0 = '1' else
|
||||
avs_readdata(1) when sel_slave_1 = '1' else (others => '0');
|
||||
avs_s.mm_readdata <= avs_readdata(AVS_ADDR_DUT) when sel_slave_DUT = '1' else
|
||||
avs_readdata(AVS_ADDR_TB_POFTX) when sel_slave_TB_POFTX = '1' else (others => '0');
|
||||
|
||||
avs_s.mm_readdatavalid <= '0';
|
||||
|
||||
avs_s.mm_waitrequest <= '0';
|
||||
|
||||
avs_address <= avs_m.mm_address(avs_address'range);
|
||||
avs_write(0) <= avs_m.mm_write and sel_slave_0;
|
||||
avs_write(1) <= avs_m.mm_write and sel_slave_1;
|
||||
avs_writedata <= avs_m.mm_writedata;
|
||||
avs_read(0) <= avs_m.mm_read and sel_slave_0;
|
||||
avs_read(1) <= avs_m.mm_read and sel_slave_1;
|
||||
avs_address <= avs_m.mm_address(avs_address'range);
|
||||
avs_write(AVS_ADDR_DUT) <= avs_m.mm_write and sel_slave_DUT;
|
||||
avs_write(AVS_ADDR_TB_POFTX) <= avs_m.mm_write and sel_slave_TB_POFTX;
|
||||
avs_writedata <= avs_m.mm_writedata;
|
||||
avs_read(AVS_ADDR_DUT) <= avs_m.mm_read and sel_slave_DUT;
|
||||
avs_read(AVS_ADDR_TB_POFTX) <= avs_m.mm_read and sel_slave_TB_POFTX;
|
||||
|
||||
-- Emulator Avalon bus maapings
|
||||
emul_s.mm_readdata <= emul_readdata;
|
||||
|
|
|
|||
|
|
@ -113,6 +113,10 @@ package fire_pulse_manager_7_one_tb_pkg is
|
|||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t);
|
||||
|
||||
procedure fpm_init(
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t);
|
||||
|
||||
procedure fpm_input_config(
|
||||
input_type : in fpm_input_type_t;
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
|
|
@ -452,6 +456,44 @@ package body fire_pulse_manager_7_one_tb_pkg is
|
|||
|
||||
end procedure pulse_gen_config;
|
||||
|
||||
|
||||
procedure fpm_init(
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t) is
|
||||
|
||||
variable data : std_logic_vector(31 downto 0) := (others => '0');
|
||||
|
||||
begin
|
||||
|
||||
-- Set the init_start bit
|
||||
data(0) := '1';
|
||||
fpm_reg_write(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_START_ADDR, data, mm_s, mm_m);
|
||||
|
||||
wait for 1 us;
|
||||
-- ReSet the init_start bit
|
||||
data(0) := '0';
|
||||
fpm_reg_write(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_START_ADDR, data, mm_s, mm_m);
|
||||
|
||||
for i in 1 to 10 loop
|
||||
-- Check if init is complete
|
||||
fpm_reg_read(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_DONE_ADDR, data, mm_s, mm_m);
|
||||
if data(0) = '1' then
|
||||
exit;
|
||||
else
|
||||
wait for 300 ns;
|
||||
end if;
|
||||
|
||||
end loop;
|
||||
|
||||
if data(0) = '1' then
|
||||
log("FPM INIT completed", VMEDIUM, true);
|
||||
else
|
||||
log("ERROR: FPM INIT never completed", V_LOW, true);
|
||||
wait for 2 us;
|
||||
end if;
|
||||
|
||||
end procedure fpm_init;
|
||||
|
||||
procedure fpm_input_config(
|
||||
input_type : in fpm_input_type_t;
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
-- Standard : VHDL'08
|
||||
-------------------------------------------------------------------------------
|
||||
-- Description:
|
||||
-- Testbench for fire pulse manager block
|
||||
-- Testbench for fire pulse manager block with protocol version zero
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
library ieee;
|
||||
|
|
@ -37,7 +37,10 @@ end fire_pulse_manager_7_tb;
|
|||
|
||||
architecture behav of fire_pulse_manager_7_tb is
|
||||
|
||||
constant DEV_NUM : integer := 2;
|
||||
constant NUM_AVS_DEVICES : integer := 2;
|
||||
|
||||
constant AVS_ADDR_DUT : integer := 0;
|
||||
constant AVS_ADDR_TB_POFTX : integer := 1;
|
||||
|
||||
constant RX_CLK_PERIOD : time := CLK_PERIOD / 3; -- clock period for used by the
|
||||
-- UART-Rx on the POF
|
||||
|
|
@ -72,86 +75,84 @@ architecture behav of fire_pulse_manager_7_tb is
|
|||
signal ch_fire_pulse : fire_pulse_t;
|
||||
signal ch_start_of_image : fire_pulse_t;
|
||||
|
||||
type avs_read_bus_t is array (0 to DEV_NUM - 1) of std_logic_vector(31 downto 0);
|
||||
type avs_read_bus_t is array (0 to NUM_AVS_DEVICES - 1) of std_logic_vector(31 downto 0);
|
||||
|
||||
signal reset_n : std_logic := '0';
|
||||
signal clk : std_logic := '0';
|
||||
signal rx_clk : std_logic := '0';
|
||||
signal pof_tx, pof_rx : std_logic;
|
||||
signal fire_pulse : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal start_of_image : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal avs_address : std_logic_vector(14 downto 0);
|
||||
signal avs_write : std_logic_vector(DEV_NUM - 1 downto 0);
|
||||
signal avs_writedata : std_logic_vector(31 downto 0);
|
||||
signal avs_read : std_logic_vector(DEV_NUM - 1 downto 0);
|
||||
signal avs_readdata : avs_read_bus_t;
|
||||
signal reset_n : std_logic := '0';
|
||||
signal clk : std_logic := '0';
|
||||
signal rx_clk : std_logic := '0';
|
||||
signal dut_pof_tx, dut_pof_rx : std_logic; -- pof signals in and out of fpm. This TB does not check fpm output POF signal except as DW
|
||||
signal fire_pulse : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal start_of_image : std_logic_vector(32 * CH_NUM - 1 downto 0);
|
||||
signal avs_address : std_logic_vector(14 downto 0);
|
||||
signal avs_write : std_logic_vector(NUM_AVS_DEVICES - 1 downto 0);
|
||||
signal avs_writedata : std_logic_vector(31 downto 0);
|
||||
signal avs_read : std_logic_vector(NUM_AVS_DEVICES - 1 downto 0);
|
||||
signal avs_readdata : avs_read_bus_t;
|
||||
--
|
||||
signal init_tx : std_logic;
|
||||
signal inc_pos : std_logic;
|
||||
signal dec_pos : std_logic;
|
||||
signal abs_position : std_logic_vector(31 downto 0);
|
||||
signal tx_data : std_logic;
|
||||
signal pof_tx_avs_rv : std_logic;
|
||||
signal pof_tx_avs_we_d : std_logic;
|
||||
signal enc_p1 : std_logic;
|
||||
signal enc_p2 : std_logic;
|
||||
signal pd : std_logic;
|
||||
signal seb_epd_enc_p1 : std_logic;
|
||||
signal seb_epd_enc_p2 : std_logic;
|
||||
signal seb_epd_pd : std_logic;
|
||||
signal tb_fpm_init_tx : std_logic;
|
||||
signal inc_pos : std_logic;
|
||||
signal dec_pos : std_logic;
|
||||
signal abs_position : std_logic_vector(31 downto 0);
|
||||
signal pof_tx_to_DUT_tx_data : std_logic;
|
||||
signal enc_p1 : std_logic;
|
||||
signal enc_p2 : std_logic;
|
||||
signal pd : std_logic;
|
||||
signal seb_epd_enc_p1 : std_logic;
|
||||
signal seb_epd_enc_p2 : std_logic;
|
||||
signal seb_epd_pd : std_logic;
|
||||
--
|
||||
signal emul_address : std_logic_vector(9 downto 0);
|
||||
signal emul_write : std_logic;
|
||||
signal emul_writedata : std_logic_vector(31 downto 0);
|
||||
signal emul_read : std_logic;
|
||||
signal emul_readdata : std_logic_vector(31 downto 0);
|
||||
signal emul_inc_pos : std_logic;
|
||||
signal emul_dec_pos : std_logic;
|
||||
signal emul_pos : std_logic_vector(39 downto 0);
|
||||
signal emul_address : std_logic_vector(9 downto 0);
|
||||
signal emul_write : std_logic;
|
||||
signal emul_writedata : std_logic_vector(31 downto 0);
|
||||
signal emul_read : std_logic;
|
||||
signal emul_readdata : std_logic_vector(31 downto 0);
|
||||
signal emul_pos : std_logic_vector(39 downto 0);
|
||||
--
|
||||
signal enc_dir : enc_dir_t;
|
||||
signal swathe_cnt : integer;
|
||||
signal half_swathe_cnt : integer;
|
||||
signal swathe_pos : integer;
|
||||
signal end_of_swathe : std_logic;
|
||||
signal test_completed : boolean;
|
||||
signal running : boolean;
|
||||
signal configuring : boolean;
|
||||
signal passed : boolean;
|
||||
signal failed : boolean;
|
||||
signal stimuli_completed : boolean;
|
||||
signal enc_dir : enc_dir_t;
|
||||
signal swathe_cnt : integer;
|
||||
signal half_swathe_cnt : integer;
|
||||
signal swathe_pos : integer;
|
||||
signal end_of_swathe : std_logic;
|
||||
signal test_completed : boolean;
|
||||
signal running : boolean;
|
||||
signal configuring : boolean;
|
||||
signal passed : boolean;
|
||||
signal failed : boolean;
|
||||
signal stimuli_completed : boolean;
|
||||
--
|
||||
shared variable error_flag : boolean;
|
||||
shared variable error_flag : boolean;
|
||||
|
||||
signal registers_read : boolean := false;
|
||||
signal reprogram_offset : boolean := false;
|
||||
signal registers_read : boolean := false;
|
||||
signal reprogram_offset : boolean := false;
|
||||
--
|
||||
signal avs_m : mm_m_rec_t;
|
||||
signal avs_s : mm_s_rec_t;
|
||||
signal sel_slave_0 : std_logic;
|
||||
signal sel_slave_1 : std_logic;
|
||||
signal emul_s : mm_s_rec_t;
|
||||
signal emul_m : mm_m_rec_t;
|
||||
signal avs_m : mm_m_rec_t;
|
||||
signal avs_s : mm_s_rec_t;
|
||||
signal sel_slave_DUT : std_logic;
|
||||
signal sel_slave_TB_POFTX : std_logic;
|
||||
signal emul_s : mm_s_rec_t;
|
||||
signal emul_m : mm_m_rec_t;
|
||||
--
|
||||
type pd_cnt_t is array (0 to CH_NUM - 1) of integer;
|
||||
signal pd_cnt : pd_cnt_t;
|
||||
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;
|
||||
signal loc_fp_cnt : fp_cnt_t;
|
||||
signal rst_fp_cnt : std_logic;
|
||||
signal ch_pulse_out : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_pulse_out_d : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_start_of_img : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal fp_cnt : fp_cnt_t;
|
||||
signal loc_fp_cnt : fp_cnt_t;
|
||||
signal rst_fp_cnt : std_logic;
|
||||
signal ch_pulse_out : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_pulse_out_d : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
signal ch_start_of_img : std_logic_vector(CH_NUM - 1 downto 0);
|
||||
--
|
||||
signal run_dw : std_logic;
|
||||
signal dw : std_logic;
|
||||
signal dw_d : std_logic;
|
||||
signal dw_cnt : natural;
|
||||
signal run_dw : std_logic;
|
||||
signal dw : std_logic;
|
||||
signal dw_d : std_logic;
|
||||
signal dw_cnt : natural;
|
||||
--
|
||||
signal input_mode : fpm_input_type_t;
|
||||
signal input_mode : fpm_input_type_t;
|
||||
--
|
||||
signal ext_pulse : std_logic;
|
||||
signal ext_pulse_enable : std_logic;
|
||||
signal ext_pulse : std_logic;
|
||||
signal ext_pulse_enable : std_logic;
|
||||
signal tb_fpm_init_done : std_logic;
|
||||
signal fpm_print_start_rx : std_logic;
|
||||
|
||||
|
||||
begin -- behav
|
||||
|
|
@ -175,7 +176,6 @@ begin -- behav
|
|||
-----------------------------------------------------------------------------
|
||||
-- DUTs : Fire Pulse Manager
|
||||
-----------------------------------------------------------------------------
|
||||
-- FIXME test FPM with pof protocol version 1
|
||||
iDUT : entity work.fire_pulse_manager_7
|
||||
generic map(
|
||||
SEB_EPD_MODE => true,
|
||||
|
|
@ -184,25 +184,26 @@ begin -- behav
|
|||
reset_n => reset_n,
|
||||
clk => clk,
|
||||
rx_clk => rx_clk,
|
||||
pof_rx => pof_rx,
|
||||
pof_tx => pof_tx,
|
||||
pof_rx => dut_pof_rx,
|
||||
pof_tx => dut_pof_tx,
|
||||
seb_epd_enc_p1 => seb_epd_enc_p1,
|
||||
seb_epd_enc_p2 => seb_epd_enc_p2,
|
||||
seb_epd_pd => seb_epd_pd,
|
||||
fire_pulse => fire_pulse,
|
||||
start_of_image => start_of_image,
|
||||
print_start => fpm_print_start_rx,
|
||||
mon_pt => open,
|
||||
ins_fpm_irq_0 => open,
|
||||
ins_fpm_irq_1 => open,
|
||||
ins_fpm_irq_2 => open,
|
||||
ins_fpm_irq_3 => open,
|
||||
avs_address => avs_address,
|
||||
avs_write => avs_write(0),
|
||||
avs_write => avs_write(AVS_ADDR_DUT),
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read(0),
|
||||
avs_readdata => avs_readdata(0));
|
||||
avs_read => avs_read(AVS_ADDR_DUT),
|
||||
avs_readdata => avs_readdata(AVS_ADDR_DUT));
|
||||
|
||||
pof_rx <= transport tx_data after POF_DELAY when ext_pulse_enable = '0' else ext_pulse;
|
||||
dut_pof_rx <= transport pof_tx_to_DUT_tx_data after POF_DELAY when ext_pulse_enable = '0' else ext_pulse;
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Split subpixel phases
|
||||
|
|
@ -264,20 +265,23 @@ begin -- behav
|
|||
iPOF_TX : entity work.pof_tx_2
|
||||
|
||||
port map(
|
||||
pof_protocol_version => '0',
|
||||
reset_n => reset_n,
|
||||
clk => clk,
|
||||
init => init_tx,
|
||||
init => tb_fpm_init_tx,
|
||||
init_done => tb_fpm_init_done,
|
||||
pd_in => pd,
|
||||
print_start => open,
|
||||
pof_protocol_version => '0',
|
||||
inc_pos => inc_pos,
|
||||
dec_pos => dec_pos,
|
||||
abs_position => abs_position,
|
||||
tx_data => tx_data,
|
||||
tx_data => pof_tx_to_DUT_tx_data,
|
||||
avs_address => avs_address(2 downto 0),
|
||||
avs_write => avs_write(1),
|
||||
avs_write => avs_write(AVS_ADDR_TB_POFTX),
|
||||
avs_writedata => avs_writedata,
|
||||
avs_read => avs_read(1),
|
||||
avs_readdata => avs_readdata(1));
|
||||
avs_read => avs_read(AVS_ADDR_TB_POFTX),
|
||||
avs_readdata => avs_readdata(AVS_ADDR_TB_POFTX)
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Stimuli Generation
|
||||
|
|
@ -292,7 +296,7 @@ begin -- behav
|
|||
begin
|
||||
|
||||
-- initialization
|
||||
init_tx <= '0';
|
||||
tb_fpm_init_tx <= '0';
|
||||
enc_dir <= START_DIR;
|
||||
swathe_pos <= 0;
|
||||
--
|
||||
|
|
@ -312,11 +316,14 @@ begin -- behav
|
|||
-- Set the initial absolute-position for the encoder emulator
|
||||
set_enc_abs_pos(40x"0", emul_s, emul_m);
|
||||
|
||||
-- Send a Init/Sync pulse to the POF-Tx
|
||||
-- Send a Init/Sync pulse to the POF-Tx in the test bench
|
||||
wait until clk = '1' and clk'event;
|
||||
init_tx <= '1';
|
||||
tb_fpm_init_tx <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
init_tx <= '0';
|
||||
tb_fpm_init_tx <= '0';
|
||||
wait until rising_edge(tb_fpm_init_done);
|
||||
log("test bench's init_tx complete (sends init message to UUT over POF)", VMEDIUM);
|
||||
|
||||
wait for 500 ns;
|
||||
|
||||
--
|
||||
|
|
@ -329,6 +336,8 @@ begin -- behav
|
|||
ch_offset(i) <= rv.RandInt(0, 199);
|
||||
--ch_offset(i) <= 50;
|
||||
end loop;
|
||||
|
||||
-- handshake with pUUT_CTRL
|
||||
reprogram_offset <= true;
|
||||
wait until configuring = true;
|
||||
reprogram_offset <= false;
|
||||
|
|
@ -344,7 +353,7 @@ begin -- behav
|
|||
log("Running Swathe " & to_string(swathe_cnt + 1) & ", DIR-1.", VMEDIUM);
|
||||
end if;
|
||||
|
||||
-- issue a PD to start firing
|
||||
-- issue a PD to start periodic firing after a randomly selected initial offset
|
||||
pd_pos := rv.RandInt(0, 49);
|
||||
--pd_pos := 10;
|
||||
for k in 1 to pd_pos loop
|
||||
|
|
@ -361,20 +370,26 @@ begin -- behav
|
|||
|
||||
wait for 25 us;
|
||||
half_swathe_cnt <= half_swathe_cnt + 1;
|
||||
|
||||
-- Signal to pOUT_CHECK_REGs
|
||||
wait until clk = '1' and clk'event;
|
||||
end_of_swathe <= '1';
|
||||
end_of_swathe <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
end_of_swathe <= '0';
|
||||
end_of_swathe <= '0';
|
||||
|
||||
-- reverse direction
|
||||
if (enc_dir /= START_DIR) then
|
||||
-- The number of iterations is doubled, to take into account POF and
|
||||
-- EPD input types
|
||||
if (swathe_cnt = 2 * NUM_ITERATIONS - 1) then
|
||||
end_of_stimuli := true;
|
||||
-- **************************************************************************
|
||||
end_of_stimuli := true; -- This will terminate the loop of swathe generations
|
||||
-- **************************************************************************
|
||||
else
|
||||
swathe_cnt <= swathe_cnt + 1;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
if (end_of_stimuli = false) then
|
||||
wait until clk = '1' and clk'event;
|
||||
if (enc_dir = DIR_0) then
|
||||
|
|
@ -382,6 +397,7 @@ begin -- behav
|
|||
else
|
||||
enc_dir <= DIR_0;
|
||||
end if;
|
||||
|
||||
-- Wait some time to make sure the change of direction is transmitted.
|
||||
-- Note: if the position starts changing before the receiver was able to
|
||||
-- confirm the change of direction, then some encoder pulses may not be
|
||||
|
|
@ -391,6 +407,7 @@ begin -- behav
|
|||
end if;
|
||||
end loop; -- end_of_stimuli = false
|
||||
|
||||
-- Signal to pTB_CTRL and pUUT_CTRL
|
||||
stimuli_completed <= true;
|
||||
wait;
|
||||
|
||||
|
|
@ -425,7 +442,7 @@ begin -- behav
|
|||
-- Testbench Control
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
dw <= pof_tx when run_dw = '1' else '0';
|
||||
dw <= dut_pof_tx when run_dw = '1' else '0';
|
||||
|
||||
pOUT_CHECK_REGs : process(reset_n, clk)
|
||||
begin
|
||||
|
|
@ -543,9 +560,16 @@ begin -- behav
|
|||
end if;
|
||||
|
||||
if (registers_read = false) then
|
||||
-- Signal from pUUT_CTRL
|
||||
wait until registers_read = true;
|
||||
end if;
|
||||
|
||||
-- check print_start has stayed high
|
||||
if fpm_print_start_rx'last_event < (now - 500 ns) then
|
||||
log("Print Start last event : " & time'image(fpm_print_start_rx'last_event), VLOW, true);
|
||||
error_flag := true;
|
||||
end if;
|
||||
|
||||
-- Report PD and FP counter from pulse generator
|
||||
for i in 0 to CH_NUM - 1 loop
|
||||
log("Channel CH" & integer'image(i) & " PD-in counter value : " & integer'image(pd_cnt(i)) & " ... ", VLOW, true);
|
||||
|
|
@ -599,10 +623,10 @@ begin -- behav
|
|||
variable data : std_logic_vector(31 downto 0) := (others => '0');
|
||||
|
||||
begin
|
||||
sel_slave_0 <= '0';
|
||||
sel_slave_1 <= '0';
|
||||
rst_fp_cnt <= '0';
|
||||
configuring <= true;
|
||||
sel_slave_DUT <= '0';
|
||||
sel_slave_TB_POFTX <= '0';
|
||||
rst_fp_cnt <= '0';
|
||||
configuring <= true;
|
||||
|
||||
input_mode <= POF_INPUT;
|
||||
|
||||
|
|
@ -623,22 +647,23 @@ begin -- behav
|
|||
ext_pulse_enable <= '0';
|
||||
wait for 1 us;
|
||||
wait until clk = '1' and clk'event;
|
||||
-- signal to pOUT_CHECK_REGs to reset its own count
|
||||
rst_fp_cnt <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
rst_fp_cnt <= '0';
|
||||
|
||||
log("Configuring POFTX ... ", VLOW, true);
|
||||
sel_slave_1 <= '1';
|
||||
sel_slave_TB_POFTX <= '1';
|
||||
-- enable the block
|
||||
addr := std_logic_vector(to_unsigned(0, 32));
|
||||
data := X"0000_0021";
|
||||
addr := std_logic_vector(to_unsigned(0, 32));
|
||||
data := X"0000_0021";
|
||||
mm_32b_write(addr, data, avs_s, avs_m);
|
||||
|
||||
sel_slave_1 <= '0';
|
||||
sel_slave_0 <= '1';
|
||||
sel_slave_TB_POFTX <= '0';
|
||||
sel_slave_DUT <= '1';
|
||||
wait until clk = '1' and clk'event;
|
||||
|
||||
log("Configuring FPM ... ", VLOW, true);
|
||||
log("Configuring FPM (DUT) ... ", VLOW, true);
|
||||
|
||||
fpm_ctrl_config(avs_s, avs_m);
|
||||
|
||||
|
|
@ -716,8 +741,15 @@ begin -- behav
|
|||
wait until clk = '1' and clk'event;
|
||||
log("CH-" & to_string(i) & ": pd_in_cnt = " & to_string(pd_cnt(i)) & ", fire_req_cnt = " & to_string(fp_cnt(i)), VMEDIUM);
|
||||
end loop;
|
||||
-- As a check that init can be sent safely. Needs visual inspection of transcript and waveform
|
||||
fpm_init(avs_s, avs_m);
|
||||
|
||||
wait for 1 us;
|
||||
fpm_init(avs_s, avs_m);
|
||||
|
||||
wait for 1 us;
|
||||
registers_read <= true;
|
||||
|
||||
|
||||
wait;
|
||||
end process pUUT_CTRL;
|
||||
|
|
@ -725,19 +757,19 @@ begin -- behav
|
|||
clk_clk <= clk;
|
||||
reset_reset_n <= reset_n;
|
||||
|
||||
avs_s.mm_readdata <= avs_readdata(0) when sel_slave_0 = '1' else
|
||||
avs_readdata(1) when sel_slave_1 = '1' else (others => '0');
|
||||
avs_s.mm_readdata <= avs_readdata(AVS_ADDR_DUT) when sel_slave_DUT = '1' else
|
||||
avs_readdata(AVS_ADDR_TB_POFTX) when sel_slave_TB_POFTX = '1' else (others => '0');
|
||||
|
||||
avs_s.mm_readdatavalid <= '0';
|
||||
|
||||
avs_s.mm_waitrequest <= '0';
|
||||
|
||||
avs_address <= avs_m.mm_address(avs_address'range);
|
||||
avs_write(0) <= avs_m.mm_write and sel_slave_0;
|
||||
avs_write(1) <= avs_m.mm_write and sel_slave_1;
|
||||
avs_writedata <= avs_m.mm_writedata;
|
||||
avs_read(0) <= avs_m.mm_read and sel_slave_0;
|
||||
avs_read(1) <= avs_m.mm_read and sel_slave_1;
|
||||
avs_address <= avs_m.mm_address(avs_address'range);
|
||||
avs_write(AVS_ADDR_DUT) <= avs_m.mm_write and sel_slave_DUT;
|
||||
avs_write(AVS_ADDR_TB_POFTX) <= avs_m.mm_write and sel_slave_TB_POFTX;
|
||||
avs_writedata <= avs_m.mm_writedata;
|
||||
avs_read(AVS_ADDR_DUT) <= avs_m.mm_read and sel_slave_DUT;
|
||||
avs_read(AVS_ADDR_TB_POFTX) <= avs_m.mm_read and sel_slave_TB_POFTX;
|
||||
|
||||
-- Emulator Avalon bus maapings
|
||||
emul_s.mm_readdata <= emul_readdata;
|
||||
|
|
|
|||
|
|
@ -113,6 +113,10 @@ package fire_pulse_manager_7_tb_pkg is
|
|||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t);
|
||||
|
||||
procedure fpm_init(
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t);
|
||||
|
||||
procedure fpm_input_config(
|
||||
input_type : in fpm_input_type_t;
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
|
|
@ -451,6 +455,44 @@ package body fire_pulse_manager_7_tb_pkg is
|
|||
fpm_reg_write(PG_CH_ID + ch_id, work.pulse_generator_5_pkg.CSR_CHANNEL_CONTROLLER_CONTROL_W_ADDR, data, mm_s, mm_m);
|
||||
|
||||
end procedure pulse_gen_config;
|
||||
|
||||
|
||||
procedure fpm_init(
|
||||
signal mm_s : in mm_s_rec_t;
|
||||
signal mm_m : out mm_m_rec_t) is
|
||||
|
||||
variable data : std_logic_vector(31 downto 0) := (others => '0');
|
||||
|
||||
begin
|
||||
|
||||
-- Set the init_start bit
|
||||
data(0) := '1';
|
||||
fpm_reg_write(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_START_ADDR, data, mm_s, mm_m);
|
||||
|
||||
wait for 1 us;
|
||||
-- ReSet the init_start bit
|
||||
data(0) := '0';
|
||||
fpm_reg_write(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_START_ADDR, data, mm_s, mm_m);
|
||||
|
||||
for i in 1 to 10 loop
|
||||
-- Check if init is complete
|
||||
fpm_reg_read(FP_CTRL_ID, work.fpm_ctrl_7_pkg.CSR_FPM_INIT_DONE_ADDR, data, mm_s, mm_m);
|
||||
if data(0) = '1' then
|
||||
exit;
|
||||
else
|
||||
wait for 300 ns;
|
||||
end if;
|
||||
|
||||
end loop;
|
||||
|
||||
if data(0) = '1' then
|
||||
log("FPM INIT completed", VMEDIUM, true);
|
||||
else
|
||||
log("ERROR: FPM INIT never completed", V_LOW, true);
|
||||
wait for 2 us;
|
||||
end if;
|
||||
|
||||
end procedure fpm_init;
|
||||
|
||||
procedure fpm_input_config(
|
||||
input_type : in fpm_input_type_t;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
"type": "w",
|
||||
"bit_len": "1",
|
||||
"reset": "0x0",
|
||||
"description": "Enables queuing up events in the POF-Tx FIFO, each time there is a change in Print-Start value. Only used when PROTOCOL_VERSION=1"
|
||||
"description": "Enables queuing up events in the POF-Tx FIFO, each time there is a change in Print-Start value. Otherwise block only transmits on next enc/PD event or keepalive. Leaving at zero does NOT stop print_start being communicated - change the selector to SW to force a value. Only used when PROTOCOL_VERSION=1."
|
||||
},
|
||||
"print_start_src": {
|
||||
"type": "w",
|
||||
|
|
|
|||
|
|
@ -254,7 +254,6 @@ begin
|
|||
gen_print_start : process(all) is
|
||||
begin
|
||||
if pof_protocol_version = '0' then
|
||||
ps_gen <= '0';
|
||||
ps_confirmed <= '0';
|
||||
print_start <= '0';
|
||||
|
||||
|
|
@ -262,7 +261,6 @@ begin
|
|||
rx_symbol_val <= rx_symbol_val_0;
|
||||
rx_error <= rx_error_0;
|
||||
else
|
||||
ps_gen <= '1' when symbol_valid_i = '1' and symbol(7) /= print_start_i else '0';
|
||||
ps_confirmed <= ps_gen and ps_test;
|
||||
print_start <= print_start_i;
|
||||
|
||||
|
|
@ -271,6 +269,7 @@ begin
|
|||
rx_error <= rx_error_1;
|
||||
end if;
|
||||
end process gen_print_start;
|
||||
ps_gen <= '1' when (pof_protocol_version = '1' and symbol_valid_i = '1' and symbol(7) /= print_start_i) else '0';
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Position management & Error Recovery
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue