| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- import_device ef2_4.db -package EF2L45BG256B
- set_param rtl directive:async_reg on
- set_param place async_reg on
- analyze -file {src/rtl/uart_rx_8n1.v}
- analyze -file {src/rtl/uart_tx_8n1.v}
- analyze -file {src/rtl/binary921_crc16.v}
- analyze -file {src/rtl/binary921_frame_tx.v}
- analyze -file {src/rtl/prod2u_por.v}
- analyze -file {src/rtl/prod2u_p4_us_tick.v}
- analyze -file {src/rtl/prod2u_p4_normal_v3_rx.v}
- analyze -file {src/rtl/prod2u_p4_normal_v3_output_state.v}
- analyze -file {src/rtl/prod2u_p4_normal_v3_watchdog.v}
- analyze -file {src/rtl/prod2u_p4_axis_executor.v}
- analyze -file {src/rtl/prod2u_p4_motor_hub.v}
- analyze -file {src/rtl/prod2u_p4_response_scheduler.v}
- analyze -file {src/rtl/prod2u_p4_i2c_stop_start_read.v}
- analyze -file {src/rtl/prod2u_p4_temperature_read.v}
- analyze -file {src/rtl/prod2u_p4_temperature_store.v}
- analyze -file {src/rtl/prod2u_p4_temperature_short_tx.v}
- analyze -file {src/rtl/prod2u_p4_normal_v3_tx.v}
- analyze -file {src/rtl/prod2u_p4_pwm_outputs.v}
- analyze -file {src/rtl/prod2u_p4_normal_v3_core.v}
- analyze -file {src/top/prod2u_p4_normal_v3_top.v}
- elaborate -top {prod2u_p4_normal_v3_top}
- read_adc {constraints/prod2u_p4_normal_v3.adc}
- read_sdc {constraints/prod2u_p4_normal_v3.sdc}
- optimize_rtl
- proc p4_find_unique_regs {patterns} {
- set matches {}
- foreach pattern $patterns {
- foreach reg [get_regs -quiet $pattern] {
- if {[lsearch -exact $matches $reg] < 0} {
- lappend matches $reg
- }
- }
- }
- return $matches
- }
- set cdc_groups {
- u_uart_rx/rx_sync_pipe[0] {{u_uart_rx/rx_sync_pipe[0]} {*/u_uart_rx/rx_sync_pipe[0]}}
- u_uart_rx/rx_sync_pipe[1] {{u_uart_rx/rx_sync_pipe[1]} {*/u_uart_rx/rx_sync_pipe[1]}}
- u_temperature_i2c/scl_sync[0] {{u_temperature_i2c/scl_sync[0]} {*/u_temperature_i2c/scl_sync[0]}}
- u_temperature_i2c/scl_sync[1] {{u_temperature_i2c/scl_sync[1]} {*/u_temperature_i2c/scl_sync[1]}}
- u_temperature_i2c/sda_sync[0] {{u_temperature_i2c/sda_sync[0]} {*/u_temperature_i2c/sda_sync[0]}}
- u_temperature_i2c/sda_sync[1] {{u_temperature_i2c/sda_sync[1]} {*/u_temperature_i2c/sda_sync[1]}}
- }
- set cdc_report [open {prod2u_p4_normal_v3_cdc.rpt} w]
- puts $cdc_report {schema=prod2u-p4-normal-v3-cdc-v2}
- set cdc_failures {}
- set cdc_regs {}
- array set cdc_actual_by_normalized {}
- foreach {normalized patterns} $cdc_groups {
- set matches [p4_find_unique_regs $patterns]
- if {[llength $matches] != 1} {
- set reason "retained_sync_register_count:$normalized:[llength $matches]"
- lappend cdc_failures $reason
- puts $cdc_report "structural_failure=$reason"
- } else {
- set reg [lindex $matches 0]
- set cdc_actual_by_normalized($normalized) $reg
- lappend cdc_regs $reg
- puts $cdc_report "retained_sync_register=$normalized"
- }
- }
- if {[llength $cdc_regs] != 6} {
- set reason "retained_sync_register_total:[llength $cdc_regs]"
- lappend cdc_failures $reason
- puts $cdc_report "structural_failure=$reason"
- }
- if {[llength $cdc_regs] > 0} {
- set_property async_reg true $cdc_regs
- }
- set cdc_input_pairs {
- host_uart_rx u_uart_rx/rx_sync_pipe[0]
- temp_scl u_temperature_i2c/scl_sync[0]
- temp_sda u_temperature_i2c/sda_sync[0]
- }
- set cdc_false_path_pairs {}
- foreach {source_port normalized} $cdc_input_pairs {
- set source_matches [get_ports -quiet $source_port]
- if {[llength $source_matches] != 1} {
- set reason "asynchronous_input_port_count:$source_port:[llength $source_matches]"
- lappend cdc_failures $reason
- puts $cdc_report "structural_failure=$reason"
- continue
- }
- set source [lindex $source_matches 0]
- if {[info exists cdc_actual_by_normalized($normalized)]} {
- set endpoint $cdc_actual_by_normalized($normalized)
- lappend cdc_false_path_pairs [list $source $endpoint]
- puts $cdc_report "false_path_endpoint=$normalized"
- } else {
- set reason "first_stage_endpoint_count:$source_port:$normalized:0"
- lappend cdc_failures $reason
- puts $cdc_report "structural_failure=$reason"
- }
- }
- close $cdc_report
- if {[llength $cdc_failures] == 0} {
- puts {CDC_GATE_PASS=1}
- } else {
- puts "CDC_GATE_FAIL=[llength $cdc_failures]"
- error "PROD2U_P4_NORMAL_V3_CDC_GATE_FAIL:[join $cdc_failures ,]"
- }
- report_area -file prod2u_p4_normal_v3_rtl.area
- export_db prod2u_p4_normal_v3_rtl.db
- set_param gate opt_area high
- set_param gate pack_effort high
- optimize_gate prod2u_p4_normal_v3_gate.area
- set phase_groups {
- x {{u_core/u_motors/u_x_axis/motion_phase*} {*/u_core/u_motors/u_x_axis/motion_phase*}}
- y {{u_core/u_motors/u_y_axis/motion_phase*} {*/u_core/u_motors/u_y_axis/motion_phase*}}
- }
- set fsm_report [open {prod2u_p4_normal_v3_fsm_encoding.rpt} w]
- puts $fsm_report {schema=prod2u-p4-normal-v3-fsm-encoding-v2}
- set fsm_failures {}
- foreach {axis patterns} $phase_groups {
- set matches {}
- set normalized_matches {}
- set phase_regexp [format {(u_core/u_motors/u_%s_axis/motion_phase\[[0-1]\])$} $axis]
- foreach candidate [p4_find_unique_regs $patterns] {
- if {[regexp $phase_regexp $candidate -> normalized]} {
- lappend matches $candidate
- if {[lsearch -exact $normalized_matches $normalized] < 0} {
- lappend normalized_matches $normalized
- }
- }
- }
- if {[llength $matches] != 2 || [llength $normalized_matches] != 2} {
- puts $fsm_report "motion_phase=${axis}:[llength $matches]:unknown"
- set reason "motion_phase_register_count:$axis:[llength $matches]:normalized:[llength $normalized_matches]"
- lappend fsm_failures $reason
- puts $fsm_report "structural_failure=$reason"
- } else {
- puts $fsm_report "motion_phase=${axis}:[llength $matches]:sequential"
- }
- }
- close $fsm_report
- if {[llength $fsm_failures] == 0} {
- puts {FSM_ENCODING_GATE_PASS=sequential}
- } else {
- puts "FSM_ENCODING_GATE_FAIL=[llength $fsm_failures]"
- error "PROD2U_P4_NORMAL_V3_FSM_ENCODING_GATE_FAIL:[join $fsm_failures ,]"
- }
- report_area -io_info -file prod2u_p4_normal_v3_gate.area
- report_qor -step gate -file prod2u_p4_normal_v3_gate.qor
- legalize_phy_inst
- export_db prod2u_p4_normal_v3_gate.db
- foreach cdc_false_path_pair $cdc_false_path_pairs {
- lassign $cdc_false_path_pair source endpoint
- set_false_path -from $source -to $endpoint
- }
- update_timing
- report_timing_summary -file prod2u_p4_normal_v3_gate.timing
|