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.

Question about generics in VHDL

Status
Not open for further replies.

Fatherc0stas

Newbie level 6
Newbie level 6
Joined
Nov 26, 2012
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,369
Hello everyone, I am currently in the middle of a VHDL project in my university and iw anted to ask a few questions on some ideas i have in ways to improve my design. The design is a generic type of decoder (in this case, 7/4 and 15/11 are included in the errorcorrection parts fo the program)

The program i have looks like this(and it works fine in both functions, 7/4 and 15/11):

generic program.JPG

My question is: Is there a way to be able to change the generic values from a pin assigned in my entity section? i intend to use the pin named "func" for that purpose. for example, when "func" is 1 then IPbits = 7 and OPbits = 4 and when "func" =0 then IPbits = 15 and OP bits = 11.

I am wondering if its possible to achieve this sort of function from within vhdl.

Thanks alot for your time
 

No, you cannot change generic values in real time. That would be like changing the number of pins on a chip while the chip is running.

Generics are for initial set up purposes.
 

No, you cannot change generic values in real time. That would be like changing the number of pins on a chip while the chip is running.

Generics are for initial set up purposes.

Thanks for the quick reply TrickyDicky, is there any other way of making this happen? maybe use a type of variable (if possible) to replace the generics? My VHDL knowledge is fairly limited as i have only started to study it 3 months ago and im wondering if there is any way to implement this.
 

First comment, you need to learn how to post code at ebaboard. It's really annoying to read it as a blurred screen shot....

Secondly, please consider on your own what you want to achieve hardware-wise.

There are cases where a common logic design is used for product variants with different functionality, controlled by a configuration pin. You either need to implement both logic functions separately and have multiplexers switching between both. Or if one is a superset of the other, implement the larger function and disable part of it conditionally, possibly switching some functional details.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top