- method Action modem_input(bit srx, bit cts, bit dsr, bit ri, bit dcd);
- pin_srx_sync <= srx; // RX Input
- pin_cts_sync <= cts; // CTS Input
- pin_dsr_sync <= dsr; // Data Set Ready indicating that MODEM is ready to establish the communication
- pin_ri_sync <= ri; // Ring Indicator indicate that a telephone ringing signal has been recieved by the MODEM
- pin_dcd_sync <= dcd; // Data carrier detect
- endmethod
- method bit modem_output_stx = pin_stx; // Tx output
- method bit modem_output_rts = pin_rts; // RTS output
- method bit modem_output_dtr = pin_dtr; // Data Terminal Ready output
+
+ interface srx_in = interface Put
+ method Action put(Bit#(1) in);
+ pin_srx_sync <= in; // RX Input
+ endmethod
+ endinterface;
+
+ interface cts_in = interface Put
+ method Action put(Bit#(1) in);
+ pin_cts_sync <= in; // CTS Input
+ endmethod
+ endinterface;
+
+ interface dsr_in = interface Put
+ method Action put(Bit#(1) in);
+ pin_dsr_sync <= in; // Data Set Ready indicating that MODEM is ready
+ // to establish the communication
+ endmethod
+ endinterface;
+
+ interface ri_in = interface Put
+ method Action put(Bit#(1) in);
+ pin_ri_sync <= in; // Ring Indicator indicate that a telephone ringing
+ //signal has been recieved by the MODEM
+ endmethod
+ endinterface;
+
+ interface dcd_in = interface Put
+ method Action put(Bit#(1) in);
+ pin_dcd_sync <= in; // Data carrier detect
+ endmethod
+ endinterface;
+
+ interface stx_out = interface Get
+ method ActionValue#(Bit#(1)) get;
+ return pin_stx; // Tx output
+ endmethod
+ endinterface;
+
+ interface rts_out = interface Get
+ method ActionValue#(Bit#(1)) get;
+ return pin_rts; // RTS output
+ endmethod
+ endinterface;
+
+ interface dtr_out = interface Get
+ method ActionValue#(Bit#(1)) get;
+ return pin_dtr; // Data Terminal Ready output
+ endmethod
+ endinterface;
+