From: Luke Kenneth Casson Leighton Date: Tue, 24 Jul 2018 11:00:03 +0000 (+0100) Subject: convert pwm to get/put X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be50905830a2204c0c43f9d8e921ccec9124014f;p=shakti-peripherals.git convert pwm to get/put --- diff --git a/src/peripherals/pwm/pwm.bsv b/src/peripherals/pwm/pwm.bsv index 010db57..1290a33 100644 --- a/src/peripherals/pwm/pwm.bsv +++ b/src/peripherals/pwm/pwm.bsv @@ -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