Synopsis pragmas breaking triplication
Summary
Pragmas are not correctly ignored
Describe your setup
fastrich
TMRG Version
REPROEUCED_127
Steps to reproduce
module test(input clock_i,
input reset_i,
output stream_output_o);
logic shifter2sel_r;
logic [1:0] shifter;
//synopsys async_set_reset "reset_i"
always @(negedge clock_i or posedge reset_i)
if (reset_i) shifter2sel_r <= 1'b1;
else shifter2sel_r <= ~shifter2sel_r;
assign stream_output_o = (clock_i) ? /* synopsys infer_mux */ shifter[0] : 4shifter[1];
endmodule
What is the current bug behavior?
$ tmrg test.sv
Traceback (most recent call last):
File "fastrich_rtl/venv/bin/tmrg", line 11, in <module>
load_entry_point('tmrg', 'console_scripts', 'tmrg')()
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 2351, in main
tmrg.triplicate()
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 2083, in triplicate
tmrTokens = self.__triplicate(file.tokens)
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 304, in __triplicate
tmrToks = self.__triplicate(tokens[j], i+" ")
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 295, in __triplicate
tokens = self.triplicator[name](tokens)
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 1356, in __triplicate_module
moduleBody = self.__triplicate(moduleBody)
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 304, in __triplicate
tmrToks = self.__triplicate(tokens[j], i+" ")
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 295, in __triplicate
tokens = self.triplicator[name](tokens)
File "fastrich_rtl/utils/tmrg/tmrg/tmrg.py", line 243, in __triplicate_directive_synopsys_ff
if not self.current_namespace.nets[original].tmr:
AttributeError: 'Signal' object has no attribute 'tmr'
What is the expected correct behavior?
Pragma should be ignored
Possible fixes
To be investigated