发信人: bobby (*bobbymm,锁定你做我一生的目标*), 信区: ECE
标 题: [合集]re一个VHDL问题
发信站: 哈工大紫丁香 (2002年09月26日02:31:12 星期四), 站内信件
────────────────────────────────────────
doctorzhang (我不是大夫) 于 Mon Aug 26 18:37:33 2002) 说道:
将你的程序像这样改过就行了
我在Synplicity和MaxPlus中编译通过
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity counter16 is
port(c16M,en:in std_logic;
wave,bclk,dclk,fsck:out std_logic);
end counter16;
architecture rtl of counter16 is
signal count16_4:std_logic_vector(7 downto 0);
signal a,carry16 : std_logic;
begin
a<=en;
process(c16M,a)
begin
if(c16M='1' and c16M'event)then
if(a='1')then
count16_4<=count16_4+'1';
elsif(count16_4="1111")then
count16_4<="00000000";
carry16<=not carry16;
end if;
end if;
end process ;
bclk<=count16_4(2);
dclk<=count16_4(1);
fsck<=count16_4(0);
wave<=carry16;
end rtl;
────────────────────────────────────────
woshimajia ({我知道你要的只是一个拥抱}) 于 2002年08月26日19:26:37 星期一 说道:
你就不能re原文,然后对照着说该怎么改??
【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: 将你的程序像这样改过就行了
: 我在Synplicity和MaxPlus中编译通过
: library IEEE;
: use IEEE.std_logic_1164.all;
: use IEEE.std_logic_unsigned.all;
:
: entity counter16 is
: port(c16M,en:in std_logic;
: wave,bclk,dclk,fsck:out std_logic);
:
: end counter16;
────────────────────────────────────────
doctorzhang (我不是大夫) 于 Mon Aug 26 20:09:20 2002) 说道:
好几个错误呢
而且我事变以后靠过来的
快给我m上
【 在 woshimajia ({我知道你要的只是一个拥抱}) 的大作中提到: 】
: 你就不能re原文,然后对照着说该怎么改??
: 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : 将你的程序像这样改过就行了
: : 我在Synplicity和MaxPlus中编译通过
: : library IEEE;
: : use IEEE.std_logic_1164.all;
: : use IEEE.std_logic_unsigned.all;
: :
: : entity counter16 is
: : port(c16M,en:in std_logic;
: : wave,bclk,dclk,fsck:out std_logic);
: :
: : end counter16;
────────────────────────────────────────
doctorzhang (我不是大夫) 于 Mon Aug 26 20:22:56 2002) 说道:
你M的很多文章水平也不见得高
哼
【 在 woshimajia ({我知道你要的只是一个拥抱}) 的大作中提到: 】
: 水平太低,不m
: 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : 好几个错误呢
: : 而且我事变以后靠过来的
: : 快给我m上
: :
: : 【 在 woshimajia ({我知道你要的只是一个拥抱}) 的大作中提到: 】
: : : 你就不能re原文,然后对照着说该怎么改??
: : : 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
────────────────────────────────────────
bobby (*bobbymm,锁定你做我一生的目标*) 于 Mon Aug 26 20:37:28 2002) 说道:
有三处和原程序有区别。还有其他么??
【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: 将你的程序像这样改过就行了
: 我在Synplicity和MaxPlus中编译通过
: library IEEE;
: use IEEE.std_logic_1164.all;
: use IEEE.std_logic_unsigned.all;
:
: entity counter16 is
: port(c16M,en:in std_logic;
: wave,bclk,dclk,fsck:out std_logic);
:
: end counter16;
:
: architecture rtl of counter16 is
: signal count16_4:std_logic_vector(7 downto 0);
~~~~~~~~~~~~~1
: signal a,carry16 : std_logic;
:
: begin
: a<=en;
: process(c16M,a)
~~~~~~~~2
: begin
: if(c16M='1' and c16M'event)then
: if(a='1')then
: count16_4<=count16_4+'1';
: elsif(count16_4="1111")then
: count16_4<="00000000";
~~~~~~~~~~~3
: carry16<=not carry16;
: end if;
: end if;
: end process ;
: bclk<=count16_4(2);
: dclk<=count16_4(1);
: fsck<=count16_4(0);
: wave<=carry16;
: end rtl;
────────────────────────────────────────
doctorzhang (我不是大夫) 于 Mon Aug 26 20:44:17 2002) 说道:
【 在 bobby (*bobbymm,锁定你做我一生的目标*) 的大作中提到: 】
: 有三处和原程序有区别。还有其他么??
:
: 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : 将你的程序像这样改过就行了
: : 我在Synplicity和MaxPlus中编译通过
: : library IEEE;
: : use IEEE.std_logic_1164.all;
: : use IEEE.std_logic_unsigned.all;
: :
: : entity counter16 is
: : port(c16M,en:in std_logic;
: : wave,bclk,dclk,fsck:out std_logic);
: :
: : end counter16;
: :
: : architecture rtl of counter16 is
: : signal count16_4:std_logic_vector(7 downto 0);
: ~~~~~~~~~~4 ~~~~~~~~~~~~~1
:
: : signal a,carry16 : std_logic;
: :
: : begin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5 你已经盖过了
: : a<=en;
: : process(c16M,a)
: ~~~~~~~~2
:
: : begin
: : if(c16M='1' and c16M'event)then
: : if(a='1')then
: : count16_4<=count16_4+'1';
: : elsif(count16_4="1111")then
: : count16_4<="00000000";
: ~~~~~~~~~~~3
:
: : carry16<=not carry16;
: : end if;
: : end if;
: : end process ;
: : bclk<=count16_4(2);
: : dclk<=count16_4(1);
: : fsck<=count16_4(0);
: : wave<=carry16;
: : end rtl;
:
:
────────────────────────────────────────
peak (嗡嗡) 于 Tue Aug 27 12:00:28 2002) 说道:
谢谢大家帮我找错,不过我的问题不是能不能编译通过的问题,
而是仿真时wave的输出波形与预想的不一样,wave出来的波形始终
是低电平,而我认为wave的波形应该在counter16_4记满16个脉冲后
发生跳变的,它相当于16位计数器的一个进位端么,我用你的程序
仿真出的wave波形也始终是低电平。我想可能是逻辑上的错误,但我还是
看不出我程序中有逻辑错误,sigh........
【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: 将你的程序像这样改过就行了
: 我在Synplicity和MaxPlus中编译通过
: library IEEE;
: use IEEE.std_logic_1164.all;
: use IEEE.std_logic_unsigned.all;
:
: entity counter16 is
: port(c16M,en:in std_logic;
: wave,bclk,dclk,fsck:out std_logic);
:
: end counter16;
:
: architecture rtl of counter16 is
: signal count16_4:std_logic_vector(7 downto 0);
: signal a,carry16 : std_logic;
:
: begin
: a<=en;
: process(c16M,a)
: begin
: if(c16M='1' and c16M'event)then
: if(a='1')then
: count16_4<=count16_4+'1';
: elsif(count16_4="1111")then
: count16_4<="00000000";
: carry16<=not carry16;
: end if;
: end if;
: end process ;
: bclk<=count16_4(2);
: dclk<=count16_4(1);
: fsck<=count16_4(0);
: wave<=carry16;
: end rtl;
────────────────────────────────────────
peak (嗡嗡) 于 Tue Aug 27 12:20:59 2002) 说道:
我知道毛病在哪了,是我描述的有问题,进位端的结构描述应该写成
wave<=count16_4(0) and count16_4(1) and count16_4(2) and count16_4(3);
把那个中间变量carry16去掉就可以了,波形与预想的完全一致,另外我觉得
counter16_4还是应该定义成4位的,我在程序中也是这样做的,当然
counter16_4定义成7位的也能编译通过的
【 在 peak (嗡嗡) 的大作中提到: 】
: 谢谢大家帮我找错,不过我的问题不是能不能编译通过的问题,
: 而是仿真时wave的输出波形与预想的不一样,wave出来的波形始终
: 是低电平,而我认为wave的波形应该在counter16_4记满16个脉冲后
: 发生跳变的,它相当于16位计数器的一个进位端么,我用你的程序
: 仿真出的wave波形也始终是低电平。我想可能是逻辑上的错误,但我还是
: 看不出我程序中有逻辑错误,sigh........
:
:
: 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : 将你的程序像这样改过就行了
: : 我在Synplicity和MaxPlus中编译通过
: : library IEEE;
: : use IEEE.std_logic_1164.all;
: : use IEEE.std_logic_unsigned.all;
: :
: : entity counter16 is
: : port(c16M,en:in std_logic;
: : wave,bclk,dclk,fsck:out std_logic);
: :
: : end counter16;
: :
: : architecture rtl of counter16 is
: : signal count16_4:std_logic_vector(7 downto 0);
: : signal a,carry16 : std_logic;
: :
: : begin
: : a<=en;
: : process(c16M,a)
: : begin
: : if(c16M='1' and c16M'event)then
: : if(a='1')then
: : count16_4<=count16_4+'1';
: : elsif(count16_4="1111")then
: : count16_4<="00000000";
: : carry16<=not carry16;
: : end if;
: : end if;
: : end process ;
: : bclk<=count16_4(2);
: : dclk<=count16_4(1);
: : fsck<=count16_4(0);
: : wave<=carry16;
: : end rtl;
:
:
────────────────────────────────────────
doctorzhang (我不是大夫) 于 Tue Aug 27 13:31:06 2002) 说道:
我已经放出波形了?
【 在 peak (嗡嗡) 的大作中提到: 】
: 我知道毛病在哪了,是我描述的有问题,进位端的结构描述应该写成
: wave<=count16_4(0) and count16_4(1) and count16_4(2) and count16_4(3);
: 把那个中间变量carry16去掉就可以了,波形与预想的完全一致,另外我觉得
: counter16_4还是应该定义成4位的,我在程序中也是这样做的,当然
: counter16_4定义成7位的也能编译通过的
: 【 在 peak (嗡嗡) 的大作中提到: 】
: : 谢谢大家帮我找错,不过我的问题不是能不能编译通过的问题,
: : 而是仿真时wave的输出波形与预想的不一样,wave出来的波形始终
: : 是低电平,而我认为wave的波形应该在counter16_4记满16个脉冲后
: : 发生跳变的,它相当于16位计数器的一个进位端么,我用你的程序
: : 仿真出的wave波形也始终是低电平。我想可能是逻辑上的错误,但我还是
: : 看不出我程序中有逻辑错误,sigh........
: :
: :
: : 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : : 将你的程序像这样改过就行了
: : : 我在Synplicity和MaxPlus中编译通过
: : : library IEEE;
: : : use IEEE.std_logic_1164.all;
: : : use IEEE.std_logic_unsigned.all;
: : :
: : : entity counter16 is
: : : port(c16M,en:in std_logic;
: : : wave,bclk,dclk,fsck:out std_logic);
: : :
: : : end counter16;
: : :
: : : architecture rtl of counter16 is
: : : signal count16_4:std_logic_vector(7 downto 0);
: : : signal a,carry16 : std_logic;
: : :
: : : begin
: : : a<=en;
: : : process(c16M,a)
: : : begin
: : : if(c16M='1' and c16M'event)then
: : : if(a='1')then
: : : count16_4<=count16_4+'1';
: : : elsif(count16_4="1111")then
: : : count16_4<="00000000";
: : : carry16<=not carry16;
: : : end if;
: : : end if;
: : : end process ;
: : : bclk<=count16_4(2);
: : : dclk<=count16_4(1);
: : : fsck<=count16_4(0);
: : : wave<=carry16;
: : : end rtl;
: :
: :
:
:
────────────────────────────────────────
peak (嗡嗡) 于 Tue Aug 27 16:48:05 2002) 说道:
怪了,可是我用你贴出来改过的程序仿真,wave却始终是低电平呀,我用的软件是max+pl
us2
【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: 我已经放出波形了?
:
: 【 在 peak (嗡嗡) 的大作中提到: 】
: : 我知道毛病在哪了,是我描述的有问题,进位端的结构描述应该写成
: : wave<=count16_4(0) and count16_4(1) and count16_4(2) and count16_4(3);
..
: : 把那个中间变量carry16去掉就可以了,波形与预想的完全一致,另外我觉得
: : counter16_4还是应该定义成4位的,我在程序中也是这样做的,当然
: : counter16_4定义成7位的也能编译通过的
: : 【 在 peak (嗡嗡) 的大作中提到: 】
: : : 谢谢大家帮我找错,不过我的问题不是能不能编译通过的问题,
: : : 而是仿真时wave的输出波形与预想的不一样,wave出来的波形始终
: : : 是低电平,而我认为wave的波形应该在counter16_4记满16个脉冲后
: : : 发生跳变的,它相当于16位计数器的一个进位端么,我用你的程序
: : : 仿真出的wave波形也始终是低电平。我想可能是逻辑上的错误,但我还是
: : : 看不出我程序中有逻辑错误,sigh........
: : :
: : :
: : : 【 在 doctorzhang (我不是大夫) 的大作中提到: 】
: : : : 将你的程序像这样改过就行了
: : : : 我在Synplicity和MaxPlus中编译通过
: : : : library IEEE;
: : : : use IEEE.std_logic_1164.all;
: : : : use IEEE.std_logic_unsigned.all;
: : : :
: : : : entity counter16 is
: : : : port(c16M,en:in std_logic;
: : : : wave,bclk,dclk,fsck:out std_logic);
: : : :
: : : : end counter16;
: : : :
: : : : architecture rtl of counter16 is
: : : : signal count16_4:std_logic_vector(7 downto 0);
: : : : signal a,carry16 : std_logic;
: : : :
: : : : begin
: : : : a<=en;
: : : : process(c16M,a)
: : : : begin
: : : : if(c16M='1' and c16M'event)then
: : : : if(a='1')then
: : : : count16_4<=count16_4+'1';
: : : : elsif(count16_4="1111")then
: : : : count16_4<="00000000";
: : : : carry16<=not carry16;
: : : : end if;
: : : : end if;
: : : : end process ;
: : : : bclk<=count16_4(2);
: : : : dclk<=count16_4(1);
: : : : fsck<=count16_4(0);
: : : : wave<=carry16;
: : : : end rtl;
: : :
: : :
: :
: :
:
:
────────────────────────────────────────
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:203.057毫秒