The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 8:23am
Pages: 1
Send Topic Print
Error: genvars are not yet supported (Read 5304 times)
pkd
Junior Member
**
Offline



Posts: 25
India
Error: genvars are not yet supported
Mar 15th, 2010, 2:01pm
 
Dear all,
I am facing this error while compiling the code below for an ADC which is an exact copy of VerilogA manual downloaded from this forum only.


Here is the error:
Quote:
Error found by spectre during SpectreHDL compile.
"/home/pratap/cadence/designs/verilogA_try/adc/veriloga/veriloga.va", line  14: "genvar <<--? i;"
"/home/pratap/cadence/designs/verilogA_try/adc/veriloga/veriloga.va", line  14: Error: genvars are not yet supported

Here is the source code in verilog-A...
Code:
// VerilogA for verologA, adc, veriloga

`include "constants.vams"
`include "disciplines.vams"

module adc(in, clk, out);
	parameter bits = 8, fullscale = 1.0, dly = 0, ttime = 10n;
	input in, clk;
	output [0:bits-1] out;
	electrical in, clk;
	electrical [0:bits-1] out;
	real sample, thresh;
	integer result[0:bits-1];
	genvar i;
	analog begin
		@(cross(V(clk)-2.5, +1)) begin
			sample = V(in);
			thresh = fullscale/2.0;
			for (i = bits - 1; i >= 0; i = i - 1) begin
				if (sample > thresh) begin
					result[i] = 1.0;
					sample = sample - thresh;
				end
				else begin
					result[i] = 0.0;
				end
				sample = 2.0*sample;
			end
		end
		for (i = 0; i < bits; i = i + 1) begin
			V(out[i]) <+ transition(result[i], dly, ttime);
		end
	end
endmodule 



Please let me know if I am doing something wrong or if I am missing some thing.
Thanks,
-pkd
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Error: genvars are not yet supported
Reply #1 - Mar 15th, 2010, 9:58pm
 
Try the Spectre compliant versions.
Back to top
 
 
View Profile WWW   IP Logged
pkd
Junior Member
**
Offline



Posts: 25
India
Re: Error: genvars are not yet supported
Reply #2 - Mar 15th, 2010, 10:48pm
 
I am using mmsim70 for spectre.
As far as I know that is one of the most recent versions of spectre.
In that also I get the same error.
-pkd
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Error: genvars are not yet supported
Reply #3 - Mar 16th, 2010, 6:12am
 
You missed what Ken was saying.  Click Verilog-AMS in the header, in the functional blocks section there is:

Data converter (LRM compliant, Spectre compliant, test, dg-vams3-26, dg-vams3-27)

You want this link:
http://www.designers-guide.org/VerilogAMS/functional-blocks/data-converter/conve...
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.