我是VHDL中的新手,我需要在VHDL程序中做一个2Hz或0.5Hz的暂停,用于计数器项目。 在另一方面,我有以下代码: architecture behavior of Counter is
signal q: std_logic_vector(7 downto 0);
begin
process(clock, choose)
begin
if clear = '1
我有多个属于一起的输入(在相同的时钟等采样),但在逻辑上不是一个矢量(即不是并行总线)我需要修改的代码。 此前,他们被定义为 type my_type is array (my_width - 1 downto 0) of std_logic;
signal my_signal : my_type;
直到现在,为此,我一直用这个: subtype my_subtype is std_logi
所以,我创建了VHDL中组件的分层设计。目前的顶级实体如下。 library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
--This component takes 2 numbers written in scientific notation and returns the same numbers wit
我在看this example和下面的回答这是一个很好的解决方案,以产生两个的补: library ieee;
use ieee.numeric_std.all;
entity twoscomplement is
generic
(
Nbits : positive := 8
);
port
(
A : in unsigned (Nb
enter image description here 这是我4比1 MUX的简单示意图。和我连接LOGIC到LOGIC_VECTOR时遇到问题... 这里是我的测试台代码。我只是想展示MUX的所有可能输入的性能。它编译得很好,但它不像我预期的那样工作。 我猜新声明的矢量“X”和“我”是不是与原理的实际输入链接 LIBRARY ieee;
USE ieee.std_logic_1164.ALL
我有这个非常简单的16位和门在VHDL结构形式写入: 文件上传here。 library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity and_16bit is
Port (
A : in std_logic_vector(15 downto 0);
B : in std_logic_vector(15 downto 0)
我用VHDL多维数组工作,我有以下VHDL代码: type mem_array is array(0 to 7) of STD_LOGIC_VECTOR (31 downto 0);
我是一个总的初学者到VHDL和我的问题是关于我的数组的大小声明,通过实例化这个数组是否意味着我有256位(8位大0到7)每个32位的位置,还是我只有8位32位每个?
我刚才写的: library ieee;
use ieee.std_logic_1164.all;
entity and_gate is
port(
input_1 : in std_logic;
input_2 : in std_logic;
and_result : out std_logic;
);
end and_gate;
architectu
我必须比较功能代码和rtl代码。下面的代码被写为一个16位输入的二分量结构代码。我试图编写以下电路: 在这里,我所包围的代码和测试台: library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity two_s_complement_16bit_rtl is
Port (A : in STD_LOGIC_VECTOR (15 downto 0);
我想用VHDL实现SR触发器。我编写了触发器的代码以及测试平台。但测试平台不能正确编译,并给出我无法弄清楚的错误。我正在使用ghdl进行编译。请帮忙。 这是触发器的代码。 library ieee;
use ieee.std_logic_1164.all;
entity sr_flipflop is
port
(
s,r,clock: in std_logic;