shenpeifu / vtr-verilog-to-routing

Automatically exported from code.google.com/p/vtr-verilog-to-routing
0 stars 0 forks source link

"driver defined twice" (rc4) #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
odin_II.exe -V rc4-isolate_swapregs-without_if.vv -a 
k6_N8_gate_boost_0.2V_22nm.xml

gives: (Line number: 3094) You've defined the driver "S_0~0" twice

(note that the given line num in wrong)
It seems to be because the two case statements at around 2300-2800 appear to 
assign S_* twice. However, this could only happen if i == j, and adding an if 
statement around these case statements: if (i != j) does not fix it, ie.

odin_II.exe -V rc4-isolate_swapregs-with_if.vv -a k6_N8_gate_boost_0.2V_22nm.xml

still gives the same error.

Note that these case statements, and others, make an equivalent ciruit to S[i] 
<= S[j]; S[j] <= S[i]; , where S is a 2 dimensional vector register, which was 
the original code. Also this same swapping occurs earlier in the files at 
around lines 1750-2250

What did fix it was adding a reg to swap one value into, and then swaping into 
the final place on a the next clock cycle. This is rc4-workaround.vv

Also, quartus will compile the original code, the with-if, the without-if, and 
the workaround.

(If you are wondering who in their right mind would write this code, and why 
they have a funny extension, these files are partially generated by a 
preprocessor I wrote, which is here: 
https://github.com/golvok/verilog_preprocessor , for now)

Original issue reported on code.google.com by walkerm...@gmail.com on 25 Aug 2014 at 11:17

Attachments: