projects
/
shakti-peripherals.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30a5cf0
)
modify rs232 to get/put interface
author
Neel
<neelgala@gmail.com>
Mon, 23 Jul 2018 04:43:05 +0000
(10:13 +0530)
committer
Neel
<neelgala@gmail.com>
Mon, 23 Jul 2018 04:43:05 +0000
(10:13 +0530)
src/peripherals/uart/RS232_modified.bsv
patch
|
blob
|
history
diff --git
a/src/peripherals/uart/RS232_modified.bsv
b/src/peripherals/uart/RS232_modified.bsv
index ca336d9a1fbb13fb0039f1aadf61e86cb9a71a76..6de7a91b5f2b6382c031d6fd75acf1560f184d8a 100644
(file)
--- a/
src/peripherals/uart/RS232_modified.bsv
+++ b/
src/peripherals/uart/RS232_modified.bsv
@@
-93,11
+93,9
@@
typedef enum {
(* always_ready, always_enabled *)
interface RS232;
// Inputs
(* always_ready, always_enabled *)
interface RS232;
// Inputs
- (* prefix = "" *)
- method Action sin((* port = "SIN" *)Bit#(1) x);
+ interface Put#(Bit#(1)) sin;
// Outputs
// Outputs
- (* prefix = "", result = "SOUT" *)
- method Bit#(1) sout();
+ interface Get#(Bit#(1)) sout;
endinterface
interface BaudGenerator;
endinterface
interface BaudGenerator;
@@
-704,8
+702,16
@@
module mkUART( Bit#(4) charsize
/// Interface Connections / Methods
////////////////////////////////////////////////////////////////////////////////
interface RS232 rs232;
/// Interface Connections / Methods
////////////////////////////////////////////////////////////////////////////////
interface RS232 rs232;
- method sout = rXmitDataOut;
- method sin = rRecvData._write;
+ interface sin = interface Put
+ method Action put(Bit#(1) in);
+ rRecvData._write(in);
+ endmethod
+ endinterface;
+ interface sout = interface Get
+ method ActionValue#(Bit#(1)) get;
+ return rXmitDataOut;
+ endmethod
+ endinterface;
endinterface
interface Get tx;
endinterface
interface Get tx;