cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
488 Views
Registered: ‎11-01-2015

Is sub expression for regexp valid in Vivado?

Hi,

I have two Tcl scripts like below which use "()" in regular expression, but Vivado always reports a warning or an error.

Can you give me any advice? Thanks.

set used_bram [get_cells -hier -regexp -filter {PRIMITIVE_SUBGROUP == "(BRAM|FIFO)"}]


WARNING: [Vivado 12-180] No cells matched 'get_cells -hier -regexp -filter {PRIMITIVE_SUBGROUP == "(BRAM|FIFO)"}'.


set used_bram [get_cells -hier -regexp -filter {PRIMITIVE_SUBGROUP == (BRAM|FIFO)}]
ERROR: [Common 17-263] There was a syntax error while parsing filter expression: 'PRIMITIVE_SUBGROUP == (BRAM|FIFO)' at position '19'

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
458 Views
Registered: ‎03-03-2009

Re: Is sub expression for regexp valid in Vivado?

The best way to solve these problems is to open the implemented design and use the find command.

get_cells -hierarchical -filter { PRIMITIVE_TYPE =~ BLOCKRAM.BRAM.* || PRIMITIVE_TYPE =~ BLOCKRAM.FIFO.* }

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
457 Views
Registered: ‎03-03-2009

Re: Is sub expression for regexp valid in Vivado?

Another example

get_cells -hierarchical -regexp -filter { PRIMITIVE_TYPE =~ BLOCKRAM.* }

get_cells -hierarchical -regexp -filter {LIB_CELL =~ .*GT[HPRXYZ]E\d_CHANNEL.* || LIB_CELL =~ .*GT[HPRXYZ]E\d_COMMON.*}

0 Kudos