求大神指点,下面这个FPGA程序的问题是什么,怎么修改?
1个回答
展开全部
不知能不能帮到你,
下面是vhdl中procedure的语法:
http://www.ics.uci.edu/~jmoorkan/vhdlref/procedur.html
A procedure may declare local variables. These do not retain their values between successive calls, but are re-initialised each time. Array-type parameters may be unconstrainedprocedure PARITY
(signal X : in std_ulogic_vector;
signal Y : out std_ulogic) is
variable TMP : std_ulogic := '0';
begin
for J in X'range loop
TMP := TMP xor X(J);
end loop; -- works for any size X
Y <= TMP;
end PARITY;
procedure中只能定义variable,不能定义signal.
下面是vhdl中procedure的语法:
http://www.ics.uci.edu/~jmoorkan/vhdlref/procedur.html
A procedure may declare local variables. These do not retain their values between successive calls, but are re-initialised each time. Array-type parameters may be unconstrainedprocedure PARITY
(signal X : in std_ulogic_vector;
signal Y : out std_ulogic) is
variable TMP : std_ulogic := '0';
begin
for J in X'range loop
TMP := TMP xor X(J);
end loop; -- works for any size X
Y <= TMP;
end PARITY;
procedure中只能定义variable,不能定义signal.
意法半导体(中国)投资有限公司
2023-06-12 广告
2023-06-12 广告
STM32F103是一款高性能的嵌入式芯片,由意法半导体(STMicroelectronics)公司生产。它是STM32系列芯片之一,具有紧凑、低功耗、高性能等特点,被广泛应用于嵌入式系统中。STM32F103的主要特点包括:1. 集成了A...
点击进入详情页
本回答由意法半导体(中国)投资有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询