我的记录定义如下
type ifx_t is
record
data : std_logic_vector(127 downto 0);
address : std_logic_vector (19 downto 0);
WrReq : std_logic;--
RdReq : std_logic; --
end record;
type Array_ifx_t is array (0 to 2) of ifx_t;
Run Code Online (Sandbox Code Playgroud)
我必须初始化这个记录数组的实例,我尝试了以下方式,它不起作用
signal pair_in : Array_ifx_t:= (others =>((others =>'0'),(others=>'0'),'0','0'));
Run Code Online (Sandbox Code Playgroud)
请帮助.
是否有任何好的,现有的软件工具可以帮助生成C头文件,其中#defines用于寄存器偏移以及来自VHDL的位定义?如果确实存在任何此类工具,它们对VHDL有什么限制以及如何指定要导出的内容?
到目前为止,我已经找到了这些工具,但它们并不是我正在寻找的:
基于这些工具,我也感兴趣,如果正确的工作流程是生成C和VHDL而不是尝试直接从VHDL(可能在注释中添加额外的标签)到C.
我正在建立一个关于某种库的文档,它包含一个C/C++部分和一个VHDL部分,以及一些有指导性的doxygen页面.他们必须被置于一个独立的群体中.到目前为止,一切都很有效,漂亮而蓬松......
但是,如果我想通过同时使用OPTIMIZE_OUTPUT_VHDL = YES和优化c子目录的输出来优化vhdl子目录中的输出OPTIMIZE_OUTPUT_C = YES呢?
据我所知,在我的情况下使用doxygen-tags并不是最佳的,因为它在每个子目录中引入了新的doxyfile.conf文件,并在每个子目录中独立运行doxygen.所以,这样做我不能将两个部分(c + vhdl)放在同一组的不同子组中,并且两个部分之间的链接是不可能的.此外,整个模块应该是"自包含的",可以包含在更大的文档中,而不需要在此解决方案中涉及特殊的构建结构......
你会怎么做?
我在VHDL中有一个信号声明如下:
signal Temp_Key : std_logic_vector(79 downto 0);
Run Code Online (Sandbox Code Playgroud)
这Temp_Key通过for循环31次并被修改.我想将31个不同的数据存储Temp_Keys在一个数组中.
是否可以在VHDL中使用多维数组来存储80位信号?
是否有一个通用的转换函数将整数类型对象转换为VHDL中的实数类型?这是针对测试平台的,因此可合成性不是问题.
是什么区别type,并subtype在VHDL和我应该在哪里使用?
我的理解是,subtype只是缩小了其中一种主要类型的版本,例如integer:subtype small_integer is integer range -128 to 127;主要类型上可能的所有操作也是可能的subtypes(当然,有一些限制).此外,最好subtypes用于防止错误.
那么目的是type什么?
是什么区别donwto,并to为integers?(为了得到重点,这是一个例子)
subtype bit_index is integer range 31 downto 0;
subtype bit_index is integer range 0 to 31;
谢谢 !
与实体相比,函数显然不那么冗长.但它意味着许多缺点,包括:
似乎可以递归调用函数.可能不是实体的情况吗?如果是这样,除了美学目的之外,还有什么理由使用功能吗?
下面是我正在运行的代码.我的问题是为什么wait until在modelsim 中没有第三个触发器?控制台输出很简单GOT HERE.它从来没有上线GOT HERE 2.我认为wait until <SIGNAL> = 1连续两次相同会很好,因为两次都是正确的.我没有在那里添加'事件,所以我不认为模拟器需要看到边缘.谁能解释这种行为?
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity example_wait_failure is
end example_wait_failure;
architecture behave of example_wait_failure is
signal r_CLK_TB : std_logic := '0';
begin
r_CLK_TB <= '1' after 20 ns, '0' after 40 ns, '1' after 60 ns;
p_TEST : process
begin
wait until r_CLK_TB = '1';
report "GOT HERE" severity note;
wait until r_CLK_TB = '1';
wait until r_CLK_TB = '1';
report …Run Code Online (Sandbox Code Playgroud) 自从我的第一个VHDL课程以来,我一直在摸不着头脑,并决定在这里发布我的问题.
Given that I have a declared entity (and also an architecture of it) and want to instantiate it inside another architecture, why is it that I seemingly have to redeclare the "entity" (component) inside this containing architecture before instantiating it?
Isn't the compiler smart enough to match an instantiation to its architecture just by its name? Where is the need for the component declaration?
我正在学习VHDL,我正在尝试从示例,语法指南和实验中学习.
有一点我不太明白为什么你想要提供多个架构.例如,这个示例MUX代码:
architecture behv1 of Mux is
begin
process(I3,I2,I1,I0,S)
begin
-- use case statement
case S is
when "00" => O <= I0;
when "01" => O <= I1;
when "10" => O <= I2;
when "11" => O <= I3;
when others => O <= "ZZZ";
end case;
end process;
end behv1;
architecture behv2 of Mux is
begin
-- use when.. else statement
O <= I0 when S="00" else
I1 when S="01" else
I2 when S="10" else …Run Code Online (Sandbox Code Playgroud)