convert pwm to get/put
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 11:00:03 +0000 (12:00 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 11:00:03 +0000 (12:00 +0100)
src/peripherals/pwm/pwm.bsv

index 010db57f76bfdfe35cc671d382407e08cebb4c47..1290a3339354bc1d03532f92869b787424b44166 100644 (file)
@@ -57,7 +57,7 @@ package pwm;
   endinterface
 
   interface PWMIO;
-    method Bit#(1) pwm_o;
+    interface Get#(Bit#(1)) pwm_o;
   endinterface
 
   interface PWM;
@@ -254,7 +254,12 @@ package pwm;
       endmethod
     endinterface;
     interface io = interface PWMIO
-      method pwm_o=pwm_output_enable==1?pwm_signal:0;
+      interface sout = interface Get
+        method ActionValue#(Bit#(1)) get;
+          return pwm_output_enable==1?pwm_signal:0;
+        endmethod
+      endinterface;
+
     endinterface;
   endmodule