From: Luke Kenneth Casson Leighton Date: Tue, 24 Jul 2018 10:00:57 +0000 (+0100) Subject: convert rgbttl interface to get/put X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=563e5d9eaa877852446677d7b02762baa426eafa;p=shakti-peripherals.git convert rgbttl interface to get/put --- diff --git a/src/peripherals/rgbttl/rgbttl_dummy.bsv b/src/peripherals/rgbttl/rgbttl_dummy.bsv index 0a4a7d8..7ef4343 100644 --- a/src/peripherals/rgbttl/rgbttl_dummy.bsv +++ b/src/peripherals/rgbttl/rgbttl_dummy.bsv @@ -39,11 +39,11 @@ package rgbttl_dummy; interface Ifc_rgbttl_dummy; interface AXI4_Lite_Slave_IFC#(`ADDR, `DATA, `USERSPACE) slave; - method Bit#(1) de; - method Bit#(1) ck; - method Bit#(1) vs; - method Bit#(1) hs; - method Bit#(`RGBTTL_WIDTH) data; + interface Get#(Bit#(1)) de; + interface Get#(Bit#(1)) ck; + interface Get#(Bit#(1)) vs; + interface Get#(Bit#(1)) hs; + interface Get#(Bit#(`RGBTTL_WIDTH)) data; endinterface (*synthesize*) @@ -57,11 +57,36 @@ package rgbttl_dummy; Reg#(Bit#(1)) rg_hs <- mkReg(0); Reg#(Bit#(`RGBTTL_WIDTH)) rg_data <- mkReg(0); - method de = rg_de; - method ck = rg_ck; - method vs = rg_vs; - method hs = rg_hs; - method data = rg_data; - interface slave=s_xactor.axi_side; + interface de = interface Get + method ActionValue#(Bit#(1)) get; + return rg_de; + endmethod + endinterface; + + interface ck = interface Get + method ActionValue#(Bit#(1)) get; + return rg_ck; + endmethod + endinterface; + + interface vs = interface Get + method ActionValue#(Bit#(1)) get; + return rg_vs; + endmethod + endinterface; + + interface hs = interface Get + method ActionValue#(Bit#(1)) get; + return rg_hs; + endmethod + endinterface; + + interface data = interface Get + method ActionValue#(Bit#(`RGBTTL_WIDTH)) get; + return data; + endmethod + endinterface; + + interface slave=s_xactor.axi_side; endmodule endpackage