Giter Site home page Giter Site logo

core_usb_fs_phy's Issues

Latch inferred for signal `\usb_transceiver.\out_dp'

Latches are inferred for out_dp and out_dn at:
https://github.com/ultraembedded/core_usb_fs_phy/blob/master/src_v/usb_transceiver.v#L101

What is the proper way to rewrite it to remove the latch ?

Would following change be ok ?

diff --git a/src_v/usb_transceiver.v b/src_v/usb_transceiver.v
index 53b6a63..9d81abf 100644
--- a/src_v/usb_transceiver.v
+++ b/src_v/usb_transceiver.v
@@ -121,14 +121,14 @@ begin : MUX
             out_dp = 1'b1;
             out_dn = 1'b0;
         end
-        else if (usb_phy_tx_dp_i == 1'b1 && usb_phy_tx_dn_i == 1'b1)
+        else
         begin
             // SE0 (both low)
             out_dp = 1'b0;
             out_dn = 1'b0;
         end
     end
-    1'b1 :
+    default :
     begin
         if (usb_phy_tx_dp_i == 1'b0 && usb_phy_tx_dn_i == 1'b0)
         begin
@@ -148,7 +148,7 @@ begin : MUX
             out_dp = 1'b1;
             out_dn = 1'b0;
         end
-        else if (usb_phy_tx_dp_i == 1'b1 && usb_phy_tx_dn_i == 1'b1)
+        else
         begin
             // Illegal
             out_dp = 1'b1;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.