나는 다음을 포함하는 파일을 가지고 있습니다: (콜론) 아래와 같이 델리 테이블로, 파일에는 ##으로 시작하는 몇 가지 주석이 포함되어 있습니다.
##No sync
no_sync:start:Async:SingleChainSdo:end:tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_JTAG1500BC_SWB_0.I_SWB_Shift.I_ShTDR[0].Qreg:IP_WRCK
yes_sync:start:Async:SingleChainSdo:end:tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_stac_pipeline_Wso.I_PIPELINE_POSEDGE.Qreg:IP_WRCK
##TDR will be static during functional operation
Rev:start:MTAP_Wrck:tile_dfx.dft_clk_cntl_Cpl_SMNCLK.clk_cntl_tdr.reg_CLK_CNTL.DFT_TDRUPDATEREG.q[3:1]:end:tile_dfx.dft_clk_cntl_Cpl_SMNCLK.dft_gater_aon:SMNCLK
Note: In column $4 we have the value "tile_dfx.dft_clk_cntl_Cpl_SMNCLK.clk_cntl_tdr.reg_CLK_CNTL.DFT_TDRUPDATEREG.q[3:1]" where :(colon) is available here need to ignore colon in []..In some values column $5 also it will repeat
나는 이 코드를 시도했습니다:
#!/bin/bash
awk -F: '/^[^#]/ {print "adc report item -status waived -scheme" " "$1, "-from" " ""{"$4"}", "-to" " ""{"$6"}", "-tx_clock" " "$3, "-rx_clock" " "$7 }' vio.s
내가 얻는 결과 :
adc report item -status waived -scheme no_sync -from {SingleChainSdo} -to {tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_JTAG1500BC_SWB_0.I_SWB_Shift.I_ShTDR[0].Qreg} -tx_clock Async -rx_clock IP_WRCK
adc report item -status waived -scheme yes_sync -from {SingleChainSdo} -to {tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_stac_pipeline_Wso.I_PIPELINE_POSEDGE.Qreg} -tx_clock Async -rx_clock IP_WRCK
adc report item -status waived -scheme Rev -from {tile_dfx.dft_clk_cntl_Cpl_SMNCLK.clk_cntl_tdr.reg_CLK_CNTL.DFT_TDRUPDATEREG.q[3} -to {end} -tx_clock MTAP_Wrck -rx_clock tile_dfx.dft_clk_cntl_Cpl_SMNCLK.dft_gater_aon
실제 출력:
adc report item -status waived -scheme no_sync -from {SingleChainSdo} -to {tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_JTAG1500BC_SWB_0.I_SWB_Shift.I_ShTDR[0].Qreg} -tx_clock Async -rx_clock IP_WRCK
adc report item -status waived -scheme yes_sync -from {SingleChainSdo} -to {tile_dfx.sdc_ch_pcie_bot_lft_STAC.I_stac_pipeline_Wso.I_PIPELINE_POSEDGE.Qreg} -tx_clock Async -rx_clock IP_WRCK
adc report item -status waived -scheme Rev -from {tile_dfx.dft_clk_cntl_Cpl_SMNCLK.clk_cntl_tdr.reg_CLK_CNTL.DFT_TDRUPDATEREG.q[3:1]} -to {tile_dfx.dft_clk_cntl_Cpl_SMNCLK.dft_gater_aon} -tx_clock MTAP_Wrck -rx_clock SMNCLK
주요 문제는 []:(콜론) 구분 기호를 무시하는 방법입니다.