X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fperipherals%2Fspi%2Fspi.bsv;h=03f78d8b6e1748d8e7e331d1fd6bfaeed067db15;hb=41ec08e8f9187474538532215ff46f80160e2cfc;hp=f427e28c5f62415b539eeb6c65cb6d05a3c91d48;hpb=11a667017572d577c18e1b595f41510efa600353;p=shakti-peripherals.git diff --git a/src/peripherals/spi/spi.bsv b/src/peripherals/spi/spi.bsv index f427e28..03f78d8 100644 --- a/src/peripherals/spi/spi.bsv +++ b/src/peripherals/spi/spi.bsv @@ -72,17 +72,21 @@ package spi; endmethod interface io_out = interface Get method ActionValue#(Bit#(2)) get; + Bit#(4) temp2; Bit#(2) temp; - temp[1] = qspi.out.io_out[1]; - temp[0] = qspi.out.io_out[0]; + qspi.out.io_out.get(temp2); + temp[0] = temp2[0]; + temp[1] = temp2[1]; return temp; endmethod endinterface; interface io_out_en = interface Get method ActionValue#(Bit#(2)) get; + Bit#(4) temp2; Bit#(2) temp; - temp[1] = qspi.out.io_out_en[1]; - temp[0] = qspi.out.io_out_en[0]; + qspi.out.io_out_en.get(temp2); + temp[0] = temp2[0]; + temp[1] = temp2[1]; return temp; endmethod endinterface; @@ -93,11 +97,11 @@ package spi; temp[2] = 0; temp[1] = in[1]; temp[0] = in[0]; - qspi.out.io_in(temp); + qspi.out.io_in.put(temp); endmethod endinterface; interface clk_o = qspi.out.clk_o; - interface ncs_o = qspi.ncs_o; + interface ncs_o = qspi.out.ncs_o; endinterface; interface slave = qspi.slave;