【发布时间】:2020-11-23 01:21:51
【问题描述】:
您好,我有以下代码
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity mult is
PORT (in1, in2 : IN UNSIGNED (7 downto 0);
product: OUT UNSIGNED (7 downto 0));
end mult;
Architecture behaviour of mult is
signal prod_sig: UNSIGNED (7 downto 0);
begin
product<=in1*in2; --this cause an error because it needs to be truncated to its 8 bit equivalent
end behaviour;
请有人帮我理解如何截断产品
【问题讨论】: