{"id":1142,"date":"2020-11-19T01:15:46","date_gmt":"2020-11-19T01:15:46","guid":{"rendered":"http:\/\/fpganow.com\/?p=1142"},"modified":"2020-11-19T01:15:46","modified_gmt":"2020-11-19T01:15:46","slug":"vivado-error-opt-31-67-and-how-i-fixed-it","status":"publish","type":"post","link":"https:\/\/fpganow.com\/index.php\/2020\/11\/19\/vivado-error-opt-31-67-and-how-i-fixed-it\/","title":{"rendered":"Vivado Error [Opt 31-67], and How I Fixed It."},"content":{"rendered":"\n<p>So I am dealing with the following scenarios:<\/p>\n<h4><strong>Scenario 1 &#8211; Genesys Zynq with SYZYGY SFP<\/strong><\/h4>\n<p>I have the Genesys Zynq UltraScale+ MPSoC 3EG board that does not provide direct access to the PHY pins, but has a SYZYGY port that I have plugged in to the SZG-DUALSFP module with an SFP connector.<\/p>\n<h4><strong>Scenario 2 &#8211; Arty A7 Artix-7 with 10\/100 Mbit PHY<\/strong><\/h4>\n<p>I have the Arty A7 Artx-7 FPGA Development Board that gives me direct access to the pins of a 10\/100 Mbit PHY.<\/p>\n<p>All I want to do is connect directly to a PHY so I can implement a LabVIEW based TCP\/IP core, and as a starting Proof-of-Concept, I will take the already existing LabVIEW FPGA implementation (see their examples) and bring the UDP echo sample in.<\/p>\n<p>So I create a design using the Arty board using a MicroBlaze processor, write a simple program and add an AXI Stream FIFO core and connect that to a custom verilog node that will hold the LabVIEW FPGA code.\u00a0 I do this because I want a way of communicating with the code running on the FPGA.\u00a0 The AXI Stream FIFO will bridge the LabVIEW FPGA code with the MicroBlaze processor, and what I will do is send some or all data received from the Ethernet PHY over the AXI Stream FIFO to a C++ application running on the MicroBlaze, and then via a UART connection that I make from my host computer to the Arty, see the results.<\/p>\n<p>I can also use this as a way to properly figure out how to use the SZG-DUALSFP module as well.<\/p>\n<p>Long story short, I add an AXI-Stream FIFO that is connected to a labview_ip node which will house my LabVIEW FPGA exported code.\u00a0 And for now I create a simple file that echoes a random packet of five 32-bit WORDS once per second.<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1150\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design.png\" alt=\"\" width=\"1644\" height=\"428\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design.png 1644w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design-300x78.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design-1024x267.png 1024w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design-768x200.png 768w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design-1536x400.png 1536w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-01-Block_Design-1200x312.png 1200w\" sizes=\"auto, (max-width: 1644px) 100vw, 1644px\" \/><\/a><\/p>\n<h4><strong>Optimization Error<\/strong><\/h4>\n<p>So I create this custom Verilog code, and click Generate Bitstream.\u00a0 After a few minutes I get the error mentioned in the title of this article.\u00a0 I originally had no idea how to debug this, but after some time on Xilinx Forums I figured it out&#8230; I forgot to wire up one value, and the design optimization removed it since it was unwired.\u00a0 Anyway, if you are using Vivado and you get this error, please continue&#8230;<\/p>\n<pre>[Opt 31-67] Problem: A LUT3 cell in the design is missing a connection on input pin I2, which is used by the LUT equation. This pin has either been left unconnected in the design or the connection was removed due to the trimming of unused logic. The LUT cell name is: design_1_i\/axi_fifo_mm_s_0\/U0\/COMP_IPIC2AXI_S\/gtxd.COMP_TXD_FIFO\/gfifo_gen.COMP_AXIS_FG_FIFO\/COMP_FIFO\/xpm_fifo_base_inst_i_1.<\/pre>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-02-Implementation_Error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1152\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-02-Implementation_Error.png\" alt=\"\" width=\"309\" height=\"330\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-02-Implementation_Error.png 309w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-02-Implementation_Error-281x300.png 281w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1153\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error.png\" alt=\"\" width=\"1094\" height=\"151\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error.png 1094w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error-300x41.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error-1024x141.png 1024w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-03-Opt_Design_Error-768x106.png 768w\" sizes=\"auto, (max-width: 1094px) 100vw, 1094px\" \/><\/a><\/p>\n<p>So the LUT cell name is:<\/p>\n<pre>design_1_i\/axi_fifo_mm_s_0\/U0\/COMP_IPIC2AXI_S\/gtxd.COMP_TXD_FIFO\/gfifo_gen.COMP_AXIS_FG_FIFO\/COMP_FIFO\/xpm_fifo_base_inst_i_1<\/pre>\n<p>I manually run &#8216;Optimize Design&#8217; with the the following commands:<\/p>\n<pre>set_param messaging.defaultLimit 100000<br \/>opt_design -verbose<\/pre>\n<p>(See: <a href=\"https:\/\/www.xilinx.com\/support\/answers\/58616.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.xilinx.com\/support\/answers\/58616.html<\/a> for more details on using this approach)<\/p>\n<p>This reproduces the error, but the error appears in the TCL Console this time.<\/p>\n<p>I open the Synthesized Design (&#8216;Open Synthesized Design&#8217; option on the left side-bar):<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-04-Open_Synthesized_Design.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1155\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-04-Open_Synthesized_Design.png\" alt=\"\" width=\"329\" height=\"650\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-04-Open_Synthesized_Design.png 329w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-04-Open_Synthesized_Design-152x300.png 152w\" sizes=\"auto, (max-width: 329px) 100vw, 329px\" \/><\/a><\/p>\n<h4>Show the object\/cell by using the TCL console:<\/h4>\n<pre>show_objects [ get_cells {design_1_i\/axi_fifo_mm_s_0\/U0\/COMP_IPIC2AXI_S\/gtxd.COMP_TXD_FIFO\/gfifo_gen.COMP_AXIS_FG_FIFO\/COMP_FIFO\/xpm_fifo_base_inst_i_1}]<\/pre>\n<p>Which shows me this:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1156\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects.png\" alt=\"\" width=\"1212\" height=\"237\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects.png 1212w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects-300x59.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects-1024x200.png 1024w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects-768x150.png 768w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-05-Show_Objects-1200x235.png 1200w\" sizes=\"auto, (max-width: 1212px) 100vw, 1212px\" \/><\/a><\/p>\n<p>Then I go to the schematic by right-clicking on the cell and selecting &#8216;Schematic&#8217;:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-06-Show_Schematic.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1157\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-06-Show_Schematic.png\" alt=\"\" width=\"838\" height=\"529\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-06-Show_Schematic.png 838w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-06-Show_Schematic-300x189.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-06-Show_Schematic-768x485.png 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/a><\/p>\n<p>So this schematic shows that the signal I2 is unconnected. Now what is I2? I have no idea&#8230;\u00a0<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-07-Small_Schematic.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1159\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-07-Small_Schematic.png\" alt=\"\" width=\"543\" height=\"683\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-07-Small_Schematic.png 543w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-07-Small_Schematic-239x300.png 239w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/a><\/p>\n<p>So I get more information by right-clicking and selecting &#8216;Expand Cone-&gt;To Selected Cells&#8217;:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-08-Expand_Cone.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1161\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-08-Expand_Cone.png\" alt=\"\" width=\"936\" height=\"850\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-08-Expand_Cone.png 936w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-08-Expand_Cone-300x272.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-08-Expand_Cone-768x697.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>The schematic will be pretty big, however the selected cell will be highlighted in blue and zoomed in like so:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-09-Zoomed_in_Detail.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1162\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-09-Zoomed_in_Detail.png\" alt=\"\" width=\"702\" height=\"321\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-09-Zoomed_in_Detail.png 702w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-09-Zoomed_in_Detail-300x137.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n<p>Then I follow the output wire until I find where it goes, notice that the wire is connected to <strong>&#8216;rd_en&#8217;<\/strong>, which sounds a lot like <strong>&#8216;Read Enable&#8217;<\/strong> which is a port that the FIFO should have connected.\u00a0<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-10-Follow_Signal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1163\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-10-Follow_Signal.png\" alt=\"\" width=\"426\" height=\"324\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-10-Follow_Signal.png 426w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-10-Follow_Signal-300x228.png 300w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/a><\/p>\n<p>Now this might be too vague, so what if I wanted to know what component or cell the rd_en signal is going to? I right-click on the border of this cell\/component and select &#8216;Expand\/Collapse-&gt;Collapse Inside&#8217;:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-11-Collapse_Inside.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1164\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-11-Collapse_Inside.png\" alt=\"\" width=\"821\" height=\"691\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-11-Collapse_Inside.png 821w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-11-Collapse_Inside-300x252.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-11-Collapse_Inside-768x646.png 768w\" sizes=\"auto, (max-width: 821px) 100vw, 821px\" \/><\/a><\/p>\n<p>With this view, I know immediately what is wrong, I must have never wired the ready or &#8216;Ready for Input&#8217; signal somewhere between the AXI-Stream FIFO and my custom IP.<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-12-Collapsed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1165\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-12-Collapsed.png\" alt=\"\" width=\"631\" height=\"641\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-12-Collapsed.png 631w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-12-Collapsed-295x300.png 295w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><\/p>\n<p>And here is a slightly zoomed out view:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-13-Slightly_Zoomed_Out.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1168\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-13-Slightly_Zoomed_Out.png\" alt=\"\" width=\"894\" height=\"414\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-13-Slightly_Zoomed_Out.png 894w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-13-Slightly_Zoomed_Out-300x139.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-13-Slightly_Zoomed_Out-768x356.png 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/a><\/p>\n<p>I go back to my Verilog code and realize that I never assigned a value to the &#8216;Transmit Ready&#8217; signal &#8211; even though I would have expected this to work and to default to a value of 0.<\/p>\n<p>For the curious, adding line 128 fixed the error:<\/p>\n<p><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-14-The_Fix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1167\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-14-The_Fix.png\" alt=\"\" width=\"744\" height=\"262\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-14-The_Fix.png 744w, https:\/\/fpganow.com\/wp-content\/uploads\/2020\/11\/Opt_31_67-14-The_Fix-300x106.png 300w\" sizes=\"auto, (max-width: 744px) 100vw, 744px\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I am dealing with the following scenarios: Scenario 1 &#8211; Genesys Zynq with SYZYGY SFP I have the Genesys Zynq UltraScale+ MPSoC 3EG board that does not provide direct access to the PHY pins, but has a SYZYGY port that I have plugged in to the SZG-DUALSFP module with an SFP connector. Scenario 2 &#8230; <a title=\"Vivado Error [Opt 31-67], and How I Fixed It.\" class=\"read-more\" href=\"https:\/\/fpganow.com\/index.php\/2020\/11\/19\/vivado-error-opt-31-67-and-how-i-fixed-it\/\" aria-label=\"Read more about Vivado Error [Opt 31-67], and How I Fixed It.\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1142","post","type-post","status-publish","format-standard","hentry","category-uncategorized","masonry-post","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/1142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/comments?post=1142"}],"version-history":[{"count":9,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/1142\/revisions"}],"predecessor-version":[{"id":1169,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/1142\/revisions\/1169"}],"wp:attachment":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/media?parent=1142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/categories?post=1142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/tags?post=1142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}