using let to read from get
authorNeel <neelgala@gmail.com>
Tue, 24 Jul 2018 08:38:10 +0000 (14:08 +0530)
committerNeel <neelgala@gmail.com>
Tue, 24 Jul 2018 08:38:10 +0000 (14:08 +0530)
src/peripherals/spi/spi.bsv

index 2f639d670ad117af7b8c302cc872563bb632cdfc..a66989e0797b1e8d1375aed5d7a42652e542daf8 100644 (file)
@@ -72,7 +72,7 @@ package spi;
        endmethod
       interface io_out = interface Get
         method ActionValue#(Bit#(2)) get;
-            ActionValue#(Bit#(4)) temp2 = qspi.out.io_out.get;
+            let temp2 <- qspi.out.io_out.get;
             Bit#(2) temp;
             temp[0] = temp2[0];
             temp[1] = temp2[1];
@@ -81,7 +81,7 @@ package spi;
       endinterface;
       interface io_out_en = interface Get
         method ActionValue#(Bit#(2)) get;
-            ActionValue#(Bit#(4)) temp2 = qspi.out.io_out_en.get;
+            let temp2 <- qspi.out.io_out_en.get;
             Bit#(2) temp;
             temp[0] = temp2[0];
             temp[1] = temp2[1];