projects
/
shakti-peripherals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
using let to read from get
[shakti-peripherals.git]
/
src
/
peripherals
/
spi
/
spi.bsv
diff --git
a/src/peripherals/spi/spi.bsv
b/src/peripherals/spi/spi.bsv
index 553f8753125246b6658a0309629140555b6113bc..a66989e0797b1e8d1375aed5d7a42652e542daf8 100644
(file)
--- a/
src/peripherals/spi/spi.bsv
+++ b/
src/peripherals/spi/spi.bsv
@@
-72,17
+72,19
@@
package spi;
endmethod
interface io_out = interface Get
method ActionValue#(Bit#(2)) get;
endmethod
interface io_out = interface Get
method ActionValue#(Bit#(2)) get;
+ let temp2 <- qspi.out.io_out.get;
Bit#(2) temp;
Bit#(2) temp;
- temp[
1] = qspi.out.io_out.get[1
];
- temp[
0] = qspi.out.io_out.get[0
];
+ temp[
0] = temp2[0
];
+ temp[
1] = temp2[1
];
return temp;
endmethod
endinterface;
interface io_out_en = interface Get
method ActionValue#(Bit#(2)) get;
return temp;
endmethod
endinterface;
interface io_out_en = interface Get
method ActionValue#(Bit#(2)) get;
+ let temp2 <- qspi.out.io_out_en.get;
Bit#(2) temp;
Bit#(2) temp;
- temp[
1] = qspi.out.io_out_en.get[1
];
- temp[
0] = qspi.out.io_out_en.get[0
];
+ temp[
0] = temp2[0
];
+ temp[
1] = temp2[1
];
return temp;
endmethod
endinterface;
return temp;
endmethod
endinterface;
@@
-97,7
+99,7
@@
package spi;
endmethod
endinterface;
interface clk_o = qspi.out.clk_o;
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;
endinterface;
interface slave = qspi.slave;