马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 keyway 于 2012-10-17 08:36 编辑
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
ENTITY Controller IS
PORT (
CLOCK : in std_logic;
TSCLK : out std_logic;
RESET_N : in std_logic
);
END Controller;
ARCHITECTURE RTL OF Controller IS
type SDCNT_type is (A,B,C,D,E,F,G);
signal SDCNT : SDCNT_type;
signal SCLK : std_logic;
begin
TSCLK <= not CLOCK WHEN (SCLK or ((SDCNT >= B) and (SDCNT <= G))) = '1' ELSE '0'; <--ERROR
Error (10327): VHDL error at Controller.vhd(56): can't determine definition of operator ""or"" -- found 0 possible definitions
改
TSCLK <= not CLOCK WHEN (SCLK or ((SDCNT >= B) and (SDCNT <= G))) ELSE '0'; <--ERROR
Error (10476): VHDL error at Controller.vhd(56): type of identifier "SCLK" does not agree with its usage as "boolean" type
.....??????????????????.....不知道怎么改?
因为 SDCNT 为自定型态 |