From: Neel Date: Tue, 24 Jul 2018 08:38:10 +0000 (+0530) Subject: using let to read from get X-Git-Url: https://git.libre-soc.org/?p=shakti-peripherals.git;a=commitdiff_plain;h=bb724f1b0c41c7d30467e18b6080186dfe61550c using let to read from get --- diff --git a/src/peripherals/spi/spi.bsv b/src/peripherals/spi/spi.bsv index 2f639d6..a66989e 100644 --- a/src/peripherals/spi/spi.bsv +++ b/src/peripherals/spi/spi.bsv @@ -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];