nó báo vậy đó các bác."Error: Can't synthesize current design -- Top partition does not contain any logic"
Thông báo
Collapse
No announcement yet.
code VHDL trên modelsim chạy ko loi và mô phỏng chuẩn.tai sao dùng Quartus 2 lai lỗi
Collapse
X
-
bạn nên gửi kèm file VHDL và file testbench để mọi người có thể tìm hiểu rõ nguyên nhân tại sao...
chuyện Modelsim chạy và Quartus không chạy là chuyện bình thường, Modelsim bạn viết đúng syntax thì nó chạy cho bạn xem thôi (chỉ là dạng function đơn giản), nhưng qua Quartus thì nó sẽ phân tích ngặc nghèo hơn vì compile sẽ tạo ra file phần cứng để bạn nạp xuống FPGA.
-
--dem dong bo 4 bit co ngo dieu khien
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
entity dem_dong_bo_4bit is
port(J,K,T,Cl,Pr,c:in std_logic;
Qa,Qb,Qc,Qd:out std_logic);
end dem_dong_bo_4bit;
architecture dem_dong_bo_4bit_behave of dem_dong_bo_4bit is
component mynot
port(x:IN STD_LOGIC;s:OUT STD_LOGIC);
end component;
component myand
port(x1:in std_logic;
x2:in std_logic;
s:out std_logic);
end component;
component myor
port(x1:in std_logic;
x2:in std_logic;
s:out std_logic);
end component;
component ff_jk
port(J,K,T,Cl,Pr:in std_logic;
Q,notQ:out std_logic);
end component;
signal nc,nQa,nQb,nQc,nQd,and1,and2,and3,and4,and5,and6,a nd7,and8,or1,or2,or3:std_logic;
signal kq1,kq2,kq3,kq4:std_logic;
begin
ffA:ff_jk port map(J=>J,K=>K,T=>T,Cl=>Cl,Pr=>Pr,notQ=>nQa,Q=>kq1) ;
a1:myand port map(x1=>kq1,x2=>c,s=>and1);
n:mynot port map(x=>c,s=>nc);
a2:myand port map(x1=>nQa,x2=>nc,s=>and2);
o1:myor port map(x1=>and1,x2=>and2,s=>or1);
ffB:ff_jk port map(J=>or1,K=>or1,T=>T,Cl=>Cl,Pr=>Pr,notQ=>nQb,Q=> kq2);
a3:myand port map(x1=>kq2,x2=>c,s=>and3);
a4:myand port map(x1=>nQb,x2=>nc,s=>and4);
o2:myor port map(x1=>and3,x2=>and4,s=>or2);
a5:myand port map(x1=>or1,x2=>or2,s=>and5);
ffC:ff_jk port map(J=>and5,K=>and5,T=>T,Cl=>Cl,Pr=>Pr,notQ=>nQc,Q =>kq3);
a6:myand port map(x1=>kq3,x2=>c,s=>and6);
a7:myand port map(x1=>nQc,x2=>nc,s=>and7);
o3:myor port map (x1=>and6,x2=>and7,s=>or3);
a8:myand port map(x1=>and5,x2=>or3,s=>and8);
ffD:ff_jk port map(J=>and8,K=>and8,T=>T,Cl=>Cl,Pr=>Pr,notQ=>nQd,Q =>kq4);
Qa<=kq1;
Qb<=kq2;
Qc<=kq3;
Qd<=kq4;
end dem_dong_bo_4bit_behave;
file test:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
entity test_dem_dong_bo_4bit is
end entity;
architecture test_dem_dong_bo_4bit_behave of test_dem_dong_bo_4bit is
component dem_dong_bo_4bit
port(J,K,T,Cl,Pr,c:in std_logic;
Qa,Qb,Qc,Qd:out std_logic);
end component;
SIGNAL Cl:STD_LOGIC:='1';
SIGNAL Pr:STD_LOGIC:='1';
SIGNAL T:STD_LOGIC:='1';
SIGNAL c:STD_LOGIC:='1';
SIGNAL J:STD_LOGIC:='1';
SIGNAL K:STD_LOGIC:='1';
SIGNAL Qa:STD_LOGIC:='0';
SIGNAL Qb:STD_LOGIC:='0';
SIGNAL Qc:STD_LOGIC:='0';
SIGNAL Qd:STD_LOGIC:='0';
begin
Test_dem4bit:dem_dong_bo_4bit port map(J=>J,K=>K,T=>T,Cl=>Cl,Pr=>Pr,c=>c,
Qa=>Qa,Qb=>Qb,Qc=>Qc,Qd=>Qd);
process(T)
begin
T<=NOT T AFTER 10 ns;
end process;
end test_dem_dong_bo_4bit_behave;
configuration conf_test_dem_dong_bo_4bit of test_dem_dong_bo_4bit is
for test_dem_dong_bo_4bit_behave
for Test_dem4bit:dem_dong_bo_4bit
USE ENTITY work.dem_dong_bo_4bit;
end for;
end for;
end conf_test_dem_dong_bo_4bit;
-------------------------------------
các a jup jum em
Comment
-
---code ff_jk
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
entity ff_jk is
port(J,K,T,Cl,Pr:in std_logic;
Q,notQ:out std_logic);
end ff_jk;
ARCHITECTURE ff_jk_behave of ff_jk is
Begin
process (T,cl)
variable tam:std_logic :='1';
variable nottam:std_logic := '0';
begin
if Cl='0' then
tam:='0';
nottam:='1';
elsif Pr='0'then
tam:='1';
nottam:='0';
elsif T'event and T ='0' then
if j='0'and k='1'then
tam:='0';
nottam:='1';
elsif j='1'and k='0'then
tam:='1';
nottam:='0';
elsif j='1' and k='1' then
tam:= not tam;
nottam:=not nottam;
else
null;
end if;
Q<=tam;
notQ<=nottam;
end if;
end process ;
end ff_jk_behave;
Comment
-
modelsim chỉ đẻ mô phỏng thui, còn Quartus nó biên dịch đẻ nạp ra mạch thật, do vậy có thể có nhưng code bạn chạy đc trên Modelsim rùi nhưng lại k biên dịch ở Quartus đc vì còn liên quan tần số thực là thạch anh của mạch thật nữa, bạn nhéNguyên văn bởi hsonnguyen Xem bài viếtnó báo vậy đó các bác."Error: Can't synthesize current design -- Top partition does not contain any logic"
Comment
-
siskin_lion nói đúng.
Quartus chỉ hộ trợ vestor Ware Form để mô phỏng tín hiệu. Không hộ trợ viết test bench.
Để không bị báo lỗi, hsonnguyen cần phải remove phần test bench. Chỉ để lại cấu trúc thiết kế là Okie.
Lúc đó Top entity là "dem_dong_bo_4bit"
Comment
Bài viết mới nhất
Collapse
-
Trả lời cho Đấu tắt điện cho máy tính bảngbởi bqvietBqv cáo lỗi vì chưa đủ khả năng diễn giải để người đọc hiểu. Người làm kỹ thuật sâu đôi khi như thế đó. Về việc nạp pin không vào dù cell mới, khả năng cái mạch quản lý đó đã hỏng - cũng chính là nguyên nhân đám cell cũ hỏng từ đầu.
-
Channel: Thiết bị điện tử cá nhân
06-12-2025, 17:17 -
-
Trả lời cho Xin hỏi về mạch thu FM/AM trong catsettebởi nguyendinhvanTheo tôi, nó chỉ là cái Tuy- ê - nơ, hoặc là khối Trung Văn Tần, nó một phần trong cái Da đì ô thôi. Vì có thấy một chỗ có ba chân hàn, giiống như chân Cờ rít sờ tăng 455 ki nô hẹc. Còn khối Tuy ê nơ thì không nhìn thây cái Di ốt Va di cáp...
-
Channel: Điện thanh
05-12-2025, 19:59 -
-
Trả lời cho Đấu tắt điện cho máy tính bảngbởi afrendlyCó vẻ ngoài hiểu biết của mình rồi. Cuối cùng mình quyết định tìm mua 2 pin trên Shopee, giá 200K thay vào. Tuy nhận pin được 1%, sạc mãi không vào nhưng cũng mở được máy lên. Vậy cũng tạm. Cảm ơn bạn đã hỗ trợ nhé....
-
Channel: Thiết bị điện tử cá nhân
04-12-2025, 01:27 -
-
Trả lời cho Máy điện châm ?bởi nick22Đúng như bạn nói, máy điện châm hiện nay trên thị trường đã khá đa dạng về mẫu mã, chức năng và giá thành.
-
Channel: Điện tử y sinh
01-12-2025, 13:23 -

Comment