用VHDL设计信号发生器
Posted lhkhhk
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用VHDL设计信号发生器相关的知识,希望对你有一定的参考价值。
信号发生器要求:
信号发生器程序:
library ieee;
use ieee.std_logic_1164.all;
entity signal_gen1 is
port(
clk:in bit;
wave:out bit
);
end signal_gen1;
architecture bhv of signal_gen1 is
begin
process
variable count: integer range 0 to 7;
begin
wait until clk‘event and clk=‘1‘;
case count is
when 0 => wave <=‘0‘;
when 1 => wave <=‘1‘;
when 2 => wave <=‘0‘;
when 3 => wave <=‘1‘;
when 4 => wave <=‘1‘;
when 5 => wave <=‘1‘;
when 6 => wave <=‘0‘;
when 7 => wave <=‘0‘;
end case;
count := count+1;
end process;
end bhv;
RTL原图:
仿真图:
以上是关于用VHDL设计信号发生器的主要内容,如果未能解决你的问题,请参考以下文章
VHDL顶层原理图里输出信号仿真时出现Node missing source是啥意思?好像是输出信号里的定义有点问题