From: Neel Date: Sat, 21 Jul 2018 06:31:25 +0000 (+0530) Subject: fix pwm names X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=879fea0e39ae6e21f63f08b5c94d6a96e35060e1;p=pinmux.git fix pwm names --- diff --git a/src/bsv/peripheral_gen.py b/src/bsv/peripheral_gen.py index d424778..51a0ab3 100644 --- a/src/bsv/peripheral_gen.py +++ b/src/bsv/peripheral_gen.py @@ -297,13 +297,13 @@ class pwm(PBase): return " import pwm::*;" def slowifdecl(self): - return " interface PWMIO pwm{0};" + return " interface PWMIO pwm{0}_io;" def num_axi_regs32(self): return 4 def mkslow_peripheral(self, size=0): - return " Ifc_PWM_bus pwm{0}_bus <- mkPWM_bus(sp_clock);" + return " Ifc_PWM_bus pwm{0} <- mkPWM_bus(sp_clock);" def _mk_connection(self, name=None, count=0): return "pwm{0}_bus.axi4_slave" @@ -320,7 +320,8 @@ class gpio(PBase): " import gpio::*;\n" def slowifdecl(self): - return " interface GPIO_config#({1}) pad_config{0};" + size = len(self.peripheral.pinspecs) + return " interface GPIO_config#(%d) pad_config{0};" % size def num_axi_regs32(self): return 2