From: Luke Kenneth Casson Leighton Date: Mon, 23 Jul 2018 12:13:50 +0000 (+0100) Subject: convert gpio to getput X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2749fd4ce80e0e34d263697c79ffd39ceb02b81c;p=shakti-peripherals.git convert gpio to getput --- diff --git a/src/peripherals/gpio/gpio.bsv b/src/peripherals/gpio/gpio.bsv index 3ac83ba..84e54be 100644 --- a/src/peripherals/gpio/gpio.bsv +++ b/src/peripherals/gpio/gpio.bsv @@ -14,6 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND package gpio; /*==== Package imports ==== */ import TriState ::*; + import GetPut ::*; import Vector ::*; import BUtils::*; import ConfigReg ::*; @@ -26,11 +27,11 @@ package gpio; interface GPIO_func#(numeric type ionum); (*always_ready,always_enabled*) - method Action gpio_in (Vector#(ionum,Bit#(1)) inp); + interface Put#(Vector#(ionum,Bit#(1)) gpio_in; (*always_ready*) - method Vector#(ionum,Bit#(1)) gpio_out; + interface Get#(Vector#(ionum,Bit#(1)) gpio_out; (*always_ready*) - method Vector#(ionum,Bit#(1)) gpio_out_en; + interface Get#(Vector#(ionum,Bit#(1)) gpio_out_en; endinterface interface GPIO_config#(numeric type ionum); (*always_ready*) @@ -185,17 +186,22 @@ package gpio; interface axi_slave= s_xactor.axi_side; interface func=interface GPIO_func - method Action gpio_in (Vector#(ionum,Bit#(1)) inp); + interface gpio_in = interface Put#(ionum) + method Action put(Vector#(ionum,Bit#(1)) in); for(Integer i=0;i