打印

谁用altera,来试试下面的代码

[复制链接]
2667|20
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
drentsi|  楼主 | 2013-7-15 20:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 drentsi 于 2013-7-15 20:42 编辑

使用xilinx的V7,xst报告的速度只有151M,不知altera是什么表现?
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity sa_test is
port(
sys_clk :in std_logic;
din_a  :in std_logic_vector(0 to 31);
din_b  :in std_logic_vector(0 to 31);
din_c  :in std_logic_vector(0 to 31);
din_d  :in std_logic_vector(0 to 31);
dout_a : out std_logic_vector(0 to 31);
dout_b : out std_logic_vector(0 to 31);
dout_c : out std_logic_vector(0 to 31);
dout_d : out std_logic_vector(0 to 31)
);
end sa_test;
architecture Behavioral of sa_test is
function ROTL (x: std_logic_vector(0 to 31);n :integer) return std_logic_vector is
begin
    return (x(n to 31)&x(0 to n-1));
end function  ;
signal b_step0:std_logic_vector(0 to 31);
signal c_step0:std_logic_vector(0 to 31);
signal d_step0:std_logic_vector(0 to 31);
signal a_step0:std_logic_vector(0 to 31);
signal b_step1:std_logic_vector(0 to 31);
signal c_step1:std_logic_vector(0 to 31);
signal d_step1:std_logic_vector(0 to 31);
signal a_step1:std_logic_vector(0 to 31);
signal b_d1:std_logic_vector(0 to 31);
signal c_d1:std_logic_vector(0 to 31);
signal d_d1:std_logic_vector(0 to 31);
signal a_d1:std_logic_vector(0 to 31);
signal r1_step0:std_logic_vector(0 to 31);
signal r2_step0:std_logic_vector(0 to 31);
signal r3_step0:std_logic_vector(0 to 31);
signal r4_step0:std_logic_vector(0 to 31);
signal r1_step1:std_logic_vector(0 to 31);
signal r2_step1:std_logic_vector(0 to 31);
signal r3_step1:std_logic_vector(0 to 31);
signal r4_step1:std_logic_vector(0 to 31);

begin
r1_step0<=ROTL(din_a+din_d,7);
b_step0<=r1_step0 xor din_b;

r2_step0<=ROTL(din_a+b_step0,9);
c_step0<=r2_step0 xor din_c;

r3_step0<=ROTL(b_step0+c_step0,13);
d_step0<=r3_step0 xor din_d;

r4_step0<=ROTL(c_step0+d_step0,18);
a_step0<=r4_step0 xor din_a;
process(sys_clk)
begin
if sys_clk'event and sys_clk='1' then
b_d1<=b_step0;
c_d1<=c_step0;
d_d1<=d_step0;
a_d1<=a_step0;
end if;
end process;

r1_step1<=ROTL(a_d1+d_d1,7);
b_step1<=r1_step1 xor b_d1;

r2_step1<=ROTL(a_d1+b_step1,9);
c_step1<=r2_step1 xor c_d1;

r3_step1<=ROTL(b_step1+c_step1,13);
d_step1<=r3_step1 xor d_d1;

r4_step1<=ROTL(c_step1+d_step1,18);
a_step1<=r4_step1 xor a_d1;

process(sys_clk)
begin
if sys_clk'event and sys_clk='1' then
dout_b<=b_step1;
dout_c<=c_step1;
dout_d<=d_step1;
dout_a<=a_step1;
end if;
end process;
end Behavioral;

相关帖子

沙发
huangxz| | 2013-7-15 22:30 | 只看该作者
指的是哪个数据啊

使用特权

评论回复
板凳
drentsi|  楼主 | 2013-7-15 22:31 | 只看该作者
速度,多少MHz

使用特权

评论回复
地板
GoldSunMonkey| | 2013-7-15 23:20 | 只看该作者
用VIVADO啊,亲

使用特权

评论回复
5
GoldSunMonkey| | 2013-7-15 23:34 | 只看该作者
这个程序你没有分配管脚。所以造成了你时序不太好。
我在一个很大的客户那里,跑到了400MHZ 用的是V7 485T

