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
-
bởi torasungChào anh em,
Mình đang tìm hiểu và cấu hình một con biến tần Delta model VFD037E43A dùng cho động cơ công suất nhỏ, ứng dụng băng tải và quạt. Trước đây mình chủ yếu làm với vài dòng khác của Delta nhưng chưa dùng nhiều model này, nên muốn...-
Channel: Điện tử công nghiệp
Hôm qua, 09:13 -
-
Trả lời cho Vấn đề về tốc độ quaybởi nguyendinhvanSử dụng động cơ servor, hoặc lắp thêm một cái encoder vào động cơ bước. Encoder sẽ kiểm soát động cơ có quay hoặc đứng im.
-
Channel: Điện tử truyền hình
14-12-2025, 19:50 -
-
bởi Andrea14Chào mọi người,
Tôi muốn mô phỏng sự thay đổi các mùa bằng cách từ từ nghiêng một quả địa cầu 16 inch bằng một động cơ bước nhỏ. Một động cơ bước khác sẽ quay quả địa cầu theo thời gian thực. Hệ thống truyền động...-
Channel: Điện tử truyền hình
12-12-2025, 12:42 -

Comment