Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Quartus not show the port size correctly

Status
Not open for further replies.

mahmood.n

Member level 5
Joined
Dec 2, 2011
Messages
85
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,046
There is a entity with 32 bit integers and the simulations on active-hdl student edition works fine. On Quartus however, I see that the port sizes are 5 which is shown as [4..0]. Please see the picture which I highlighted that.

Code:
package types is				 
	constant bitWidth: integer := 32;
end;
entity cmp is 
	port (x, y: in integer range 0 to bitWidth-1;
		  s, b: out integer range 0 to bitWidth-1);
end;

What does that mean?
 

Attachments

  • qu.jpg
    qu.jpg
    354.8 KB · Views: 51

You don't seem to understand that you have defined the range of x, y, s, and b as 0 to 31. So the values of x, y, s, and b can only be 0-31 which means they only need to be 5-bits wide, i.e. 00000-11111.

The constant being named bitWidth is poorly named. It's more of a endOfRange or maxValue, etc.
 
Quartus has done its job exactly as you specified..
If you want 32 bit integers, then remove the range specification from the ports.

PS. Integers are limited to 32 bit integers in quartus an modelsim, so you cannot have integer range 0 to 2^32-1. Integers max out at 2^31-1
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top