如何在Xilinx中定义时钟输入

发布于 2024-08-31 00:01:55 字数 274 浏览 11 评论 0原文

嘿,我几乎没有使用 Xilinx 的经验。我有一个数字逻辑课程的小组项目即将到期,我的合作伙伴(本应负责 Xilinx 模拟)决定放弃我。所以我想在最后一刻弄清楚这一点。

我使用一些 JK 触发器设计了一个同步计数器,我需要定义 FJKC 的 CLK 输入。

我已经绘制了正确的原理图,但我无法弄清楚如何定义时钟输入。

任何帮助表示赞赏,是的,这是作业。我只是在网上找不到任何基本的 xilinx 文档/教程,而且老实说我没有时间学习整个 IDE。

我正在使用 VHDL

Hey, I have almost no experience with Xilinx. I have a group project for a Digital Logic course that is due soon, where my partner, who was supposed to take care of the Xilinx simulations decided to bail on me. So here I am trying to figure it out last minute.

I have designed a synchronous counter using a few JK Flip Flops and I need to define the CLK input for the FJKCs.

I have drawn up the correct schematic, but I cannot figure out how to define a clock input.

Any help appreciated, and yes, this is homework. I just can't find any basic xilinx documentation/tutorials online and I honestly don't have time to learn the whole IDE.

I'm using VHDL

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻找我们的幸福 2024-09-07 00:01:55

想象一下您有一个示例设备,如下所示:

ENTITY SampleDevice IS 
    PORT 
    ( 
        CLK : IN std_logic
    );
END SampleDevice;

为了将 CLK 信号附加到 FPGA 中的真实时钟输入,您应该将其设置为顶级模块并创建一个带有条目的 UCF 文件:

NET "CLK"  LOC = "P38";

>P38是Xilinx Spartan 3 XC3S200中的时钟输入。

Imagine that you have a sample device as follows:

ENTITY SampleDevice IS 
    PORT 
    ( 
        CLK : IN std_logic
    );
END SampleDevice;

In order to attach CLK signal to a real clock input in your FPGA you should set it as Top Module and create an UCF file with an entry:

NET "CLK"  LOC = "P38";

The P38 is the clock input in Xilinx Spartan 3 XC3S200.

那小子欠揍 2024-09-07 00:01:55

看看这个例子。

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;    -- for the unsigned type

entity counter_example is
generic ( WIDTH : integer := 32);
port (
  CLK, RESET, LOAD : in std_logic;
  DATA : in  unsigned(WIDTH-1 downto 0);  
  Q    : out unsigned(WIDTH-1 downto 0));
end entity counter_example;

architecture counter_example_a of counter_example is
signal cnt : unsigned(WIDTH-1 downto 0);
begin
  process(RESET, CLK) is
  begin
    if RESET = '1' then
      cnt <= (others => '0');
    elsif rising_edge(CLK) then
      if LOAD = '1' then
        cnt <= DATA;
      else
        cnt <= cnt + 1;
      end if;
    end if;
  end process;

  Q <= cnt;

end architecture counter_example_a;

来源

Check out this example.

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;    -- for the unsigned type

entity counter_example is
generic ( WIDTH : integer := 32);
port (
  CLK, RESET, LOAD : in std_logic;
  DATA : in  unsigned(WIDTH-1 downto 0);  
  Q    : out unsigned(WIDTH-1 downto 0));
end entity counter_example;

architecture counter_example_a of counter_example is
signal cnt : unsigned(WIDTH-1 downto 0);
begin
  process(RESET, CLK) is
  begin
    if RESET = '1' then
      cnt <= (others => '0');
    elsif rising_edge(CLK) then
      if LOAD = '1' then
        cnt <= DATA;
      else
        cnt <= cnt + 1;
      end if;
    end if;
  end process;

  Q <= cnt;

end architecture counter_example_a;

Source

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文