두 가지 파일 VHDL 프로젝트가있어서 초보자가 어려움을 겪고 있습니다.VHDL (Xilinx toolchain) "배열 트리밍"으로 scuppered되었습니다.
기본 직렬 포트 모듈 (송신 전용) 모듈을 구동하기 위해 시스템 클럭을 사용하고 30 비트 클럭 분배기 (그 중 비 연속 비트 수가 적음)를 사용합니다. 주기적으로 8 비트 문자.
합성 과정에서 필수적인 신호 중 많은 부분이 옵티 마이저에 의해 제거되는 것으로 보입니다. 예상하지 못했던 것입니다.
최상위 파일 "Glue.vhd"...
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use ieee.std_logic_unsigned.all;
entity Glue is
port(
clk : in std_logic;
tx : out std_logic;
LED : out std_logic_vector(1 downto 0)
);
end entity Glue;
architecture behavioural of Glue is
signal divider : unsigned(29 downto 0);
begin
LED(1) <= '0';
ser_tx : entity SerialTX
port map (
baud_clk => divider(12),
byte_to_transmit => std_ulogic_vector(divider(29 downto 22)),
poke => divider(20),
busy => LED(0),
serial_out => tx
);
clocker : process(clk)
begin
IF(rising_edge(clk)) then
divider <= divider + 1;
END IF;
end process clocker;
end architecture behavioural;
SerialTX.vhd 합성에서
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity SerialTX is
port (
baud_clk : in std_logic;
byte_to_transmit : in std_ulogic_vector(7 downto 0); --the byte that we want to transmit
poke : in std_logic; --a rising edge causes the byte to be sent out
busy : out std_logic; --wait for this to go low before transmiting more data
serial_out : out std_logic --the RS232 serial signal
);
end SerialTX;
architecture behavioural of SerialTX is
signal bit_buf : unsigned(9 downto 0); --(STOP bit) & (8 data bits) & (START bit)
signal internal_busy : std_logic;
shared variable bit_counter : integer range 0 to 10;
begin
busy <= internal_busy;
busy_handler : process(poke) is
begin
if(rising_edge(poke)) then
internal_busy <= '1';
end if;
if(bit_counter = 0) then
internal_busy <= '0';
end if;
end process busy_handler;
do_transmit : process(baud_clk) is
begin
if(rising_edge(baud_clk)) then
if((internal_busy = '1') and (bit_counter = 0)) then
bit_counter := 10;
bit_buf <= unsigned('1' & byte_to_transmit & '0');
end if;
serial_out <= bit_buf(0);
bit_buf <= bit_buf srl 1;
bit_counter := bit_counter - 1;
end if;
end process do_transmit;
end behavioural;
경고를 (오류가 당신을 신경 쓰지) 프로세스는 다음과 같습니다.
WARNING:Xst:647 - Input <byte_to_transmit> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved.
WARNING:Xst:1710 - FF/Latch <bit_buf_9> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_8> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_7> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_6> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_5> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_4> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_3> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_2> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_1> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <bit_buf_0> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <serial_out> (without init value) has a constant value of 0 in block <ser_tx>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:2404 - FFs/Latches <bit_buf<9:0>> (without init value) have a constant value of 0 in block <SerialTX>.
WARNING:Xst:1710 - FF/Latch <serial_out> (without init value) has a constant value of 0 in block <SerialTX>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:2677 - Node <divider_21> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_22> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_23> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_24> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_25> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_26> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_27> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_28> of sequential type is unconnected in block <Glue>.
WARNING:Xst:2677 - Node <divider_29> of sequential type is unconnected in block <Glue>.
WARNING:Route:455 - CLK Net:divider<20> may have excessive skew because 0 CLK pins and 1 NON_CLK pins failed to route using a CLK template.
WARNING:Route:455 - CLK Net:divider<12> may have excessive skew because 0 CLK pins and 1 NON_CLK pins failed to route using a CLK template.
소스 코드의 연결을 추적 한 결과 실수를 발견 할 수 없습니다. 과제에서 다루지 않은 일부 모서리/코너 사례가 누락되었다는 느낌을받습니다.
"(초기화 값 없음)"으로 표시된 항목 기본값을 사용하지 않음으로써 교정하려고했습니다. "블록으로 연결되지 않은"것으로 표시된 것들은 어리둥절 해합니다.
신디사이저를 만족 시키려면 어떻게해야합니까?
사용하지 않는 비트가 다듬어 져 있습니다. 문제가 무엇입니까? 그것은 시뮬레이션에서했던 것과 똑같은 일을 할 것이고, 거기에서 제대로 작동 할 것입니다, 그렇죠? –
@BrianDrummond, 훌륭한 질문입니다. 어떻게해야할지 생각하면 대답하겠습니다. :) – Wossname
귀하의 접착제는 ser_tex 구성 요소 인스턴스화에서 SerialTX 엔터티의 가시성이 부족합니다. 직접 볼 수는 없습니다. 고전적인 치료법은 선택된 이름 인'entity work.SerialTX - 선택된 이름을 만들기위한 접두사 접두어 '로 SerialTX를 볼 수있게하는 것입니다. 그것은 표시되지 않은 초기 경고에서 밝혀야합니다. SerialTX를 연결하지 않으면 드라이브 만 제거됩니다. Brian은별로 미묘하지는 않지만, 신디사이저는 일반적으로 기능 코드가 제공 될 것으로 기대합니다. 관계없는 괄호의 일부를 저장하면 실제로 필요할 때를 알 수 없습니다. – user1155120