![]() |
|
|
|||||||
![]() |
VHDL - generic maps based on an input signal |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi all,
I am trying to build a block whose component ports' length depend on an input. However I have problems which I honestly cannot solve. myBlock will accept an input 'count'. This will then be converted to an integer. From that integer, the 256-bit input will be sliced. So the length of bits that will enter subBlock will only be the input bits running from that integer downto 0. While the length of subOut will be half the length of subIn. Below is the code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity myBlock is generic (x : natural :=16;end myBlock; architecture bhv of myBlock is component subBlockbegin q <= conv_integer (count); end bhv; Such code above gave me the following errors: The actual value (Signal 'q2') associated with a generic must be a globally static expression.Try as I might I really don't know how to make q and q2 global statics. What do I do now? Many thanks, tahder tahder |
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Mar 2008
Posts: 6
|
I'm sorry I had already posted my question above when I read this thread
http://www.velocityreviews.com/forum...-changing.html However, the block I am trying to implement has several subblocks so I do component instantiation because I felt it is manageable and good for reuse. There is no process in my architecture body. Thanks again, tahder tahder |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wonderful data input with web reporting tool | freezea | Software | 0 | 09-09-2009 05:30 AM |
| I am having trouble editing a signal in a sub program. | Haai | Hardware | 0 | 08-28-2007 02:58 PM |
| IMHO, Digital SECAM video is better than Analog NTSC video | Radium | DVD Video | 167 | 10-25-2006 04:16 AM |
| DVD Recorder-DV input & Hard Drive ? | Marion | DVD Video | 7 | 05-16-2004 06:31 PM |
| Convert S-video to RF signal | Monkey Monkey | DVD Video | 10 | 01-14-2004 08:17 AM |