Forum Discussion
Hi Ean,
i have chosen different output bus size in order to demonstrate the bug. The bug manifests itself when subscript is used on the right side.
When I resize the bus, the o_bug[16 downto 0] must be connected to i[16 downto 0], only bit 17 should be removed. Instead the whole connection is removed.
This happens only if the type test_type_t is defined in a generic package.
Best regards,
Ivan
Hi Ivan,
If the bus length of input and output were different the Quartus will show error messages. You may consider to change the architecture in your design to fulfill your requirement.
Thanks,
Ean
- Ivan004 years ago
New Contributor
Hi Ean,
I want to connect 16 lower bits of the 17 bit signal to the external port, i.e.
signal a : std_logic_vector(16 downto 0);
signal b: std_logic_vector(15 downto 0);
b <= a(15 downto 0);
I have provided an example where it does not work. The example is not from my working project, I have stripped it down in order to easily demonstrate the issue.
Can you see the problem here?
b(15 downto 0) must be connected to a(15 downto 0), but it is removed.
Best regards,
Ivan
- YEan4 years ago
Contributor
Hi Ivan,
Yes, this option works fine when there are only one statement in the architecture. If there are two concurrent statements in the architecture as shown in the previous example, the most significant signal will be connected and the least significant signal will not be connected.
You may refer to this https://stackoverflow.com/questions/12144019/how-to-write-to-two-output-ports-from-inside-architecture-in-vhdl on how to connect one input to multiple outputs.
Thanks,
Ean
- Ivan004 years ago
New Contributor
Hi Ean,
the link to the stack overflow page does not apply here, it is completely different issue.
I have simplified my example further, so that two ports do not mislead anybody. Now there is only one signal at the output, and it is still not connected. I hope you can see the issue this time.
library ieee; use ieee.std_logic_1164.all; use work.parallel_pixel_type_pkg.all; entity bug is port( i : in std_logic_vector(17 downto 0); o_bug : out std_logic_vector(16 downto 0) ); end entity; architecture rtl of bug is signal sp : test_type_t; begin sp.pixel_data(0) <= i; o_bug <= sp.pixel_data(0)(16 downto 0); end rtl;Best regards,
Ivan