Anish
New Member
Offline
Posts: 4
|
I am developing a model for an array of delay cells to be used for a time-to-digital converter. I am trying to replace the following module instantiations with a looping structure-
delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(143)) dly_up1 (up_buf,delay_chain_up[1], delay_ctrl[1]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(243)) dly_up2 (up_buf,delay_chain_up[2], delay_ctrl[2]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(123)) dly_up3 (up_buf,delay_chain_up[3], delay_ctrl[3]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(7)) dly_up4 (up_buf,delay_chain_up[4], delay_ctrl[4]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(9)) dly_up5 (up_buf,delay_chain_up[5], delay_ctrl[5]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(11)) dly_up6 (up_buf,delay_chain_up[6], delay_ctrl[6]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(3)) dly_up7 (up_buf,delay_chain_up[7], delay_ctrl[7]); delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(6)) dly_up8 (up_buf,delay_chain_up[8], delay_ctrl[8]);
I tried the following based on what I found on a Cadence forum where k is a genvar-
generate for(k=1;k<=`N_delays;k=k+1) begin delay_cell #(.offset(50p),.step(tdc_step),.sigma(tdc_sigma),.seed(24)) dly_up_array (up_buf,delay_chain_up[k], delay_ctrl[k]); end endgenerate
I am able to compile and run the unrolled instantiations, but I get the following compilation error for the looped instantiation-
Error found by spectre during AHDL compile. ERROR (VACOMP-2259): "for<<--? (k=1;k<=`N_delays;k=k+1)" "/home/scratch.amorakhia_libs/work/amorakhia+tsmc7+development+3/nvhs_tsmc7/am_ tdc_delay/veriloga/veriloga.va", line 58: syntax error.
I have tried the looping structure without the generate but that doesn't compile as well. I have attached the code with this post. Would really appreciate it if someone can tell me what I am doing wrong.
Thanks!
|