projects
/
shakti-peripherals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
still getting compile errors
[shakti-peripherals.git]
/
src
/
peripherals
/
spi
/
spi.bsv
diff --git
a/src/peripherals/spi/spi.bsv
b/src/peripherals/spi/spi.bsv
index aa9007cdb4e53bd2bc6b570c2f8371bb8ef23246..2f639d670ad117af7b8c302cc872563bb632cdfc 100644
(file)
--- a/
src/peripherals/spi/spi.bsv
+++ b/
src/peripherals/spi/spi.bsv
@@
-31,6
+31,8
@@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package spi;
package spi;
+ import AXI4_Lite_Types :: *;
+ import AXI4_Lite_Fabric :: *;
import GetPut::*;
import qspi::*;
`include "instance_defines.bsv"
import GetPut::*;
import qspi::*;
`include "instance_defines.bsv"
@@
-70,12
+72,20
@@
package spi;
endmethod
interface io_out = interface Get
method ActionValue#(Bit#(2)) get;
endmethod
interface io_out = interface Get
method ActionValue#(Bit#(2)) get;
- return qspi.out.io_out[1:0];
+ ActionValue#(Bit#(4)) temp2 = qspi.out.io_out.get;
+ Bit#(2) temp;
+ temp[0] = temp2[0];
+ temp[1] = temp2[1];
+ return temp;
endmethod
endinterface;
interface io_out_en = interface Get
method ActionValue#(Bit#(2)) get;
endmethod
endinterface;
interface io_out_en = interface Get
method ActionValue#(Bit#(2)) get;
- return qspi.out.io_out_en[1:0];
+ ActionValue#(Bit#(4)) temp2 = qspi.out.io_out_en.get;
+ Bit#(2) temp;
+ temp[0] = temp2[0];
+ temp[1] = temp2[1];
+ return temp;
endmethod
endinterface;
interface io_in = interface Put
endmethod
endinterface;
interface io_in = interface Put
@@
-85,11
+95,11
@@
package spi;
temp[2] = 0;
temp[1] = in[1];
temp[0] = in[0];
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;
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;