Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17254 Discussions

Is there any way to have datatype more than integer range ?

Altera_Forum
Honored Contributor II
1,787 Views

Hello, 

For the purpose of my project I was designing a power b, where value of b is expected to be 100-200 digit and a is and integer of 2 digit max. The output value from the calculations is stored as an integer hence restricting me to only calculate till integer range values i.e 2^31. I was wondering if there is any other data type in VHDL which has greater range than integer. 

 

Thanks  

Siva
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
692 Views

Quartus is supporting arithmetic operations on the signed/unsigned data type up to 256 bit length. See Integer Arithmetic Megafunctions User Guide. Arithmetic operations for larger entities have to be coded manually. 

 

The complexity may be limited by available FPGA resources.
0 Kudos
Altera_Forum
Honored Contributor II
692 Views

Thank you reply FvM : ) , 

I have one more question suppose i have a signal assignment as  

 

signal acc : unsigned ((DATA_WIDTH) downto 0 ) ; 

 

I am aware that DATA_WIDTH can be declared as generic or a constant type and cannot be changed even if I try to modify the DATA_WIDTH value inside the process block. But I need a clarification regarding is there any other method through which I can change the DATA_WIDTH value ? basically i am looking at re usability of the signal by assigning the value for the DATA_WIDTH inside the process statement flexibly rahter than giving its value through generic or constant  

 

Siva 

 

Siva
0 Kudos
Altera_Forum
Honored Contributor II
692 Views

no, you cannot do that - think about electronics. you cannot change a circuit while it is running. so you have to design it for worst case scenarion

0 Kudos
Reply