找回密码
 注册
关于网站域名变更的通知
查看: 3893|回复: 1
打印 上一主题 下一主题

求救—谁能帮忙改一改

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-10-31 17:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
library ieee;$ ^% O: U" @; {/ C' x
use ieee.std_logic_1164.all;& G0 |5 t' C+ _) c& S3 U. \
use ieee.std_logic_arith.all;- ^) R; c/ F- o( g3 x  V
use ieee.std_logic_unsigned.all;( ?8 p' s* ^$ X' H  q! V& G
entity hour is) Y7 i$ b9 f( y1 f9 ?. ?/ e- B! K
port(clk_h,clk_t,tp_h,res_h:in std_logic;
  l0 h7 _/ W: P# j, X6 e0 x8 o  hset:in std_logic;$ m8 H; G, M! f# B% T& Y, }" G% I/ |
  sig_h:in std_logic_vector(2 downto 0);, u- L& b* T: D; x
  din_h1ut std_logic_vector(3 downto 0);
+ ?  G2 J: w7 x  k$ n/ ]  din_h0ut std_logic_vector(3 downto 0);& C- J6 ~; h; ]; p
  pmut std_logic;/ q# ?1 o$ }5 A, r2 j
  cp_h:out std_logic);
" z+ y& c0 b: j) X  8 {5 g6 W$ p: e# a8 A! W
end hour;
9 G7 _' z# B4 }% qarchitecture behav of hour is9 Q% |! }4 |* q
signal clk:std_logic;, P0 N, s/ H4 P1 s. K6 b2 I
begin& t9 \9 u, D# {) w" J
    process(clk_h,clk_t,tp_h,sig_h,res_h,hset)7 F+ W3 d# h/ z
     variable cq1,cq2,cq3,cq4:std_logic_vector(3 downto 0);+ v# c% G# }) [% I+ e( w2 F* v) E
     variable co1:std_logic;, @( }) d' m9 Q' `* z0 @3 s
     variable co2: std_logic_vector(7 downto 0) ;
  m  P( v$ o; S; M5 g- E9 R   begin ' N. Y4 c! H, m3 z9 G
    if sig_h="001"and tp_h='1' then clk<=clk_t;5 t) ~3 y3 g: P# y7 g
   else clk<=clk_h;7 L2 j0 C0 h1 u  P8 s/ B+ w: H
   end if;4 L: x8 g1 k! L
    if res_h='1' then cq1:="0000";cq2:="0000";cq3:="0000";cq4:="0000";co2:= (OTHERS =>'0');
. i6 }8 S2 N# C, d  T, H5 Q       elsif  clk'event and clk='0' then cq1:=cq1+1; cq3:=cq3+1;5 e1 I( j3 b; N; F
      if cq1="1010" then cq2:=cq2+1;cq1:="0000";0 v' `' E; r6 g
            end if;
# i/ N) b! j8 s& Q* |) b; i            if  cq2="0010" and cq1="0100" then
# T! u' k) ^7 ]+ l/ ~: }6 v% B; M    cq1:="0000";cq2:="0000";
/ P7 X1 o3 v4 t    co1:='1';& N- W' E' Y! \: J* l3 Y& D
   else co1:='0';
