nó báo vậy đó các bác."Error: Can't synthesize current design -- Top partition does not contain any logic"
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
-
Tags: None
-
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
-
bởi domar123Giải pháp cho dàn PC cao cấp chơi game và làm việc
Khi xây dựng một bộ máy tính cao cấp, việc chọn đúng vi xử lý và card đồ họa sẽ quyết định trực tiếp đến trải nghiệm thực tế của bạn. Dòng chip AMD trang bị công nghệ...-
Channel: Đánh giá sản phẩm DTVN
Hôm qua, 08:55 -
-
bởi domar123Giải pháp toàn diện cho người dùng đa nhiệm
Nếu bạn đang cần một bộ máy vừa phục vụ công việc chuyên môn nặng vừa đáp ứng nhu cầu giải trí cao cấp, sự kết hợp giữa Ryzen 9 9950X TRAY và Radeon RX 9070 XT 16GB là lựa chọn...-
Channel: Đánh giá sản phẩm DTVN
17-08-2026, 17:12 -
-
bởi lvhnKhác nhau là đi lái thuê hoặc chạy dịch vụ được
...
-
Channel: Tâm tình dân kỹ thuật
17-08-2026, 15:50 -
-
bởi ittcHic, sao nhiều anh em khuyên là đàn ông đã học thì học luôn số sàn chứ đừng học số tự động anh....-
Channel: Tâm tình dân kỹ thuật
16-08-2026, 17:46 -
-
bởi mèomướp1. Tìm hiểu đc thì càng tốt, bận thì thôi. Ko cần quá quan trọng
2. Số tự động cho đơn giản, kiểu như đi xe ga ấy ạ
3. Học lý thuyết tử tế ok
4.ok
5.có. đủ số km, tgian cầm lái là đc
6.đi ăn tập thể,...-
Channel: Tâm tình dân kỹ thuật
14-08-2026, 16:34 -

Comment