- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have 2 2-dimension signals:
type signed_2d is array (0 to 7) of signed(13 downto 0); type signed_2dx2 is array (0 to 7) of signed(27 downto 0); signal short_x: signed_2d; signal long_x: signed_2dx2; Could someone show me how to point to the sub-elements of those signal please? For more obvious: I would like to signed-extend short_x and store it as long_x: long_y(0 to 7)(13 downto 0) <= short_x(0 to 7); <<=== the error is here :( long_y(0 to 7)(27 downto 14) <= (others => short_x(0 to 7)'high); and the error: Error (10381): VHDL Type Mismatch error at Normalized_LMS.vhd(47): indexed name returns a value whose type does not match "signed_2dx2", the type of the target expressionLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I have 2 2-dimension signals: type signed_2d is array (0 to 7) of signed(13 downto 0); type signed_2dx2 is array (0 to 7) of signed(27 downto 0); signal short_x: signed_2d; signal long_x: signed_2dx2; Could someone show me how to point to the sub-elements of those signal please? For more obvious: I would like to signed-extend short_x and store it as long_x: long_y(0 to 7)(13 downto 0) <= short_x(0 to 7); <<=== the error is here :( long_y(0 to 7)(27 downto 14) <= (others => short_x(0 to 7)'high); and the error: Error (10381): VHDL Type Mismatch error at Normalized_LMS.vhd(47): indexed name returns a value whose type does not match "signed_2dx2", the type of the target expression --- Quote End ---
signal long_y : signed_2dx2
process(short_x)
begin
for i in 0 to 7 loop
long_y(i) <= resize(short_x(i),28);
end loop;
end process;

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page