J90
Junior Member level 1
Hi there,
Let's take the following example:
Where:
I know the above expression results in a std_logic_vector of 16 elements. This after receiving a warning from the compiler for a size mismatch in the assignment.
Is there any way to predict the size in bits of the above std_logic_vector?
Thanks
Let's take the following example:
Code:
rom_addr := std_logic_vector(unsigned(ram_db)*((font_width*font_height)/8) + (unsigned(pix_x) + unsigned(pix_y)*font_width)/8);
Where:
Code:
signal ram_db: std_logic_vector(7 downto 0);
constant font_width: integer range integer'right downto 8 := 8;
constant font_height: integer range integer'right downto 8 := 8;
variable pix_x, pix_y: std_logic_vector(4 downto 0);
I know the above expression results in a std_logic_vector of 16 elements. This after receiving a warning from the compiler for a size mismatch in the assignment.
Is there any way to predict the size in bits of the above std_logic_vector?
Thanks