【发布时间】:2019-06-07 07:59:52
【问题描述】:
我是最近第一个开始 vhdl 的学生。它目前正在FPGA板上工作。 我希望每当我按下 RESET 按钮时,我的七段码都会有当前时间。有办法解决吗?
我整天都在搜索 stackoverflow。但我找不到解决方案..
-- Time information
constant HOUR_INT : integer := 00; -- I think we should put the current time in here.
constant HOUR_HEX : std_logic_vector(7 downto 0) := X"00";
constant MINUTE_INT : integer := 00;
constant MINUTE_HEX : std_logic_vector(7 downto 0) := X"00";
if reset = '0' then
hour <= conv_std_logic_vector(datetime.hour_int, 5)
在这个代码比例中,为什么我必须在 hout_int 旁边输入 5?
【问题讨论】:
-
这取决于您所称的当前时间。你可以创建一个计时器,但你必须用一些东西来初始化时间。我需要有关您的系统的更多信息来帮助您。您的 FPGA 有互联网连接吗?