使用特权

评论回复
6
drentsi|  楼主 | 2013-7-16 09:23 | 只看该作者
不需要分配关键,只需要综合一下,得出关键路径的速度即可

使用特权

评论回复
7
huangxz| | 2013-7-16 12:32 | 只看该作者
在quartus里面综合是通过了,就是不知道在哪里看,:lol

使用特权

评论回复
8
sxhhhjicbb| | 2013-7-16 14:49 | 只看该作者
Q2在时序分析那个地方,叫timing alaysis

使用特权

评论回复
9
lwq030736| | 2013-7-16 15:11 | 只看该作者
Stratix4系列C2级别的能跑175M,关键路径是D_D1到dout_a的路径,最慢的一条需要5.673ns
Arria II 系列C4级的能跑144M
新的28nm的器件不知道,我电脑太破跑不动支持新器件的新软件

使用特权

评论回复
10
drentsi|  楼主 | 2013-7-16 15:32 | 只看该作者
lwq030736 发表于 2013-7-16 15:11
Stratix4系列C2级别的能跑175M,关键路径是D_D1到dout_a的路径,最慢的一条需要5.673ns
Arria II 系列C4级 ...

不错

使用特权

评论回复
11
tergy2012| | 2013-7-16 15:50 | 只看该作者
谢谢分享啊

使用特权

评论回复
12
lwq030736| | 2013-7-17 10:57 | 只看该作者
V7不应该这么慢吧?用的是低速等级的芯片?

使用特权

评论回复
13
drentsi|  楼主 | 2013-7-17 15:57 | 只看该作者
xilinx V7系列
-1,151M
-2,179M
-3,196M

V6系列
-1,145M
-2,168M
-3,195M

无法突破200M

使用特权

评论回复
14
lwq030736| | 2013-7-17 16:43 | 只看该作者
组合逻辑有点长了,看看是否能优化下吧

使用特权

评论回复
15
GoldSunMonkey| | 2013-7-17 23:45 | 只看该作者
drentsi 发表于 2013-7-17 15:57
xilinx V7系列
-1,151M
-2,179M

我觉得是因为你的时钟没有走全局网络。
但是我有点明白你这么做的意思了。

使用特权

评论回复
16
GoldSunMonkey| | 2013-7-17 23:45 | 只看该作者
是不是测试逻辑能够走的速度?

使用特权

评论回复
17
EDAbuffalo| | 2013-8-2 23:05 | 只看该作者
lwq030736 发表于 2013-7-16 15:11
Stratix4系列C2级别的能跑175M,关键路径是D_D1到dout_a的路径,最慢的一条需要5.673ns
Arria II 系列C4级 ...

我是新手,对于关键路径不是很能一眼看出来,求方法,或者相关的资料啊。。。谢谢了大侠

使用特权

评论回复
18
mhanchen| | 2013-8-2 23:10 | 只看该作者
EDAbuffalo 发表于 2013-8-2 23:05
我是新手,对于关键路径不是很能一眼看出来,求方法,或者相关的资料啊。。。谢谢了大侠 ...

直接看时序报告就可以,可以按延时大小、按余量大小排列

使用特权

评论回复
评分
参与人数 1威望 +1 收起 理由
EDAbuffalo + 1 很给力!
19
EDAbuffalo| | 2013-8-2 23:15 | 只看该作者
mhanchen 发表于 2013-8-2 23:10
直接看时序报告就可以,可以按延时大小、按余量大小排列

我还以为需要在写代码的过程中留意最长的那个组合逻辑的路径有多长,,,哎!低端了。。。

使用特权

评论回复
20
mhanchen| | 2013-8-2 23:52 | 只看该作者
EDAbuffalo 发表于 2013-8-2 23:15
我还以为需要在写代码的过程中留意最长的那个组合逻辑的路径有多长,,,哎!低端了。。。 ...

:)

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:学习,思考。

144

主题

1719

帖子

43

粉丝