From: Luke Kenneth Casson Leighton Date: Sun, 22 Jul 2018 10:00:53 +0000 (+0100) Subject: add rgbttl interface X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=931f0ac43c3751eddd4bd35a627412b1aef0fceb;p=pinmux.git add rgbttl interface --- diff --git a/src/bsv/peripheral_gen/rgbttl.py b/src/bsv/peripheral_gen/rgbttl.py new file mode 100644 index 0000000..ccc14ea --- /dev/null +++ b/src/bsv/peripheral_gen/rgbttl.py @@ -0,0 +1,22 @@ +from bsv.peripheral_gen.base import PBase + +class rgbttl(PBase): + + def slowimport(self): + return " import rgbttl_dummy :: *;" + + def slowifdecl(self): + return " interface RGBTTL_out lcd{0}_out;" + + def num_axi_regs32(self): + return 10 + + def mkslow_peripheral(self): + sz = len(self.peripheral.pinspecs) - 4 # subtract CK, DE, HS, VS + return " Ifc_rgbttl_dummy lcd{0} <- mkrgbttl_dummy(%d);" % sz + + def _mk_connection(self, name=None, count=0): + return "lcd{0}.slave" + + def pinname_out(self, pname): + return pname diff --git a/src/spec/minitest.py b/src/spec/minitest.py index fb3901f..3d3f86a 100644 --- a/src/spec/minitest.py +++ b/src/spec/minitest.py @@ -61,7 +61,7 @@ def pinspec(): # Bank A, 0-27 ps.gpio("", ('A', 0), 0, 0, 28) - ps.rgbttl("", ('A', 0), 1, limit=23) + ps.rgbttl("", ('A', 0), 1, limit=22) ps.spi("0", ('A', 10), 2) ps.quadspi("", ('A', 4), 2) ps.uart("0", ('A', 16), 2)