Help in type mismatch error in vhdl

OP #2331633
Rate this post
• ▲ useful
▼ not useful
Greetings! This is my first thread.

I have a package that contains the following type:
1
type t_rgb_64x48 is array(0 to 47) of std_logic_vector(63 downto 0);

and is being used in my file.vhd file.

------------------------

file.vhd contains an entity that contains the type of the package 
mentioned earlier:
1
RData_in : in t_rgb_64x48;
2
ColumnAddress_Start : in integer;
3
ColumnAddress_End : in integer;
4
RowAddress_Start : in integer;
5
RowAddress_End : in integer;

It also contains a signal with its corresponding type:
1
type t_vgaram is array(0 to 479) of std_logic_vector(639 downto 0);
2
signal s_rstorage : t_vgaram;

------------------------

I need to access s_rstorage through the following statement:
1
s_rstorage(ColumnAddress_End downto ColumnAddress_Start)
2
      (RowAddress_End downto RowAddress_Start)
3
        <= RData_in(ColumnAddress_End downto
4
                      ColumnAddress_Start)
5
                  (RowAddress_End downto RowAddress_Start);

to store the value of RData_in to s_rstorage and making sure that they 
are of the same width in 2D.

The problem is this error:

Type of s_rstorage is incompatible with type of RData_in.

I know that they have different types as the cause of the error. But how 
do I fix this problem?
Guest #2332701
Rate this post
• ▲ useful
▼ not useful
повёлся на ваши низкие цены в интернет магазине kira-mebel.даааа и в 
правду говорят -бесплатный сыр в мышеловке.
администрация этого магазина-просто кидаловы.разводят как 
лохов.Пишут-доставка 200-250 рублей этаж.А на самом деле грузят как 
хотят.Диван состоит из двух частей-и берут за каждую часть-за подъём.
Качество обслуживание как у бандитов!берегите нервы не покупайте-у этих 
подонков.А диваны ВАШЕГО КАЧЕСТВА- надо -просто дарить малоимущим!.и как 
я понял гарантия у вас 2 метра от квартиры!!
Guest #2332731
Rate this post
• ▲ useful
▼ not useful
> But how do I fix this problem?
Try using a intermediate std_logic_vector(63 downto 0) signal (or 
variable).

Another possible problem is that you use a std_logic_vector to adress a 
array:
1
s_rstorage(ColumnAddress_End downto ColumnAddress_Start)   -- should be a integer?
Usually you must use an integer to adress parts of an array.
Guest #2335481
Rate this post
• ▲ useful
▼ not useful
Сток интернет магазин Мебельной Фабрики «КИРА» недорогие диваны и кресла 
в Москве.


Выбор мягкой мебели в нашем сток интернет магазине - один из самых 
быстрых и удобных способов приобретения диванов и кресел не выходя из 
дома, квартиры или офиса в г. Москве. Мы предлагаем Вам воспользоваться 
данной формой услуг. На страницах сайта Вам будут предложены фото 
каталоги с различными моделями мягкой мебели и каталог с мебельными 
тканями (производства России, Европы, Америки и Турции). Также Вы 
узнаете о материалах, используемых при производстве мягкой мебели, 
способах её трансформации и размерах. Информацию о стоимости Вы найдёте 
на странице понравившейся модели. Мы предлагаем вам купить диван дешево 
в Москве от производителя без перекупщиков и лишних переплат, а при 
повторном заказе или при заказе двух и более диванов вы получите скидку 
5% на каждый последующий диван. Желаем Вам приятных покупок!
Хотите купить оригинальный диван или кресло которого ещё не у кого нет? 
У нас на фабрике вы можете заказать подобную разработку, например на 
базе любого дивана еврокнижка можно сделать угловой диван или кресло для 
отдыха в итоге вы первые получите оригинальный диванчик, а наша фабрика 
новую модель дивана

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.