|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
library ieee;: N* o u9 a% p( N
use ieee.std_logic_1164.all;
% v2 G. l) Z: M: o9 puse ieee.std_logic_unsigned.all;
3 W! P& @: D9 Qentity adder8 is
2 \, x$ p- `& T! I' }+ i% gport(a,b:in std_logic_vector(7 downto 0);+ S! {( ?! o9 v# c$ }
cin:in std_logic;1 x% O& ?( \6 A: ^
sumout std_logic_vector(7 downto 0);2 J, f* d6 x! W& M+ `9 }/ d! J
coutout std_logic);" R( o, y: H6 C) |- E
end;
; t) b. Q) t D4 J$ ]5 Marchitecture bhv of adder8 is# G2 J r+ w' x5 w! D$ Y" l
signal a0,b0,cin0,s:std_logic_vector(8 downto 0);6 o: h( g8 X Q P, N" ~
begin4 X, ]; t% V; V/ }; d
a0<=’0’&a;b0<=’0’&b;cin0<="00000000"&cin;
' i6 A5 q- q9 ?, _. Vs<=a0+b0+cin0;
# C# p0 K- l8 J s p# u$ Asum<=s(7 downto 0);
2 b' u; V/ ~3 X" F) g% m, Dcout<=s(8);
9 [0 K5 n, X8 u4 j2 @end;5 ]( N9 `8 t) l0 b
; ?+ x1 l& ^5 X, h+ t" i
7 V c5 R8 _6 g2 B出现Error: Text Design File syntax error: Text Design File contains a symbolic name where ASSERT, CONSTANT, DEFINE, DESIGN, FUNCTION, OPTIONS, PARAMETERS, SUBDESIGN, or TITLE was expected 的错误,该如何解决; F, K) E- w9 z; R
|
|