5 H1 Z: v0 b$ S      end if;* y' j# Y" a* Z7 b" T( I4 G
      if cq3="1010" then ( |# Q% x+ n4 s6 X8 s3 w* i( s
      cq4:=cq4+1;! o' F2 F) b: V3 ]0 z. l, B  v
      cq3:="0000";
. F% O7 [# x1 Z, n    end if;+ J$ `, E/ [; D/ a3 k0 Y& Y; t
   if cq4="0001" and cq3="0010" then $ I' u9 x* T. O
         cq3:="0000";cq4:="0000";co2:=co2+1;4 }1 U& _* e+ G9 z- X! n7 W
      end if;
  p2 G3 B# \. M3 n    end if;
+ o  u- A+ O' P; H( N  if hset='1' then   
" P1 N5 T( W2 M1 h          din_h1<=cq2;din_h0<=cq1;cp_h<=co1;
. [& }6 A/ w/ c- c1 e, I         else
8 {$ P! r  ?2 b. T           if co2(0)='1' then
1 {. k- H. i& o3 V1 u, F  v0 y" b% C             if cq3="0000" and cq4="0000" then cq3:="0010";cq4:="0001";pm<='0';. m" r% m( Z1 y& w/ T/ s
             end if;* u" D: i& L% X- ?; k
             pm<='1';
" G, w' K5 t+ m/ @% [            else pm<='0';
) h" f/ s5 c, x4 X) E( h* T            end if;
* Y8 z9 k  C# h! B8 D! z            if co2(0)='0' and cq3="0000" and cq4="0000" then cp_h<='1';5 \( V4 K: t8 ?* a
              else cp_h<='0';
, s2 m5 S$ w9 @             end if;! x+ i/ R* D+ ^' s* t! s' j
           din_h1<=cq4;din_h0<=cq3;  
0 Q1 @% v/ F. K7 d. ?0 \; \+ K- J        end if;  --12/24转换( B! L. f3 `) O9 p( A! T/ R
  
1 m5 m( p' |: S     end process;
* f+ v9 H3 H6 g/ m$ I2 dend behav;

该用户从未签到

2#
 楼主| 发表于 2009-10-31 17:10 | 只看该作者
报错:' _  ~1 n5 Z+ y5 w( }1 y
Info: *******************************************************************5 i6 \" P. j! B- c' m+ a. l7 {
Info: Running Quartus II Analysis & Synthesis7 E$ ?6 ^2 F' r  a9 E2 m, A
        Info: Version 9.0 Build 132 02/25/2009 SJ Full Version, m/ R/ z  p, Z/ a+ l( H
        Info: Processing started: Sat Oct 31 17:04:02 2009
2 B/ k/ t- g# ], DInfo: Command: quartus_map --read_settings_files=on --write_settings_files=off hour -c hour
4 T, L# S! l1 D6 w/ [1 b2 xInfo: Found 2 design units, including 1 entities, in source file hour.vhd( k2 v1 u% ]5 K2 ~! K
        Info: Found design unit 1: hour-behav
8 Z5 f9 c( u' _# u5 F2 F        Info: Found entity 1: hour) k" K  F- [# K$ B; |6 U- A( T
Info: Elaborating entity "hour" for the top level hierarchy& U+ t8 N" y+ E
Warning (10492): VHDL Process Statement warning at hour.vhd(29): signal "clk" is read inside the Process Statement but isn't in the Process Statement's sensitivity list0 K0 h; T/ a; ~1 @
Warning (10631): VHDL Process Statement warning at hour.vhd(20): inferring latch(es) for signal or variable "pm", which holds its previous value in one or more paths through the process
3 d. _: L5 R0 n6 C# k$ lInfo (10041): Inferred latch for "pm" at hour.vhd(20)
0 [1 L* t3 N6 |1 ?6 lError (10821): HDL error at hour.vhd(48): can't infer register for "cq4[0]" because its behavior does not match any supported register model2 G# U0 M0 c; {& q" Q1 N
Error (10821): HDL error at hour.vhd(48): can't infer register for "cq4[1]" because its behavior does not match any supported register model
; g* P- s9 {; @2 u- X8 rError (10821): HDL error at hour.vhd(48): can't infer register for "cq4[2]" because its behavior does not match any supported register model! w, w- s) R  F8 ]8 [; h# V2 X5 h
Error (10821): HDL error at hour.vhd(48): can't infer register for "cq4[3]" because its behavior does not match any supported register model9 \1 w" J5 I5 N0 a. r
Error (10821): HDL error at hour.vhd(48): can't infer register for "cq3[0]" because its behavior does not match any supported register model6 Y5 K  ~  n7 i; f
Error (10821): HDL error at hour.vhd(48): can't infer register for "cq3[1]" because its behavior does not match any supported register model) M! i- }; b' p) o
Error (10821): HDL error at hour.vhd(48): can't infer register for "cq3[2]" because its behavior does not match any supported register model
* j. t; ?+ K  c/ cError (10821): HDL error at hour.vhd(48): can't infer register for "cq3[3]" because its behavior does not match any supported register model4 E- `  r% A8 L4 g9 H/ q/ H
Error: Can't elaborate top-level user hierarchy* }" U( ~+ W! W) f' p) E, T, y) p
Error: Quartus II Analysis & Synthesis was unsuccessful. 9 errors, 2 warnings
' w; G1 \" X2 b3 \; w        Error: Peak virtual memory: 184 megabytes
3 T0 i$ L# m7 F( z, Y5 A! a        Error: Processing ended: Sat Oct 31 17:04:04 2009$ K( k4 ^4 }/ a3 d& E: P
        Error: Elapsed time: 00:00:02
7 O9 d8 R! a* z: N. x% O& ?        Error: Total CPU time (on all processors): 00:00:01$ p/ A! J, j0 n+ d
Error: Quartus II Full Compilation was unsuccessful. 11 errors, 2 warnings
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-10-5 14:15 , Processed in 0.109375 second(s), 24 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表