The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> help with array and loop in verilog-A https://designers-guide.org/forum/YaBB.pl?num=1513888042 Message started by Shahriar on Dec 21st, 2017, 12:27pm |
Title: help with array and loop in verilog-A Post by Shahriar on Dec 21st, 2017, 12:27pm Hi, I'm writing a verilog-A code for a block. So far, the code should only make two arrays that are binary equivalents of two input decimal numbers. Code:
If I instantiate it a schematic and do a simulation, say dc, it finishes fine and prints the values, as I want them, in the output log. This is what it looks like. Quote:
But if I comment out the lines with $strobe command, simulation returns an error. Quote:
Line 21 is is "data1bits[i] = temp_data%2 in the code. Could anyone please help me figure out what I am doing wrong? Also, is there any way to print an array in verilog-A, instead of going to the elements one by one? Thanks. Shahriar |
Title: Re: help with array and loop in verilog-A Post by Andrew Beckett on Dec 21st, 2017, 11:34pm It doesn't do that for me - if I comment out the $strobe lines it works fine. I didn't spot anything wrong with the models. Which spectre version are you using (what does it say at the top of the log file)? There's no way to print the whole array in one go - you need a loop such as you're doing. Regards, Andrew |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |