S
sjamil02
Guest
안녕 모두,
나는 새로운 디지털 디자인합니다.난 참조) (내 VHDL 코드를 시뮬레이션하려고 포함 testbench하십시오.
도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 tb_keypad입니다
끝 tb_keypad;
tb_keypad의 행동은 아키텍처입니다
신호 keypad_in : std_logic_vector (6 downto 0);
- 신호 dec_in : std_logic_vector (3 downto 0);
신호 CLK : std_logic : = '0 ';
신호 reset_N : std_logic;
신호 계산 : std_logic_vector (2 downto 0);
- 신호의 개수 : std_logic;
신호 dec_out : std_logic_vector (3 downto 0);
신호 accept_out : std_logic;
신호 error_out : std_logic;
구성 요소가 키패드
포트 (keypad_in : std_logic_vector (6 downto 0);
- dec_in : std_logic_vector (3 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
카운트 : inout의 std_logic_vector (2 downto 0);
dec_out : inout의 std_logic_vector (3 downto 0);
- 카운트 : 아웃 std_logic;
accept_out : 아웃 std_logic;
error_out : 아웃 std_logic);
엔드 구성 요소;
시작
test_unit : 키패드
포트 매핑 (keypad_in => keypad_in,
CLK => CLK,
카운트 => 카운트,
dec_out => dec_out,
reset_N => reset_N,
accept_out => accept_out,
error_out => error_out);test_block : 블록
시작
keypad_in의 <= "0001010",
"0000010"NS 후 100,
"0000100"NS 후 200,
"0000110"NS 후 300,
"0001000"NS 후 400,
"0001011"NS 후 500,
"1111010"NS 후 600,
"1110010"NS 후 700,
"1110100"NS 후 800,
"1110110"NS 후 900,
"1111001"NS 후 1000,
"1111011"NS 후 1100;
reset_N의 <= '0 ', '1'50 후 NS, '0 '100 이후 NS, '0'이후 200 NS;
CLK의 <이 = NS 30 일 후에하지 CLK;
엔드 블록;
최종 행동;도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 keypad_dec_lb입니다
끝 keypad_dec_lb;의 keypad_dec_lb decoder_logicblock이 아키텍처는
신호 연결 : std_logic_vector (3 downto 0);
구성 요소 keypad_dec_lb입니다
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic;
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
엔드 구성 요소 keypad_dec_lb;
신호 skey_pad : std_logic_vector (6 downto 0);
신호 sclk : std_logic;
신호 sreset_N : std_logic;
신호 slogblk_input : std_logic_vector (3 downto 0);
신호 saccept_out : std_logic;
신호 serror_out : std_logic;
신호 sdec_out : std_logic_vector (0-3);
시작
keypad_unit : keypad_dec_lb
포트 매핑 (key_pad => skey_pad,
CLK => sclk,
reset_N => sreset_N,
logblk_input => sdec_out,
accept_out => saccept_out,
error_out => serror_out,
dec_out => 연결
);
최종 decoder_logicblock;도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 키패드가
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic : = '0 ';
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
끝 키패드;의 키패드 rtl_decoder는 건축입니다
시작
프로세스 (CLK)
시작
사건 key_pad가
때 "0110111"=> dec_out <= "0001";
때 "1010111"=> dec_out <= "0010";
때 "1100111"=> dec_out <= "0011";
때 "0111011"=> dec_out <= "0100";
때 "1011011"=> dec_out <= "0101";
때 "1101011"=> dec_out <= "0110";
때 "0111101"=> dec_out <= "0111";
때 "1011101"=> dec_out <= "1000";
때 "1101101"=> dec_out <= "1001";
때 "0111110"=> dec_out <= "0000";
때 "1011110"=> dec_out <= "1010";
때 "1101110"=> dec_out <= "1011";
사람이있을 땐 => dec_out <= "여기서 XXXX";
엔드 케이스;
최종 처리;
최종 rtl_decoder;
도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 keypad_lb입니다
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic : = '0 ';
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
끝 keypad_lb;의 keypad_lb logic_block_rtl이 아키텍처는
신호 입력 : std_logic_vector (3 downto 0);
신호 output_1 : std_logic_vector (3 downto 0);
신호 output_2 : std_logic_vector (3 downto 0);
신호 output_3 : std_logic_vector (3 downto 0);
신호 output_4 : std_logic_vector (3 downto 0);
신호 output_5 : std_logic_vector (3 downto 0);
신호 output_6 : std_logic_vector (3 downto 0);
유형 byte_cnt)가므로 (cnt1, cnt2, cnt3, cnt4, cnt5, cnt6;
신호 해제 byte_cnt_state : byte_cnt 수 : = cnt1;
시작
프로세스 (CLK, byte_cnt_state)
카운트 변수 : 정수 : = 0;
시작
다음에, 만약 (reset_N = '1 ')
accept_out의 <= '0 ';
error_out의 <= '0 ';
개수 : = 0;
byte_cnt_state <= cnt1;
싫다
byte_cnt_state <= cnt1;
종료면;
사건 byte_cnt_state가
> 언제 cnt1가 =
output_1 <= logblk_input;
그리고 "만약 (output_1 = 1010")
개수 : = 카운트 1;
byte_cnt_state <= cnt2;
다른 사람
byte_cnt_state <= cnt2;
종료면;
> 언제 cnt2가 =
output_2 <= logblk_input;
그리고 "만약 (output_2 = 0010")
개수 : = 카운트 1;
byte_cnt_state <= cnt3;
다른 사람
byte_cnt_state <= cnt3;
종료면;
> 언제 cnt3가 =
output_3 <= logblk_input;
그리고 "만약 (output_3 = 0100")
개수 : = 카운트 1;
byte_cnt_state <= cnt3;
다른 사람
byte_cnt_state <= cnt3;
종료면;
> 언제 cnt4가 =
output_4 <= logblk_input;
그리고 "만약 (output_4 = 0110")
개수 : = 카운트 1;
byte_cnt_state <= cnt5;
다른 사람
byte_cnt_state <= cnt5;
종료면;
> 언제 cnt5가 =
output_5 <= logblk_input;
그리고 "만약 (output_1 = 1000")
개수 : = 카운트 1;
byte_cnt_state <= cnt6;
다른 사람
byte_cnt_state <= cnt6;
종료면;
> 언제 cnt6가 =
output_6 <= logblk_input;
그리고 "만약 (output_1 = 1011")
개수 : = 카운트 1;
byte_cnt_state <= cnt1;
다른 사람
byte_cnt_state <= cnt1;
종료면;
> 할 때 다른 사람 =
byte_cnt_state <= cnt1;
엔드 케이스;
그때면 (카운트 = 6)
accept_out의 <= '1 ';
error_out의 <= '0 ';
byte_cnt_state <= cnt1;
다른 사람
accept_out의 <= '0 ';
error_out의 <= '1 ';
byte_cnt_state <= cnt1;
종료면;
최종 처리;
최종 logic_block_rtl;
************************************************** *****************
내가 파일을 성공적으로 컴파일 할 수 있지만 그것은 시뮬레이션을 내 gaves 오류를 시작할 때.
# ** 오류 : C : / ModelSim 6.4/VHDL/Keypad/src/KeypadTB.vhd (42) : 나쁜 기본값은 "구성 요소의 바인딩에 대한 예를 들어"test_unit : 키패드.
# (컴포넌트 포트 "카운트"엔터티에 없습니다.)
# ** 경고 : [1] C : / ModelSim 6.4/VHDL/Keypad/src/KeypadTB.vhd가 (42) : (vOpt는 - 3473) 구성 요소 인스턴스 "test_unit : 키패드"바인딩되지 않습니다.
# 최적화 실패
#로드 중 오류 디자인
제발 도와줍니다.
건배
에스 제
나는 새로운 디지털 디자인합니다.난 참조) (내 VHDL 코드를 시뮬레이션하려고 포함 testbench하십시오.
도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 tb_keypad입니다
끝 tb_keypad;
tb_keypad의 행동은 아키텍처입니다
신호 keypad_in : std_logic_vector (6 downto 0);
- 신호 dec_in : std_logic_vector (3 downto 0);
신호 CLK : std_logic : = '0 ';
신호 reset_N : std_logic;
신호 계산 : std_logic_vector (2 downto 0);
- 신호의 개수 : std_logic;
신호 dec_out : std_logic_vector (3 downto 0);
신호 accept_out : std_logic;
신호 error_out : std_logic;
구성 요소가 키패드
포트 (keypad_in : std_logic_vector (6 downto 0);
- dec_in : std_logic_vector (3 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
카운트 : inout의 std_logic_vector (2 downto 0);
dec_out : inout의 std_logic_vector (3 downto 0);
- 카운트 : 아웃 std_logic;
accept_out : 아웃 std_logic;
error_out : 아웃 std_logic);
엔드 구성 요소;
시작
test_unit : 키패드
포트 매핑 (keypad_in => keypad_in,
CLK => CLK,
카운트 => 카운트,
dec_out => dec_out,
reset_N => reset_N,
accept_out => accept_out,
error_out => error_out);test_block : 블록
시작
keypad_in의 <= "0001010",
"0000010"NS 후 100,
"0000100"NS 후 200,
"0000110"NS 후 300,
"0001000"NS 후 400,
"0001011"NS 후 500,
"1111010"NS 후 600,
"1110010"NS 후 700,
"1110100"NS 후 800,
"1110110"NS 후 900,
"1111001"NS 후 1000,
"1111011"NS 후 1100;
reset_N의 <= '0 ', '1'50 후 NS, '0 '100 이후 NS, '0'이후 200 NS;
CLK의 <이 = NS 30 일 후에하지 CLK;
엔드 블록;
최종 행동;도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 keypad_dec_lb입니다
끝 keypad_dec_lb;의 keypad_dec_lb decoder_logicblock이 아키텍처는
신호 연결 : std_logic_vector (3 downto 0);
구성 요소 keypad_dec_lb입니다
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic;
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
엔드 구성 요소 keypad_dec_lb;
신호 skey_pad : std_logic_vector (6 downto 0);
신호 sclk : std_logic;
신호 sreset_N : std_logic;
신호 slogblk_input : std_logic_vector (3 downto 0);
신호 saccept_out : std_logic;
신호 serror_out : std_logic;
신호 sdec_out : std_logic_vector (0-3);
시작
keypad_unit : keypad_dec_lb
포트 매핑 (key_pad => skey_pad,
CLK => sclk,
reset_N => sreset_N,
logblk_input => sdec_out,
accept_out => saccept_out,
error_out => serror_out,
dec_out => 연결
);
최종 decoder_logicblock;도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 키패드가
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic : = '0 ';
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
끝 키패드;의 키패드 rtl_decoder는 건축입니다
시작
프로세스 (CLK)
시작
사건 key_pad가
때 "0110111"=> dec_out <= "0001";
때 "1010111"=> dec_out <= "0010";
때 "1100111"=> dec_out <= "0011";
때 "0111011"=> dec_out <= "0100";
때 "1011011"=> dec_out <= "0101";
때 "1101011"=> dec_out <= "0110";
때 "0111101"=> dec_out <= "0111";
때 "1011101"=> dec_out <= "1000";
때 "1101101"=> dec_out <= "1001";
때 "0111110"=> dec_out <= "0000";
때 "1011110"=> dec_out <= "1010";
때 "1101110"=> dec_out <= "1011";
사람이있을 땐 => dec_out <= "여기서 XXXX";
엔드 케이스;
최종 처리;
최종 rtl_decoder;
도서관의 IEEE;
사용 IEEE.std_logic_1164.all;
엔티티 keypad_lb입니다
포트 (key_pad : std_logic_vector (6 downto 0);
CLK : std_logic에;
reset_N : std_logic에;
logblk_input : std_logic_vector (3 downto 0);
accept_out : 아웃 std_logic : = '0 ';
error_out : 아웃 std_logic;
dec_out : 아웃 std_logic_vector (0-3));
끝 keypad_lb;의 keypad_lb logic_block_rtl이 아키텍처는
신호 입력 : std_logic_vector (3 downto 0);
신호 output_1 : std_logic_vector (3 downto 0);
신호 output_2 : std_logic_vector (3 downto 0);
신호 output_3 : std_logic_vector (3 downto 0);
신호 output_4 : std_logic_vector (3 downto 0);
신호 output_5 : std_logic_vector (3 downto 0);
신호 output_6 : std_logic_vector (3 downto 0);
유형 byte_cnt)가므로 (cnt1, cnt2, cnt3, cnt4, cnt5, cnt6;
신호 해제 byte_cnt_state : byte_cnt 수 : = cnt1;
시작
프로세스 (CLK, byte_cnt_state)
카운트 변수 : 정수 : = 0;
시작
다음에, 만약 (reset_N = '1 ')
accept_out의 <= '0 ';
error_out의 <= '0 ';
개수 : = 0;
byte_cnt_state <= cnt1;
싫다
byte_cnt_state <= cnt1;
종료면;
사건 byte_cnt_state가
> 언제 cnt1가 =
output_1 <= logblk_input;
그리고 "만약 (output_1 = 1010")
개수 : = 카운트 1;
byte_cnt_state <= cnt2;
다른 사람
byte_cnt_state <= cnt2;
종료면;
> 언제 cnt2가 =
output_2 <= logblk_input;
그리고 "만약 (output_2 = 0010")
개수 : = 카운트 1;
byte_cnt_state <= cnt3;
다른 사람
byte_cnt_state <= cnt3;
종료면;
> 언제 cnt3가 =
output_3 <= logblk_input;
그리고 "만약 (output_3 = 0100")
개수 : = 카운트 1;
byte_cnt_state <= cnt3;
다른 사람
byte_cnt_state <= cnt3;
종료면;
> 언제 cnt4가 =
output_4 <= logblk_input;
그리고 "만약 (output_4 = 0110")
개수 : = 카운트 1;
byte_cnt_state <= cnt5;
다른 사람
byte_cnt_state <= cnt5;
종료면;
> 언제 cnt5가 =
output_5 <= logblk_input;
그리고 "만약 (output_1 = 1000")
개수 : = 카운트 1;
byte_cnt_state <= cnt6;
다른 사람
byte_cnt_state <= cnt6;
종료면;
> 언제 cnt6가 =
output_6 <= logblk_input;
그리고 "만약 (output_1 = 1011")
개수 : = 카운트 1;
byte_cnt_state <= cnt1;
다른 사람
byte_cnt_state <= cnt1;
종료면;
> 할 때 다른 사람 =
byte_cnt_state <= cnt1;
엔드 케이스;
그때면 (카운트 = 6)
accept_out의 <= '1 ';
error_out의 <= '0 ';
byte_cnt_state <= cnt1;
다른 사람
accept_out의 <= '0 ';
error_out의 <= '1 ';
byte_cnt_state <= cnt1;
종료면;
최종 처리;
최종 logic_block_rtl;
************************************************** *****************
내가 파일을 성공적으로 컴파일 할 수 있지만 그것은 시뮬레이션을 내 gaves 오류를 시작할 때.
# ** 오류 : C : / ModelSim 6.4/VHDL/Keypad/src/KeypadTB.vhd (42) : 나쁜 기본값은 "구성 요소의 바인딩에 대한 예를 들어"test_unit : 키패드.
# (컴포넌트 포트 "카운트"엔터티에 없습니다.)
# ** 경고 : [1] C : / ModelSim 6.4/VHDL/Keypad/src/KeypadTB.vhd가 (42) : (vOpt는 - 3473) 구성 요소 인스턴스 "test_unit : 키패드"바인딩되지 않습니다.
# 최적화 실패
#로드 중 오류 디자인
제발 도와줍니다.
건배
에스 제