From: Luke Kenneth Casson Leighton Date: Tue, 17 Jul 2018 05:19:53 +0000 (+0100) Subject: continue adding pwmnum argument X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=594ec8667a290690e3ecb1994c3d48109bdb626e;p=pinmux.git continue adding pwmnum argument --- diff --git a/src/bsv/bsv_lib/pwm.bsv b/src/bsv/bsv_lib/pwm.bsv index 02b5dc9..35c6d1f 100644 --- a/src/bsv/bsv_lib/pwm.bsv +++ b/src/bsv/bsv_lib/pwm.bsv @@ -270,8 +270,8 @@ package pwm; endinterface (*synthesize*) - module mkPWM_bus#(Clock ext_clock)(Ifc_PWM_bus); - PWM pwm <-mkPWM(ext_clock); + module mkPWM_bus#(Clock ext_clock, numeric type pwmnum)(Ifc_PWM_bus); + PWM pwm <-mkPWM(ext_clock, pwmnum); AXI4_Lite_Slave_Xactor_IFC#(`PADDR,`Reg_width, `USERSPACE) s_xactor<-mkAXI4_Lite_Slave_Xactor(); @@ -306,8 +306,8 @@ package pwm; endinterface (*synthesize*) - module mkPWM_bus#(Clock ext_clock)(Ifc_PWM_bus); - PWM pwm <-mkPWM(ext_clock); + module mkPWM_bus#(Clock ext_clock, numeric type pwmnum)(Ifc_PWM_bus); + PWM pwm <-mkPWM(ext_clock, pwmnum); AXI4_Slave_Xactor_IFC#(`PADDR,`Reg_width, `USERSPACE) s_xactor<-mkAXI4_Slave_Xactor(); @@ -339,7 +339,7 @@ package pwm; (*synthesize*) module mkTb(Empty); let clk <- exposeCurrentClock; - PWM pwm <- mkPWM(clk); + PWM pwm <- mkPWM(clk, 32); Reg#(Bit#(5)) rg_state <- mkReg(0); rule state1(rg_state==0);